|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.forms.AbstractElement
public abstract class AbstractElement
Convenient superclass for element implementations.
Field Summary | |
---|---|
protected RiotLog |
log
|
Constructor Summary | |
---|---|
AbstractElement()
|
Method Summary | |
---|---|
protected void |
afterFormContextSet()
|
protected void |
afterFormSet()
|
void |
focus()
Focuses the element. |
String |
getEventTriggerId()
|
Form |
getForm()
Returns the form that contains the element. |
FormContext |
getFormContext()
Returns the FormContext. |
protected FormListener |
getFormListener()
|
String |
getHint()
|
String |
getId()
Returns the previously assigned id. |
String |
getLabel()
|
Element |
getParent()
Returns the element's parent. |
String |
getStyleClass()
Returns the elements style class. |
protected String |
getSystemStyleClass()
|
protected String |
getWrapperStyleClass()
|
boolean |
isCompositeElement()
Returns whether the element is composed of multiple widgets. |
boolean |
isEnabled()
Returns true , if the element as well as its parent is
enabled. |
boolean |
isRequired()
Returns whether the element is mandatory and must be filled out by the user. |
boolean |
isVisible()
|
void |
processRequest(FormRequest request)
Subclasses may override this method to change their internal state according the given request. |
void |
render()
|
void |
render(PrintWriter writer)
Renders the element to the given writer. |
protected abstract void |
renderInternal(PrintWriter writer)
|
void |
setEnabled(boolean enabled)
Enables (or disables) the element. |
void |
setForm(Form form)
Sets a reference to the form that contains the element. |
void |
setFormContext(FormContext formContext)
Sets the FormContext. |
void |
setHint(String hint)
|
void |
setId(String id)
Sets the element's unique id. |
protected void |
setInline(boolean inline)
|
void |
setLabel(String label)
|
void |
setParent(Element parent)
Sets the element's parent. |
void |
setReadOnly(boolean readOnly)
Setting an element to read-only is the same as invoking setEnabled(false) . |
void |
setRequired(boolean required)
Sets whether the element is required. |
void |
setStyleClass(String styleClass)
|
void |
setVisible(boolean visible)
|
protected void |
setWrap(boolean wrap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RiotLog log
Constructor Detail |
---|
public AbstractElement()
Method Detail |
---|
public String getId()
Element
getId
in interface Element
public void setId(String id)
Element
setId
in interface Element
Form.registerElement(Element)
public String getEventTriggerId()
getEventTriggerId
in interface Element
public String getStyleClass()
Element
getStyleClass
in interface Element
public void setStyleClass(String styleClass)
protected String getSystemStyleClass()
protected String getWrapperStyleClass()
protected void setWrap(boolean wrap)
protected void setInline(boolean inline)
public Form getForm()
Element
getForm
in interface Element
public final void setForm(Form form)
Element
setForm
in interface Element
protected void afterFormSet()
public FormContext getFormContext()
Element
getFormContext
in interface Element
public final void setFormContext(FormContext formContext)
Element
Form.registerElement(Element)
or Form.setFormContext(FormContext)
.
setFormContext
in interface Element
protected void afterFormContextSet()
public Element getParent()
Element
getParent
in interface Element
public void setParent(Element parent)
Element
setParent
in interface Element
public String getLabel()
public void setLabel(String label)
public String getHint()
public void setHint(String hint)
public void focus()
Element
focus
in interface Element
public final void render()
public final void render(PrintWriter writer)
Element
render
in interface Element
protected abstract void renderInternal(PrintWriter writer)
public void processRequest(FormRequest request)
processRequest
in interface Element
public final boolean isEnabled()
true
, if the element as well as its parent is
enabled.
isEnabled
in interface Element
public final void setEnabled(boolean enabled)
isEnabled()
takes the state
of its parent element into account.
setEnabled
in interface Element
public void setReadOnly(boolean readOnly)
setEnabled(false)
.
public boolean isRequired()
isRequired
in interface Element
public void setRequired(boolean required)
setRequired
in interface Element
public boolean isVisible()
isVisible
in interface Element
public void setVisible(boolean visible)
public boolean isCompositeElement()
Element
isCompositeElement
in interface Element
protected FormListener getFormListener()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |