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.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.Componentprotected 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 JmixMenuItemprotected JmixMenuItem@Nullable Actionprotected ComboButtonActionSupportprotected JmixMenuItem@Nullable com.vaadin.flow.component.ComponentReturns the icon to be displayed in the dropdown area of the component.@Nullable com.vaadin.flow.component.ComponentDeprecated, for removal: This API element is subject to removal in a future version.protected JmixMenuItem@Nullable KeyCombinationgetText()com.vaadin.flow.component.HasText.WhiteSpaceprotected JmixMenuBarvoidSets the action to the component.voidsetDropdownIcon(@Nullable com.vaadin.flow.component.Component icon) Sets the icon to be displayed in the dropdown area of the component.voidsetDropdownIconComponent(@Nullable com.vaadin.flow.component.Component icon) Deprecated, for removal: This API element is subject to removal in a future version.usesetDropdownIcon(Component)insteadvoidsetIconComponent(@Nullable com.vaadin.flow.component.Component icon) Deprecated, for removal: This API element is subject to removal in a future version.voidsetShortcutCombination(@Nullable 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, getIconComponent, getItem, getItems, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getTabIndex, getThemeName, getThemeNames, getWidth, getWidthUnit, hasClassName, hasThemeName, isAttached, isEnabled, isOpenOnHover, remove, remove, remove, removeAll, removeClassName, removeClassNames, removeThemeName, removeThemeNames, setClassName, setClassName, setEnabled, setHeight, setHeight, setHeightFull, setIcon, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpenOnHover, 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, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, 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.Focusable
focusMethods 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.HasEnabled
bindEnabledMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidthMethods inherited from interface com.vaadin.flow.component.HasStyle
bindClassName, bindClassNames, getStyleMethods inherited from interface com.vaadin.flow.component.HasText
bindTextMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
-
Field Details
-
ATTRIBUTE_JMIX_ROLE_VALUE
- See Also:
-
buttonItem
-
dropdownIcon
protected com.vaadin.flow.component.Component dropdownIcon -
actionSupport
-
shortcutRegistration
protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration -
shortcutCombination
-
-
Constructor Details
-
ComboButton
public ComboButton()
-
-
Method Details
-
createButtonItem
-
createDropdownItem
-
initContent
- Overrides:
initContentin classAbstractDropdownButton
-
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
-
setIconComponent
@Deprecated(since="3.0", forRemoval=true) public void setIconComponent(@Nullable com.vaadin.flow.component.Component icon) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DropdownButtonComponentSets the icon for the component.- Specified by:
setIconComponentin 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
public @Nullable com.vaadin.flow.component.Component 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.Component 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
-
getDropdownIconComponent
@Deprecated(since="3.0", forRemoval=true) public @Nullable com.vaadin.flow.component.Component getDropdownIconComponent()Deprecated, for removal: This API element is subject to removal in a future version.usegetDropdownIcon()insteadReturns the component representing the icon displayed in the dropdown area.- Returns:
- the component representing the dropdown icon, or
nullif no icon is set
-
setDropdownIconComponent
@Deprecated(since="3.0", forRemoval=true) public void setDropdownIconComponent(@Nullable com.vaadin.flow.component.Component icon) Deprecated, for removal: This API element is subject to removal in a future version.usesetDropdownIcon(Component)insteadSets 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
-
getDropdownIcon()instead