|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.form.Option
A class representing an option of a widget.
Field Summary | |
static String |
versionId
|
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from class com.arsdigita.bebop.SimpleComponent |
m_attr |
Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
Constructor Summary | |
Option(String label)
|
|
Option(String value,
Component component)
|
|
Option(String value,
String label)
This creates an Option whose component is a lable consisting of the string that is passed in. |
Method Summary | |
void |
generateXML(PageState s,
Element e)
Generate XML depending on what OptionGroup we belong to. |
Component |
getComponent()
|
OptionGroup |
getGroup()
|
String |
getLabel()
If the component is a Label (which most of the time it is) then this returns the value of the label. |
String |
getName()
|
String |
getValue()
|
boolean |
isSelected(ParameterData data)
|
void |
setComponent(Component component)
|
void |
setGroup(OptionGroup group)
|
void |
setLabel(Label label)
Deprecated. Use setComponent(Component component) instead |
void |
setLabel(String label)
This sets the component to the label consisting of the passed in string |
void |
setOnBlur(String javascriptCode)
Sets the ONBLUR attribute for the HTML tags that compose this element. |
void |
setOnChange(String javascriptCode)
Sets the ONCHANGE attribute for the HTML tags that compose this element. |
void |
setOnClick(String javascriptCode)
Sets the ONCLICK attribute for the HTML tags that compose this element. |
void |
setOnFocus(String javascriptCode)
Sets the ONFOCUS attribute for the HTML tags that compose this element. |
void |
setOnKeyUp(String javascriptCode)
Sets the ON_KEY_UP attribute for the HTML tags that compose this element. |
void |
setOnSelect(String javascriptCode)
Sets the ONSELECT attribute for the HTML tags that compose this element. |
void |
setValue(String value)
|
Methods inherited from class com.arsdigita.bebop.BlockStylable |
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment |
Methods inherited from class com.arsdigita.bebop.TextStylable |
setBackgroundColor, setColor |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
children, clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from class com.arsdigita.bebop.Completable |
addCompletionListener, fireCompletionEvent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public Option(String label)
public Option(String value, String label)
public Option(String value, Component component)
Method Detail |
public String getName()
public final String getLabel()
ClassCastException
- is thrown if the component is not
a labelpublic final void setLabel(String label)
public final void setLabel(Label label)
setComponent(Component component)
instead
public final void setComponent(Component component)
public final Component getComponent()
public final void setGroup(OptionGroup group)
public final OptionGroup getGroup()
public final String getValue()
public final void setValue(String value)
public void setOnFocus(String javascriptCode)
public void setOnBlur(String javascriptCode)
public void setOnSelect(String javascriptCode)
public void setOnChange(String javascriptCode)
public void setOnKeyUp(String javascriptCode)
public void setOnClick(String javascriptCode)
public boolean isSelected(ParameterData data)
public void generateXML(PageState s, Element e)
generateXML
in interface Component
generateXML
in class SimpleComponent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |