public class Option extends Element
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 |
---|---|
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, addStyleClass, alert, assignText, callBack, callScript, clearDropTargets, clearElements, clearElements, confirm, findElement, findEventOptions, findParent, findViewElements, fireEvent, fireEvent, fireEventOnView, fireEventOnView, firePropertyChange, focus, getApplication, getContenteditableValue, getDir, getDropTargets, getElements, getElements, getEventListeners, getId, getLang, getParent, getStyle, getStyle, getStyleClass, getStyles, getTabIndex, getText, getTitle, getTypeEvents, insert, isChildrenSetChanged, isContenteditable, isDraggable, isDrawn, isListening, listenerOff, listenerOn, print, prompt, remove, remove, removeDropTarget, removeEventOptions, removeParent, removeStyle, removeStyleClass, removeStyles, replace, replaceStyleClass, setChangeChildrenSet, setContenteditable, setDir, setDrawn, setEventOptions, setLang, setParent, setStyle, setStyleClass, setStyles, setTabIndex, setText, setTitle
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 selectedpublic 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.