Class HorizontalMenu.ParentMenuItem
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.ParentMenuItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.shared.HasPrefix
,com.vaadin.flow.component.shared.HasSuffix
,com.vaadin.flow.component.shared.HasTooltip
,MenuItem
,ParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
,Serializable
- Enclosing class:
- HorizontalMenu
public static class HorizontalMenu.ParentMenuItem
extends HorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
implements ParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
Represents menu item that can contain other menu items.
- See Also:
-
Field Summary
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
CONTENT_ITEM_CLASS_NAME, PREFIX_COMPONENT_CLASS_NAME, prefixComponent, PREFIXED_ATTRIBUTE_NAME, SUFFIX_COMPONENT_CLASS_NAME, suffixComponent, SUFFIXED_ATTRIBUTE_NAME, TEXT_COMPONENT_CLASS_NAME, textComponent, tooltip
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildItem
(HorizontalMenu.AbstractMenuItem<?> menuItem) Adds child menu item.void
addChildItem
(HorizontalMenu.AbstractMenuItem<?> menuItem, int index) Adds child menu item at index.boolean
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout
boolean
isMenu()
boolean
isOpened()
void
Removes all child items of this parent itemvoid
removeChildItem
(int index) Removes child menu item by index.void
removeChildItem
(HorizontalMenu.AbstractMenuItem<?> menuItem) Removes child menu item.void
setOpened
(boolean opened) Sets the opened status of the item.Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
getPrefixComponent, getSuffixComponent, getTitle, getTooltip, getTooltipInternal, setPrefixComponent, setPrefixComponentInternal, setPrefixedAttribute, setSuffixComponent, setSuffixComponentInternal, setSuffixedAttribute, setTextComponentInternal, setTitle, setTooltipText, updateContent
Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItem
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
children
-
-
Constructor Details
-
ParentMenuItem
public ParentMenuItem() -
ParentMenuItem
-
-
Method Details
-
initContent
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout initContent()- Overrides:
initContent
in classHorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
-
isOpened
public boolean isOpened()- Specified by:
isOpened
in interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
- Returns:
- true/false if the item is opened/closed
-
setOpened
public void setOpened(boolean opened) Description copied from interface:ParentMenuItem
Sets the opened status of the item.- Specified by:
setOpened
in interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
- Parameters:
opened
- true/false to open/close the item
-
removeChildItem
public void removeChildItem(int index) Removes child menu item by index.- Parameters:
index
- index of an item to remove
-
removeAllChildItems
public void removeAllChildItems()Description copied from interface:ParentMenuItem
Removes all child items of this parent item- Specified by:
removeAllChildItems
in interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
-
getChildItems
- Specified by:
getChildItems
in interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
- Returns:
- child items of this parent item
-
hasChildren
public boolean hasChildren()- Returns:
- true if the item contains child items, false otherwise
-
isMenu
public boolean isMenu()- Overrides:
isMenu
in classHorizontalMenu.AbstractMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
- Returns:
- true if the item can contain other items, false otherwise
- See Also:
-