Class ComboButton
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<JmixMenuBar>
io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
io.jmix.flowui.kit.component.combobutton.ComboButton
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<AbstractDropdownButton>
,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<AbstractDropdownButton>
,com.vaadin.flow.component.FocusNotifier<AbstractDropdownButton>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasText
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.shared.HasOverlayClassName
,com.vaadin.flow.component.shared.HasThemeVariant<ComboButtonVariant>
,DropdownButtonComponent
,HasAction
,HasShortcutCombination
,HasSubParts
,HasTitle
,Serializable
public class ComboButton
extends AbstractDropdownButton
implements com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>, HasAction, HasShortcutCombination, com.vaadin.flow.component.shared.HasThemeVariant<ComboButtonVariant>
ComboButton is a UI component that provides a combination of a button and a dropdown menu,
allowing users to trigger an action or open a menu of options.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
AbstractDropdownButton.AbstractDropdownButtonItem, AbstractDropdownButton.ActionItemImpl, AbstractDropdownButton.ComponentItemImpl, AbstractDropdownButton.HasMenuItem, AbstractDropdownButton.MenuItemProvider<T>, AbstractDropdownButton.TextItemImpl
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>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ComboButtonActionSupport
protected static final String
protected JmixMenuItem
protected com.vaadin.flow.component.icon.Icon
protected KeyCombination
protected com.vaadin.flow.component.ShortcutRegistration
Fields inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
ATTRIBUTE_JMIX_ROLE_NAME, dropdownItem, iconComponent, items
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
addClickListener
(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> listener) com.vaadin.flow.component.ShortcutRegistration
addClickShortcut
(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers) protected ComboButtonActionSupport
protected JmixMenuItem
com.vaadin.flow.component.icon.Icon
Returns the icon to be displayed in the dropdown area of the component.protected JmixMenuItem
getText()
com.vaadin.flow.component.HasText.WhiteSpace
protected JmixMenuBar
void
Sets the action to the component.void
setDropdownIcon
(com.vaadin.flow.component.icon.Icon icon) Sets the icon to be displayed in the dropdown area of the component.void
setIcon
(com.vaadin.flow.component.icon.Icon icon) Sets the icon for the component.void
setShortcutCombination
(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.void
void
setWhiteSpace
(com.vaadin.flow.component.HasText.WhiteSpace value) protected void
Methods inherited from class io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
addAttachListener, addClassName, addClassNames, addDetachListener, addFocusShortcut, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItemInternal, addSeparator, addSeparatorAtIndex, addThemeName, addThemeNames, blur, createComponentMenuItem, createTextMenuItem, focus, getClassName, getClassNames, getHeight, getHeightUnit, getIcon, getItem, getItems, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverlayClassName, getTabIndex, getThemeName, getThemeNames, getWidth, getWidthUnit, hasClassName, hasThemeName, isAttached, isEnabled, isOpenOnHover, remove, remove, remove, removeAll, removeClassName, removeClassNames, removeThemeName, removeThemeNames, setClassName, setClassName, setEnabled, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpenOnHover, setOverlayClassName, setSizeFull, setSizeUndefined, setTabIndex, setThemeName, setThemeName, setWidth, setWidth, setWidthFull
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, 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.BlurNotifier
addBlurListener
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addDoubleClickListener, addSingleClickListener
Methods inherited from interface io.jmix.flowui.kit.component.dropdownbutton.DropdownButtonComponent
getSubPart
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.HasStyle
getStyle
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
-
Field Details
-
ATTRIBUTE_JMIX_ROLE_VALUE
- See Also:
-
buttonItem
-
dropdownIcon
protected com.vaadin.flow.component.icon.Icon dropdownIcon -
actionSupport
-
shortcutRegistration
protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration -
shortcutCombination
-
-
Constructor Details
-
ComboButton
public ComboButton()
-
-
Method Details
-
initContent
- Overrides:
initContent
in classcom.vaadin.flow.component.Composite<JmixMenuBar>
-
getButtonItem
-
getDropdownItem
- Specified by:
getDropdownItem
in classAbstractDropdownButton
-
setText
- Specified by:
setText
in interfacecom.vaadin.flow.component.HasText
-
getText
- Specified by:
getText
in interfacecom.vaadin.flow.component.HasText
-
setWhiteSpace
public void setWhiteSpace(com.vaadin.flow.component.HasText.WhiteSpace value) - Specified by:
setWhiteSpace
in interfacecom.vaadin.flow.component.HasText
-
getWhiteSpace
public com.vaadin.flow.component.HasText.WhiteSpace getWhiteSpace()- Specified by:
getWhiteSpace
in interfacecom.vaadin.flow.component.HasText
-
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Description copied from interface:DropdownButtonComponent
Sets the icon for the component.- Specified by:
setIcon
in interfaceDropdownButtonComponent
- Parameters:
icon
- the icon to set. Can benull
to clear the current icon.
-
updateIconSlot
protected void updateIconSlot() -
addClickListener
public com.vaadin.flow.shared.Registration addClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> listener) - Specified by:
addClickListener
in interfacecom.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>
-
addClickShortcut
public com.vaadin.flow.component.ShortcutRegistration addClickShortcut(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers) - Specified by:
addClickShortcut
in interfacecom.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>
-
setAction
Description copied from interface:HasAction
Sets the action to the component. IfoverrideComponentProperties
istrue
then the action properties will override component's properties, otherwise the component's properties will be overridden if they arenull
.List of properties that the action and the component have and which can be overridden:
text
description
shortcutCombination
enabled
visible
icon
variant
-
getAction
-
getDropdownIcon
@Nullable public com.vaadin.flow.component.icon.Icon getDropdownIcon()Returns the icon to be displayed in the dropdown area of the component.- Returns:
- the icon to be displayed in the dropdown area of the component
-
setDropdownIcon
public void setDropdownIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Sets the icon to be displayed in the dropdown area of the component.- Parameters:
icon
- the icon to be set, ornull
to remove the dropdown icon
-
setShortcutCombination
Description copied from interface:HasShortcutCombination
Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Specified by:
setShortcutCombination
in interfaceHasShortcutCombination
- Parameters:
shortcutCombination
- key combination to set ornull
to remove
-
getShortcutCombination
- Specified by:
getShortcutCombination
in interfaceHasShortcutCombination
- Returns:
- object that stores information about keys, modifiers and additional
settings that describe shortcut combinations or
null
if not set
-
getActionSupport
-