Class AbstractItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
java.lang.Object
ch.nolix.system.element.mutableelement.AbstractMutableElement
ch.nolix.system.style.stylable.AbstractStylableElement<M>
ch.nolix.system.webgui.main.Control<M,S>
ch.nolix.system.webatomiccontrol.itemmenu.AbstractItemMenu<M,S>
- Type Parameters:
M- is the type of aAbstractItemMenu.S- is the type of theIItemMenuStyles of aAbstractItemMenu.
- All Implemented Interfaces:
IFluentMutableMultiTokenHolder<M>, IFluentMutableOptionalIdHolder<M>, IMultiTokenHolder, IOptionalIdHolder, Linkable, LinkedRequestable, TypeRequestable, Clearable, Resettable, EmptinessRequestable, IHtmlGetter, IElement, IStructureElement, IMutableElement, ISizeAdjustableBox<M>, PresenceRequestable, PresenceSettable<M>, IStylableElement<M>, IItemMenu<M,S>, IControl<M, S>, IUserInputCell<M>
- Direct Known Subclasses:
DropdownMenu
public abstract class AbstractItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
extends Control<M,S>
implements IItemMenu<M,S>
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from class Control
DEFAULT_CURSOR_ICON, DEFAULT_PRESENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Mfinal MaddItem(IItemMenuItem<?> item, IItemMenuItem<?>... items) final MaddItemWithIdAndText(String id, String text) final MaddItemWithIdAndTextAndSelectAction(String id, String text, Runnable selectAction) final MaddItemWithIdAndTextAndSelectAction(String id, String text, Consumer<IItemMenuItem<?>> selectAction) final MaddItemWithText(String text, String... texts) final MaddItemWithTextAndSelectAction(String text, Runnable selectAction) final MaddItemWithTextAndSelectAction(String text, Consumer<IItemMenuItem<?>> selectAction) final booleanfinal voidclear()Removes the elements of the currentClearable.final booleanfinal booleanfinal booleancontainsItemWithText(String text) final booleanfinal StringgetIdByItemText(String itemText) final IContainer<IControl<?, ?>> final IContainer<IItemMenuItem<?>> final IItemMenuItem<?> final StringgetTextByItemId(String itemId) final Stringfinal booleanfinal voidfinal booleanisEmpty()final voidfinal voidrunHtmlEvent(String htmlEvent) final Mfinal Mfinal MselectItemById(String id) final MselectItemByText(String text) final MsetSelectAction(Runnable selectAction) final MsetSelectAction(Consumer<IItemMenuItem<?>> selectAction) final MsetUserInput(String userInput) Methods inherited from class Control
belongsToControl, belongsToGui, belongsToLayer, editStyle, getCssRules, getCursorIcon, getHtml, getInternalId, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOptionalStoredChildControlByInternalId, getPresence, getStoredChildStylableElements, getStoredLinkedObjects, getStoredParentControl, getStoredParentGui, getStoredParentLayer, getStoredStyle, hasInternalId, hasMaxHeight, hasMaxWidth, hasMinHeight, hasMinWidth, internalSetParentControl, internalSetParentLayer, isCollapsed, isInvisible, isLinkedTo, isLinkedToAnObject, isVisible, linkTo, removeMaxHeight, removeMaxWidth, removeMinHeight, removeMinWidth, setCollapsed, setCursorIcon, setInvisible, setMaxHeight, setMaxHeightInPercentOfViewAreaHeight, setMaxWidth, setMaxWidthInPercentOfViewAreaWidth, setMinHeight, setMinHeightInPercentOfViewAreaHeight, setMinWidth, setMinWidthInPercentOfViewAreaWidth, setVisibility, setVisibleMethods inherited from class AbstractStylableElement
addToken, getChildStructureElements, getId, getTokens, hasId, removeId, removeToken, removeTokens, reset, resetStyleRecursively, setIdMethods inherited from class AbstractMutableElement
addOrChangeAttribute, addOrChangeAttribute, equals, getAttributes, getSpecification, hashCode, resetFromFileWithFilePath, toStringMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface IControl
belongsToControl, belongsToGui, belongsToLayer, editStyle, getCssRules, getCursorIcon, getInternalId, getOptionalJavaScriptUserInputFunction, getOptionalStoredChildControlByInternalId, getStoredParentControl, getStoredParentGui, getStoredParentLayer, getStoredStyle, hasInternalId, internalSetParentControl, internalSetParentLayer, registerHtmlElementEventsAt, setCursorIconMethods inherited from interface IElement
getAttributes, getSpecification, toFormatedString, toXmlMethods inherited from interface IFluentMutableMultiTokenHolder
addToken, removeToken, removeTokensMethods inherited from interface IFluentMutableOptionalIdHolder
removeId, setIdMethods inherited from interface IHtmlGetter
getHtmlMethods inherited from interface IMultiTokenHolder
getTokensMethods inherited from interface IMutableElement
addOrChangeAttribute, addOrChangeAttribute, addOrChangeAttributes, addOrChangeAttributes, addOrChangeAttributes, resetFromAttributes, resetFromSpecificationMethods inherited from interface IOptionalIdHolder
getId, getIdInQuotes, hasId, hasIdMethods inherited from interface ISizeAdjustableBox
getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, hasMaxHeight, hasMaxWidth, hasMinHeight, hasMinWidth, removeMaxHeight, removeMaxWidth, removeMinHeight, removeMinWidth, setMaxHeight, setMaxHeightInPercentOfViewAreaHeight, setMaxWidth, setMaxWidthInPercentOfViewAreaWidth, setMinHeight, setMinHeightInPercentOfViewAreaHeight, setMinWidth, setMinWidthInPercentOfViewAreaWidthMethods inherited from interface IStructureElement
getChildStructureElementsMethods inherited from interface IStylableElement
getStoredChildStylableElements, resetStyleRecursivelyMethods inherited from interface LinkedRequestable
getStoredLinkedObjects, isLinkedTo, isLinkedToAnObjectMethods inherited from interface PresenceRequestable
getPresence, isCollapsed, isInvisible, isVisibleMethods inherited from interface PresenceSettable
setCollapsed, setInvisible, setVisibility, setVisibleMethods inherited from interface Resettable
resetMethods inherited from interface TypeRequestable
getType, isOfConcreteType, isOfConcreteType, isOfType, isOfType
-
Constructor Details
-
AbstractItemMenu
public AbstractItemMenu()
-
-
Method Details
-
addBlankItem
- Specified by:
addBlankItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
addItemWithIdAndText
-
addItemWithIdAndTextAndSelectAction
-
addItemWithIdAndTextAndSelectAction
public final M addItemWithIdAndTextAndSelectAction(String id, String text, Consumer<IItemMenuItem<?>> selectAction) - Specified by:
addItemWithIdAndTextAndSelectActionin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
addItemWithText
-
addItemWithTextAndSelectAction
-
addItemWithTextAndSelectAction
- Specified by:
addItemWithTextAndSelectActionin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
blankItemIsSelected
public final boolean blankItemIsSelected()- Specified by:
blankItemIsSelectedin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
clear
-
containsBlankItem
public final boolean containsBlankItem()- Specified by:
containsBlankItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
containsItemWithId
- Specified by:
containsItemWithIdin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
containsItemWithText
- Specified by:
containsItemWithTextin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
containsSelectedItem
public final boolean containsSelectedItem()- Specified by:
containsSelectedItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
getIdByItemText
-
getStoredChildControls
- Specified by:
getStoredChildControlsin interfaceIControl<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
getStoredItems
- Specified by:
getStoredItemsin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
getStoredSelectedItem
- Specified by:
getStoredSelectedItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
getTextByItemId
-
getUserInput
- Specified by:
getUserInputin interfaceIUserInputCell<M extends IItemMenu<M,S>>
-
hasRole
- Specified by:
hasRolein interfaceIStylableElement<M extends IItemMenu<M,S>> - Parameters:
role-- Returns:
- true if the current
IStylableElementhas the given role, false otherwise.
-
isEmpty
public final boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
removeSelectAction
public final void removeSelectAction()- Specified by:
removeSelectActionin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
runHtmlEvent
- Specified by:
runHtmlEventin interfaceIControl<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
selectBlankItem
- Specified by:
selectBlankItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
selectFirstItem
- Specified by:
selectFirstItemin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
selectItemById
-
selectItemByText
-
setSelectAction
-
setSelectAction
- Specified by:
setSelectActionin interfaceIItemMenu<M extends IItemMenu<M,S>, S extends IItemMenuStyle<S>>
-
setUserInput
- Specified by:
setUserInputin interfaceIUserInputCell<M extends IItemMenu<M,S>>
-