Constructor and Description |
---|
Option()
Default constructor.
|
Option(java.lang.String value,
java.lang.String text)
Creates <option> element in <select> container with option
value and label text
|
Option(java.lang.String value,
java.lang.String text,
boolean selected)
Creates <option> element in <select> container with option
value, label text and if selected.
|
Modifier and Type | Method and Description |
---|---|
void |
drawAttributes() |
Select |
getSelect()
Retrieve Select object of this option comply OptionGroup elements.
|
java.lang.String |
getValue()
Specifies the value to be sent to a server when a form is submitted.
|
boolean |
isDisabled()
Specifies that an option should be disabled.
|
boolean |
isSelected()
Specifies that an option should be selected by default.
|
Option |
select(boolean select)
On/Off selected attribute without script call.
|
Option |
setDisabled(boolean disabled)
Set "disabled" property and if element was draw call script at browser.
|
Option |
setSelected(boolean selected)
Set "selected" property if element was draw.
|
Option |
setValue(java.lang.String value)
Set "value" property and if element was draw call script at browser.
|
add, addAllDropTargets, addDropTarget, addListener, addStyleClass, alert, assignText, callBack, callBack, callScript, clearDropTargets, clearElements, clearElements, confirm, confirm, drawAttribute, findElement, findParent, findViewElements, fireEvent, fireEvent, fireEventOnView, fireEventOnView, firePropertyChange, focus, getApplication, getBundle, getBundleObject, getCustomDragMove, getDir, getDragDropEventsOptions, getDropTargets, getElements, getElements, getEventListeners, getId, getLang, getParent, getStyle, getStyleClass, getTabIndex, getText, getTitle, insert, isChildrenSetChanged, isContenteditable, isDraggable, isDrawn, isEscapeText, isListening, isListening, isListening, print, prompt, prompt, remove, remove, removeAttribute, removeDropTarget, removeListener, removeListener, removeParent, removeStyleClass, replace, replaceStyleClass, retrieveListeners, retrieveListeners, setChangeChildrenSet, setContenteditable, setCustomDragMove, setDir, setDragDropEventsOptions, setDraggable, setDrawn, setEscapeText, setLang, setParent, setStyle, setStyleClass, setTabIndex, setText, setTitle, transformTagName
public Option()
public Option(java.lang.String value, java.lang.String text)
value
- of optiontext
- label stringpublic Option(java.lang.String value, java.lang.String text, boolean selected)
value
- of optiontext
- label stringselected
- if option is selected@InitializeAttributes public void drawAttributes()
public Option select(boolean select)
select
- on/offpublic Select getSelect()
public boolean isDisabled()
public Option setDisabled(boolean disabled)
disabled
- the disabled to setpublic boolean isSelected()
public Option setSelected(boolean selected)
selected
- the selected to set. If is null call removeAttribute on
element at browser.public java.lang.String getValue()
public Option setValue(java.lang.String value)
value
- the value to set. If is null call removeAttribute on element
at browser. If not null call set "htmlFor" property of element
at browser.