Class ValuePickerButton
java.lang.Object
com.vaadin.flow.component.Component
io.jmix.flowui.kit.component.valuepicker.ValuePickerButton
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<ValuePickerButton>
,com.vaadin.flow.component.ClickNotifier<ValuePickerButton>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<ValuePickerButton>
,com.vaadin.flow.component.FocusNotifier<ValuePickerButton>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,HasAction
,HasShortcutCombination
,HasTitle
,Serializable
@Tag("jmix-value-picker-button")
@JsModule("./src/value-picker-button/jmix-value-picker-button.js")
public class ValuePickerButton
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.ClickNotifier<ValuePickerButton>, com.vaadin.flow.component.Focusable<ValuePickerButton>, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, HasTitle, HasAction, HasShortcutCombination
Represents a button component that supports integration with actions, handling of
shortcut keys, and customizable visual appearance, including an icon.
This component is primarily designed to be used with ValuePicker
component.
- See Also:
-
Nested Class Summary
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 ValuePickerButtonActionSupport
protected com.vaadin.flow.component.Component
protected KeyCombination
protected com.vaadin.flow.component.ShortcutRegistration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(com.vaadin.flow.component.Component component) protected ValuePickerButtonActionSupport
protected ValuePickerButtonActionSupport
com.vaadin.flow.component.Component
getIcon()
Returns the icon component associated with this instance.protected void
remove
(com.vaadin.flow.component.Component component) void
Sets the action to the component.void
setIcon
(com.vaadin.flow.component.Component 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.Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, 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, 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.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener
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.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
-
Field Details
-
actionSupport
-
iconComponent
protected com.vaadin.flow.component.Component iconComponent -
shortcutRegistration
protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration -
shortcutCombination
-
-
Constructor Details
-
ValuePickerButton
public ValuePickerButton()
-
-
Method Details
-
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
-
getActionSupport
-
createActionSupport
-
getIcon
public com.vaadin.flow.component.Component getIcon()Returns the icon component associated with this instance.- Returns:
- the icon component
- Throws:
IllegalStateException
- if no icon component is set
-
setIcon
public void setIcon(com.vaadin.flow.component.Component icon) Sets the icon for the component. The provided icon must be a valid component and cannot be a text node. If an icon is already set, it will be replaced with the new one.- Parameters:
icon
- the component to be used as an icon; must not be null- Throws:
NullPointerException
- if the icon is nullIllegalArgumentException
- if the icon is a text node
-
add
protected void add(com.vaadin.flow.component.Component component) -
remove
protected void remove(com.vaadin.flow.component.Component component) -
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
-
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
-