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.SeparatorUserMenuItem, AbstractDropdownButton.TextItemImplNested 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 ComboButtonActionSupportprotected static final Stringprotected JmixMenuItemprotected com.vaadin.flow.component.icon.Iconprotected KeyCombinationprotected com.vaadin.flow.component.ShortcutRegistrationFields 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.RegistrationaddClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> listener) com.vaadin.flow.component.ShortcutRegistrationaddClickShortcut(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers) protected ComboButtonActionSupportprotected JmixMenuItemcom.vaadin.flow.component.icon.IconReturns the icon to be displayed in the dropdown area of the component.protected JmixMenuItemgetText()com.vaadin.flow.component.HasText.WhiteSpaceprotected JmixMenuBarvoidSets the action to the component.voidsetDropdownIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon to be displayed in the dropdown area of the component.voidsetIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon for the component.voidsetShortcutCombination(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.voidvoidsetWhiteSpace(com.vaadin.flow.component.HasText.WhiteSpace value) protected voidMethods 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, setWidthFullMethods 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, 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.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addDoubleClickListener, addSingleClickListenerMethods inherited from interface io.jmix.flowui.kit.component.dropdownbutton.DropdownButtonComponent
getSubPartMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasStyle
getStyleMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods 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:
initContentin classcom.vaadin.flow.component.Composite<JmixMenuBar>
-
getButtonItem
-
getDropdownItem
- Specified by:
getDropdownItemin classAbstractDropdownButton
-
setText
- Specified by:
setTextin interfacecom.vaadin.flow.component.HasText
-
getText
- Specified by:
getTextin interfacecom.vaadin.flow.component.HasText
-
setWhiteSpace
public void setWhiteSpace(com.vaadin.flow.component.HasText.WhiteSpace value) - Specified by:
setWhiteSpacein interfacecom.vaadin.flow.component.HasText
-
getWhiteSpace
public com.vaadin.flow.component.HasText.WhiteSpace getWhiteSpace()- Specified by:
getWhiteSpacein interfacecom.vaadin.flow.component.HasText
-
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Description copied from interface:DropdownButtonComponentSets the icon for the component.- Specified by:
setIconin interfaceDropdownButtonComponent- Parameters:
icon- the icon to set. Can benullto 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:
addClickListenerin 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:
addClickShortcutin interfacecom.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>
-
setAction
Description copied from interface:HasActionSets the action to the component. IfoverrideComponentPropertiesistruethen 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:
textdescriptionshortcutCombinationenabledvisibleiconvariant
-
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, ornullto remove the dropdown icon
-
setShortcutCombination
Description copied from interface:HasShortcutCombinationSets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Specified by:
setShortcutCombinationin interfaceHasShortcutCombination- Parameters:
shortcutCombination- key combination to set ornullto remove
-
getShortcutCombination
- Specified by:
getShortcutCombinationin interfaceHasShortcutCombination- Returns:
- object that stores information about keys, modifiers and additional
settings that describe shortcut combinations or
nullif not set
-
getActionSupport
-