Class JmixMenuBar
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.menubar.MenuBar
io.jmix.flowui.kit.component.menubar.JmixMenuBar
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<JmixMenuBar>
,com.vaadin.flow.component.contextmenu.HasMenuItems
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<JmixMenuBar>
,com.vaadin.flow.component.FocusNotifier<JmixMenuBar>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.shared.HasOverlayClassName
,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.menubar.MenuBarVariant>
,com.vaadin.flow.component.shared.HasTooltip
,HasMenuItemsEnhanced
,Serializable
public class JmixMenuBar
extends com.vaadin.flow.component.menubar.MenuBar
implements HasMenuItemsEnhanced, com.vaadin.flow.component.Focusable<JmixMenuBar>, com.vaadin.flow.component.shared.HasTooltip
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.menubar.MenuBar
com.vaadin.flow.component.menubar.MenuBar.MenuBarI18n
Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.component.contextmenu.MenuItemsArrayGenerator<com.vaadin.flow.component.contextmenu.MenuItem>
protected JmixMenuManager<com.vaadin.flow.component.menubar.MenuBar,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu> protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItem
(com.vaadin.flow.component.Component component) Adds a new item component with the given component to the context menu overlay.addItem
(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given component and click listener to the context menu overlay.Adds a new item component with the given text content to the context menu overlay.addItem
(String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given text content and click listener to the context menu overlay.addItemAtIndex
(int index, com.vaadin.flow.component.Component component) Adds a new item component with the given component at the given position to the context menu overlay.addItemAtIndex
(int index, com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given component and click listener at the given position to the context menu overlay.addItemAtIndex
(int index, String text) Adds a new item component with the given text content at the given position to the context menu overlay.addItemAtIndex
(int index, String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given text content and click listener at the given position to the context menu overlay.protected void
attachListener
(com.vaadin.flow.component.AttachEvent attachEvent) Stream<com.vaadin.flow.component.Component>
List<com.vaadin.flow.component.contextmenu.MenuItem>
getItems()
protected void
protected void
initConnector
(String appId) void
remove
(com.vaadin.flow.component.contextmenu.MenuItem... items) void
protected void
protected void
runBeforeClientResponse
(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.UI> command) protected void
Methods inherited from class com.vaadin.flow.component.menubar.MenuBar
addItem, addItem, addItem, addItem, close, getI18n, isOpenOnHover, isReverseCollapseOrder, isTabNavigation, onAttach, setI18n, setOpenOnHover, setReverseCollapseOrder, setTabNavigation, setTooltipText
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, 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.BlurNotifier
addBlurListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.component.shared.HasOverlayClassName
getOverlayClassName, setOverlayClassName
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Field Details
-
updateScheduled
protected boolean updateScheduled
-
Constructor Details
-
JmixMenuBar
public JmixMenuBar()
-
-
Method Details
-
initComponent
protected void initComponent() -
addItem
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content to the context menu overlay.- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.menubar.MenuBar
- Parameters:
text
- the text content for the new item- Returns:
- the added
JmixMenuItem
component
-
addItem
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component to the context menu overlay.- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.menubar.MenuBar
- Parameters:
component
- the component inside the new item- Returns:
- the added
JmixMenuItem
component
-
addItem
public JmixMenuItem addItem(String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content and click listener to the context menu overlay.- Specified by:
addItem
in interfacecom.vaadin.flow.component.contextmenu.HasMenuItems
- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.menubar.MenuBar
- Parameters:
text
- the text content for the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItem
public JmixMenuItem addItem(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component and click listener to the context menu overlay.- Specified by:
addItem
in interfacecom.vaadin.flow.component.contextmenu.HasMenuItems
- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.menubar.MenuBar
- Parameters:
component
- the component inside the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positiontext
- the text content for the new item- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positioncomponent
- the component inside the new item- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
public JmixMenuItem addItemAtIndex(int index, String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content and click listener at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positiontext
- the text content for the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
public JmixMenuItem addItemAtIndex(int index, com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component and click listener at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positioncomponent
- the component inside the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
getItems
- Overrides:
getItems
in classcom.vaadin.flow.component.menubar.MenuBar
-
removeAll
public void removeAll()- Overrides:
removeAll
in classcom.vaadin.flow.component.menubar.MenuBar
-
getChildren
- Overrides:
getChildren
in classcom.vaadin.flow.component.menubar.MenuBar
-
resetContent
protected void resetContent() -
updateButtons
protected void updateButtons() -
attachListener
protected void attachListener(com.vaadin.flow.component.AttachEvent attachEvent) -
initConnector
-
runBeforeClientResponse
protected void runBeforeClientResponse(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.UI> command)
-