V - The type of the menu item valueT - The type of the class extending from this classpublic class AbstractMenuItem<V,T extends AbstractMenuItem<V,T>> extends BaseDominoElement<elemental2.dom.HTMLLIElement,T> implements HasSelectionHandler<T,T>, HasDeselectionHandler<T>
AbstractMenu itemsBaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerHasSelectionHandler.SelectionHandler<V>HasDeselectionHandler.DeselectionHandler| Modifier and Type | Field and Description |
|---|---|
protected AbstractMenu<V,?> |
parent |
element| Constructor and Description |
|---|
AbstractMenuItem() |
| Modifier and Type | Method and Description |
|---|---|
T |
addDeselectionHandler(HasDeselectionHandler.DeselectionHandler deselectionHandler) |
T |
addLeftAddOn(FlexItem<?> addOn)
Adds an element as an add-on to the left
|
T |
addRightAddOn(FlexItem<?> addOn)
Adds an element as an add-on to the right
|
T |
addSelectionHandler(HasSelectionHandler.SelectionHandler<T> selectionHandler)
Adds a Selection handler to the component
|
T |
appendChild(org.jboss.elemento.IsElement<?> element)
Appends a
IsElement to the contentElement |
T |
appendChild(elemental2.dom.Node node)
Appends a
Node to the contentElement |
T |
closeSubMenu()
Close the item sub-menu
|
T |
deselect()
Deselects the menu item and trigger the selection handlers
|
T |
deselect(boolean silent)
Deselect the menu item with the option to trigger/disable the select handlers
|
elemental2.dom.HTMLLIElement |
element() |
T |
focus()
Force focus on the menu item
|
elemental2.dom.HTMLElement |
getClickableElement()
by default this return the same component root element
|
FlexItem<elemental2.dom.HTMLDivElement> |
getContentElement() |
String |
getKey() |
FlexItem<?> |
getNestingIndicator() |
AbstractMenu<V,?> |
getParent() |
V |
getValue() |
boolean |
hasMenu() |
boolean |
isSelected() |
boolean |
onSearch(String token,
boolean caseSensitive)
Apply a search token matching on the menu item
|
void |
openSubMenu()
Opens the sub-menu of the menu item
|
T |
removeSelectionHandler(HasSelectionHandler.SelectionHandler<T> selectionHandler) |
T |
select()
Selects the menu item and trigger the select handlers
|
T |
select(boolean silent)
Selects the menu item with the option to trigger/disable the select handlers
|
T |
setKey(String key) |
T |
setMenu(AbstractMenu<V,?> menu)
Sets the sub-menu of the menu item
|
T |
setNestingIndicator(FlexItem<?> nestingIndicator)
Sets a custom menu nesting indicator
|
T |
setValue(V value) |
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, 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, setPropertyprotected AbstractMenu<V,?> parent
public T addLeftAddOn(FlexItem<?> addOn)
addOn - FlexItempublic T addRightAddOn(FlexItem<?> addOn)
addOn - FlexItempublic FlexItem<elemental2.dom.HTMLDivElement> getContentElement()
FlexItem of the main content conatinerpublic T appendChild(elemental2.dom.Node node)
Node to the contentElementappendChild in interface HasChildren<T extends AbstractMenuItem<V,T>>appendChild in class BaseDominoElement<elemental2.dom.HTMLLIElement,T extends AbstractMenuItem<V,T>>node - Node to be appended to the componentpublic T appendChild(org.jboss.elemento.IsElement<?> element)
IsElement to the contentElementappendChild in interface HasChildren<T extends AbstractMenuItem<V,T>>appendChild in class BaseDominoElement<elemental2.dom.HTMLLIElement,T extends AbstractMenuItem<V,T>>element - IsElement to be appended to the componentpublic boolean onSearch(String token, boolean caseSensitive)
token - String search textcaseSensitive - boolean, true if the search is case-sensitivepublic T select()
public T deselect()
public T select(boolean silent)
silent - boolean, true to avoid triggering the select handlers.public T deselect(boolean silent)
silent - boolean, true to avoid triggering the select handlers.public boolean isSelected()
public T addSelectionHandler(HasSelectionHandler.SelectionHandler<T> selectionHandler)
addSelectionHandler in interface HasSelectionHandler<T extends AbstractMenuItem<V,T>,T extends AbstractMenuItem<V,T>>selectionHandler - Selectable.SelectionHandlerpublic T removeSelectionHandler(HasSelectionHandler.SelectionHandler<T> selectionHandler)
removeSelectionHandler in interface HasSelectionHandler<T extends AbstractMenuItem<V,T>,T extends AbstractMenuItem<V,T>>public T addDeselectionHandler(HasDeselectionHandler.DeselectionHandler deselectionHandler)
addDeselectionHandler in interface HasDeselectionHandler<T extends AbstractMenuItem<V,T>>deselectionHandler - HasDeselectionHandler.DeselectionHandlerpublic T focus()
public String getKey()
public T setKey(String key)
key - String unique key of the menu itempublic V getValue()
public T setValue(V value)
value - the value of the meu itempublic FlexItem<?> getNestingIndicator()
FlexItem that represent the current menu nesting indication.public T setNestingIndicator(FlexItem<?> nestingIndicator)
nestingIndicator - FlexItempublic T setMenu(AbstractMenu<V,?> menu)
menu - AbstractMenupublic void openSubMenu()
public T closeSubMenu()
public AbstractMenu<V,?> getParent()
AbstractMenu of the menu itempublic boolean hasMenu()
public elemental2.dom.HTMLElement getClickableElement()
getClickableElement in class BaseDominoElement<elemental2.dom.HTMLLIElement,T extends AbstractMenuItem<V,T>>public elemental2.dom.HTMLLIElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLLIElement>element in class BaseDominoElement<elemental2.dom.HTMLLIElement,T extends AbstractMenuItem<V,T>>Copyright © 2019–2022 Dominokit. All rights reserved.