public class Option extends AbstractTextWidget implements HasName, TakesValue<String>, HasEnabled
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledDEBUG_ID_PREFIX| Constructor and Description | 
|---|
Option()  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getContent()
Returns the custom HTML content; may be  
null. | 
IconType | 
getIcon()
Returns the icon of the option; may be  
null. | 
String | 
getName()  | 
OptionElement | 
getSelectElement()
Returns the  
OptionElement. | 
String | 
getSubtext()
Returns the sub-text of the option. 
 | 
String | 
getTokens()
Returns the search key words. 
 | 
String | 
getValue()
Returns the value of the option. 
 | 
boolean | 
isDivider()
Returns  
true if the option is a divider. | 
boolean | 
isEnabled()  | 
boolean | 
isHidden()
Returns  
true if the option is hidden. | 
boolean | 
isSelected()
Returns  
true if the option is selected. | 
void | 
setContent(String content)
Inserts custom HTML into the option. 
 | 
void | 
setDivider(boolean divider)
Turns the option into a divider. 
 | 
void | 
setEnabled(boolean enabled)  | 
void | 
setHidden(boolean hidden)
Hides the option if set to  
true.Defaults to false. | 
void | 
setIcon(IconType iconType)
Add an icon to the option. 
 | 
void | 
setName(String name)  | 
void | 
setSelected(boolean selected)
Selects/deselects the option. 
 | 
void | 
setSubtext(String subtext)
Set the specified sub-text to the option. 
 | 
void | 
setTokens(String tokens)
Adds key words to improve the searchability. 
 | 
void | 
setValue(String value)  | 
asEditor, getHTML, getId, getPull, getText, setColor, setHiddenOn, setHTML, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPull, setText, setVisibleOnaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringpublic Option()
public OptionElement getSelectElement()
OptionElement.OptionElement.public boolean isSelected()
true if the option is selected.true if the option is selectedpublic void setSelected(boolean selected)
selected - public void setValue(String value)
setValue in interface TakesValue<String>public String getValue()
getValue in interface TakesValue<String>public boolean isEnabled()
isEnabled in interface HasEnabledpublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledpublic void setTokens(String tokens)
tokens - public void setDivider(boolean divider)
divider - public boolean isDivider()
true if the option is a divider.true if the option is a dividerpublic void setSubtext(String subtext)
subtext - public String getSubtext()
public void setIcon(IconType iconType)
iconType - public IconType getIcon()
null.public void setContent(String content)
content - public String getContent()
null.public void setHidden(boolean hidden)
true.false.hidden - public boolean isHidden()
true if the option is hidden.true if the option is hiddenCopyright © 2017. All rights reserved.