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, 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
See Also:
  • Field Details

    • ATTRIBUTE_JMIX_ROLE_VALUE

      protected static final String ATTRIBUTE_JMIX_ROLE_VALUE
      See Also:
    • buttonItem

      protected JmixMenuItem buttonItem
    • actionSupport

      protected ComboButtonActionSupport actionSupport
    • shortcutRegistration

      protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration
    • shortcutCombination

      protected KeyCombination shortcutCombination
  • Constructor Details

    • ComboButton

      public ComboButton()
  • Method Details

    • initContent

      protected JmixMenuBar initContent()
      Overrides:
      initContent in class com.vaadin.flow.component.Composite<JmixMenuBar>
    • getButtonItem

      protected JmixMenuItem getButtonItem()
    • getDropdownItem

      protected JmixMenuItem getDropdownItem()
      Specified by:
      getDropdownItem in class AbstractDropdownButton
    • setText

      public void setText(String text)
      Specified by:
      setText in interface com.vaadin.flow.component.HasText
    • getText

      public String getText()
      Specified by:
      getText in interface com.vaadin.flow.component.HasText
    • setWhiteSpace

      public void setWhiteSpace(com.vaadin.flow.component.HasText.WhiteSpace value)
      Specified by:
      setWhiteSpace in interface com.vaadin.flow.component.HasText
    • getWhiteSpace

      public com.vaadin.flow.component.HasText.WhiteSpace getWhiteSpace()
      Specified by:
      getWhiteSpace in interface com.vaadin.flow.component.HasText
    • setIcon

      public void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon)
      Specified by:
      setIcon in interface DropdownButtonComponent
    • 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 interface com.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 interface com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.contextmenu.MenuItem>
    • setAction

      public void setAction(@Nullable Action action, boolean overrideComponentProperties)
      Description copied from interface: HasAction
      Sets the action to the component. If overrideComponentProperties is true then the action properties will override component's properties, otherwise the component's properties will be overridden if they are null.

      List of properties that the action and the component have and which can be overridden:

      • text
      • description
      • shortcutCombination
      • enabled
      • visible
      • icon
      • variant
      Specified by:
      setAction in interface HasAction
      Parameters:
      action - an action to set
      overrideComponentProperties - whether action properties override component properties
    • getAction

      @Nullable public Action getAction()
      Specified by:
      getAction in interface HasAction
      Returns:
      an action or null
    • getDropdownIcon

      @Nullable public com.vaadin.flow.component.icon.Icon getDropdownIcon()
    • setDropdownIcon

      public void setDropdownIcon(@Nullable com.vaadin.flow.component.icon.Icon icon)
    • setShortcutCombination

      public void setShortcutCombination(@Nullable KeyCombination shortcutCombination)
      Description copied from interface: HasShortcutCombination
      Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.
      Specified by:
      setShortcutCombination in interface HasShortcutCombination
      Parameters:
      shortcutCombination - key combination to set or null to remove
    • getShortcutCombination

      @Nullable public KeyCombination getShortcutCombination()
      Specified by:
      getShortcutCombination in interface HasShortcutCombination
      Returns:
      object that stores information about keys, modifiers and additional settings that describe shortcut combinations or null if not set
    • addThemeVariants

      public void addThemeVariants(ComboButtonVariant... variants)
    • removeThemeVariants

      public void removeThemeVariants(ComboButtonVariant... variants)
    • getActionSupport

      protected ComboButtonActionSupport getActionSupport()