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
FieldsFields 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, tooltipFields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildItem(HorizontalMenu.AbstractMenuItem<?> menuItem) Adds child menu item.voidaddChildItem(HorizontalMenu.AbstractMenuItem<?> menuItem, int index) Adds child menu item at index.booleanprotected com.vaadin.flow.component.orderedlayout.HorizontalLayoutbooleanisMenu()booleanisOpened()voidRemoves all child items of this parent itemvoidremoveChildItem(int index) Removes child menu item by index.voidremoveChildItem(HorizontalMenu.AbstractMenuItem<?> menuItem) Removes child menu item.voidsetOpened(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, updateContentMethods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItemMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods 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:
initContentin classHorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
-
isOpened
public boolean isOpened()- Specified by:
isOpenedin interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>- Returns:
- true/false if the item is opened/closed
-
setOpened
public void setOpened(boolean opened) Description copied from interface:ParentMenuItemSets the opened status of the item.- Specified by:
setOpenedin 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:ParentMenuItemRemoves all child items of this parent item- Specified by:
removeAllChildItemsin interfaceParentMenuItem<HorizontalMenu.AbstractMenuItem<?>>
-
getChildItems
- Specified by:
getChildItemsin 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:
isMenuin classHorizontalMenu.AbstractMenuItem<com.vaadin.flow.component.orderedlayout.HorizontalLayout>- Returns:
- true if the item can contain other items, false otherwise
- See Also:
-