T - The type of the SelectOption valuepublic class SelectOption<T> extends BaseDominoElement<elemental2.dom.HTMLDivElement,SelectOption<T>> implements HasValue<SelectOption,T>, HasBackground<SelectOption>, Selectable<SelectOption>, org.gwtproject.editor.client.TakesValue<T>
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerSelectable.SelectionHandler<T>| Constructor and Description |
|---|
SelectOption(T value,
String key) |
SelectOption(T value,
String key,
String displayValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionHandler(Selectable.SelectionHandler<SelectOption> selectionHandler)
Adds a selection handler to this component, the handler will be called whenever the component
selected/deselected
|
SelectOption<T> |
appendChild(org.jboss.elemento.IsElement<?> node) |
SelectOption<T> |
appendChild(elemental2.dom.Node node) |
static <T> SelectOption<T> |
create(T value,
String key) |
static <T> SelectOption<T> |
create(T value,
String key,
String displayValue) |
SelectOption<T> |
deselect()
Deselect the component if it is already selected
|
SelectOption<T> |
deselect(boolean silent)
deselect the component without triggering the selection/change handlers
|
elemental2.dom.HTMLDivElement |
element() |
String |
getDisplayValue() |
String |
getKey() |
FlexLayout |
getOptionLayoutElement() |
T |
getValue() |
DominoElement<elemental2.dom.HTMLElement> |
getValueContainer() |
boolean |
isExcludeFromSearchResults() |
boolean |
isSelected() |
SelectOption<T> |
select()
make the component selected
|
SelectOption<T> |
select(boolean silent)
make the component selected without triggering the selection/change handlers
|
SelectOption<T> |
setBackground(Color background) |
SelectOption<T> |
setDisplayValue(String displayValue) |
SelectOption<T> |
setExcludeFromSearchResults(boolean excludeFromSearchResults)
Enable/Disable exclusion from search result
|
void |
setKey(String key) |
void |
setValue(T value) |
SelectOption<T> |
value(T value) |
SelectOption |
value(T value,
boolean silent) |
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, disable, elevate, elevate, enable, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic SelectOption(T value, String key, String displayValue)
value - T the SelectOption valuekey - String key unique identifier for the SelectOptiondisplayValue - Stringpublic static <T> SelectOption<T> create(T value, String key, String displayValue)
T - type of the SelectOption valuevalue - T the SelectOption valuekey - String key unique identifier for the SelectOptiondisplayValue - Stringpublic static <T> SelectOption<T> create(T value, String key)
T - type of the SelectOption valuevalue - T the SelectOption valuekey - String key unique identifier for the SelectOption and also the display stringpublic SelectOption<T> appendChild(elemental2.dom.Node node)
appendChild in interface HasChildren<SelectOption<T>>appendChild in class BaseDominoElement<elemental2.dom.HTMLDivElement,SelectOption<T>>node - Node to be appended to this SelectOptionpublic SelectOption<T> appendChild(org.jboss.elemento.IsElement<?> node)
appendChild in interface HasChildren<SelectOption<T>>appendChild in class BaseDominoElement<elemental2.dom.HTMLDivElement,SelectOption<T>>node - IsElement to be appended to this SelectOptionpublic String getKey()
public void setKey(String key)
key - String key identifier for this SelectOptionpublic T getValue()
getValue in interface org.gwtproject.editor.client.TakesValue<T>public void setValue(T value)
setValue in interface org.gwtproject.editor.client.TakesValue<T>public void addSelectionHandler(Selectable.SelectionHandler<SelectOption> selectionHandler)
addSelectionHandler in interface Selectable<SelectOption>selectionHandler - Selectable.SelectionHandlerpublic String getDisplayValue()
public SelectOption<T> setDisplayValue(String displayValue)
displayValue - Stringpublic SelectOption<T> select()
select in interface Selectable<SelectOption>public SelectOption<T> deselect()
deselect in interface Selectable<SelectOption>public SelectOption<T> select(boolean silent)
select in interface Selectable<SelectOption>public SelectOption<T> deselect(boolean silent)
deselect in interface Selectable<SelectOption>public boolean isSelected()
isSelected in interface Selectable<SelectOption>public SelectOption<T> setBackground(Color background)
setBackground in interface HasBackground<SelectOption>background - Colorpublic elemental2.dom.HTMLDivElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>element in class BaseDominoElement<elemental2.dom.HTMLDivElement,SelectOption<T>>public DominoElement<elemental2.dom.HTMLElement> getValueContainer()
HTMLElement that contains the display value text wrapped as DominoElementpublic SelectOption<T> value(T value)
value in interface HasValue<SelectOption,T>value - V to set as a value of the componentpublic SelectOption value(T value, boolean silent)
value in interface HasValue<SelectOption,T>value - V to set as a value of the componentsilent - boolean if true set the value without triggering change handlerspublic boolean isExcludeFromSearchResults()
public SelectOption<T> setExcludeFromSearchResults(boolean excludeFromSearchResults)
excludeFromSearchResults - boolean, if true then even if this SelectOption matches the
search criteria it wont be included in the search resultsSelectOptionpublic FlexLayout getOptionLayoutElement()
FlexLayout that contains the different elements in the SelectOptionCopyright © 2019–2022 Dominokit. All rights reserved.