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 ValuePickerButtonActionSupportprotected com.vaadin.flow.component.Componentprotected KeyCombinationprotected com.vaadin.flow.component.ShortcutRegistration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(com.vaadin.flow.component.Component component) protected ValuePickerButtonActionSupportprotected ValuePickerButtonActionSupportcom.vaadin.flow.component.ComponentgetIcon()Returns the icon component associated with this instance.protected voidremove(com.vaadin.flow.component.Component component) voidSets the action to the component.voidsetIcon(com.vaadin.flow.component.Component 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.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, 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.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods 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
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods 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: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
-
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:
getShortcutCombinationin interfaceHasShortcutCombination- Returns:
- object that stores information about keys, modifiers and additional
settings that describe shortcut combinations or
nullif not set
-
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
-