Class AbstractDropdownButton

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<JmixMenuBar>
io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<AbstractDropdownButton>, 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, HasSubParts, HasTitle, Serializable
Direct Known Subclasses:
ComboButton, DropdownButton

public abstract class AbstractDropdownButton extends com.vaadin.flow.component.Composite<JmixMenuBar> implements DropdownButtonComponent, com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, HasTitle, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.shared.HasOverlayClassName, com.vaadin.flow.component.HasText, com.vaadin.flow.component.Focusable<AbstractDropdownButton>
See Also:
  • Field Details

  • Constructor Details

    • AbstractDropdownButton

      public AbstractDropdownButton()
  • Method Details

    • getDropdownItem

      protected abstract JmixMenuItem getDropdownItem()
    • addItem

      public DropdownButtonItem addItem(String id, Action action)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, Action action, int index)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, String text)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, String text, int index)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, String text, Consumer<DropdownButtonItem.ClickEvent> componentEventListener)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, String text, Consumer<DropdownButtonItem.ClickEvent> componentEventListener, int index)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, com.vaadin.flow.component.Component component)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, com.vaadin.flow.component.Component component, int index)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, com.vaadin.flow.component.Component component, Consumer<DropdownButtonItem.ClickEvent> componentEventListener)
      Specified by:
      addItem in interface DropdownButtonComponent
    • addItem

      public DropdownButtonItem addItem(String id, com.vaadin.flow.component.Component component, Consumer<DropdownButtonItem.ClickEvent> componentEventListener, int index)
      Specified by:
      addItem in interface DropdownButtonComponent
    • createComponentMenuItem

      protected com.vaadin.flow.component.contextmenu.MenuItem createComponentMenuItem(String id, com.vaadin.flow.component.Component content, int index)
    • createTextMenuItem

      protected com.vaadin.flow.component.contextmenu.MenuItem createTextMenuItem(String id, String text, int index)
    • addItemInternal

      protected void addItemInternal(AbstractDropdownButton.HasMenuItem item, int index)
    • getItem

      @Nullable public DropdownButtonItem getItem(String itemId)
      Specified by:
      getItem in interface DropdownButtonComponent
    • getItems

      public List<DropdownButtonItem> getItems()
      Specified by:
      getItems in interface DropdownButtonComponent
    • remove

      public void remove(String itemId)
      Specified by:
      remove in interface DropdownButtonComponent
    • remove

      public void remove(DropdownButtonItem item)
      Specified by:
      remove in interface DropdownButtonComponent
    • remove

      public void remove(DropdownButtonItem... items)
      Specified by:
      remove in interface DropdownButtonComponent
    • removeAll

      public void removeAll()
      Specified by:
      removeAll in interface DropdownButtonComponent
    • addSeparator

      public void addSeparator()
      Specified by:
      addSeparator in interface DropdownButtonComponent
    • addSeparatorAtIndex

      public void addSeparatorAtIndex(int index)
      Specified by:
      addSeparatorAtIndex in interface DropdownButtonComponent
    • addAttachListener

      public com.vaadin.flow.shared.Registration addAttachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.AttachEvent> listener)
      Specified by:
      addAttachListener in interface com.vaadin.flow.component.AttachNotifier
    • isAttached

      public boolean isAttached()
      Overrides:
      isAttached in class com.vaadin.flow.component.Component
    • addDetachListener

      public com.vaadin.flow.shared.Registration addDetachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.DetachEvent> listener)
      Specified by:
      addDetachListener in interface com.vaadin.flow.component.DetachNotifier
    • getIcon

      @Nullable public com.vaadin.flow.component.icon.Icon getIcon()
      Specified by:
      getIcon in interface DropdownButtonComponent
    • setClassName

      public void setClassName(String className)
      Specified by:
      setClassName in interface com.vaadin.flow.component.HasStyle
    • setClassName

      public void setClassName(String className, boolean set)
      Specified by:
      setClassName in interface com.vaadin.flow.component.HasStyle
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface com.vaadin.flow.component.HasStyle
    • addClassName

      public void addClassName(String className)
      Specified by:
      addClassName in interface com.vaadin.flow.component.HasStyle
    • removeClassName

      public boolean removeClassName(String className)
      Specified by:
      removeClassName in interface com.vaadin.flow.component.HasStyle
    • getClassNames

      public com.vaadin.flow.dom.ClassList getClassNames()
      Specified by:
      getClassNames in interface com.vaadin.flow.component.HasStyle
    • addClassNames

      public void addClassNames(String... classNames)
      Specified by:
      addClassNames in interface com.vaadin.flow.component.HasStyle
    • removeClassNames

      public void removeClassNames(String... classNames)
      Specified by:
      removeClassNames in interface com.vaadin.flow.component.HasStyle
    • hasClassName

      public boolean hasClassName(String className)
      Specified by:
      hasClassName in interface com.vaadin.flow.component.HasStyle
    • getOverlayClassName

      public String getOverlayClassName()
      Specified by:
      getOverlayClassName in interface com.vaadin.flow.component.shared.HasOverlayClassName
    • setOverlayClassName

      public void setOverlayClassName(String overlayClassName)
      Specified by:
      setOverlayClassName in interface com.vaadin.flow.component.shared.HasOverlayClassName
    • setThemeName

      public void setThemeName(String themeName)
      Specified by:
      setThemeName in interface com.vaadin.flow.component.HasTheme
    • setThemeName

      public void setThemeName(String themeName, boolean set)
      Specified by:
      setThemeName in interface com.vaadin.flow.component.HasTheme
    • getThemeName

      public String getThemeName()
      Specified by:
      getThemeName in interface com.vaadin.flow.component.HasTheme
    • addThemeName

      public void addThemeName(String themeName)
      Specified by:
      addThemeName in interface com.vaadin.flow.component.HasTheme
    • removeThemeName

      public boolean removeThemeName(String themeName)
      Specified by:
      removeThemeName in interface com.vaadin.flow.component.HasTheme
    • hasThemeName

      public boolean hasThemeName(String themeName)
      Specified by:
      hasThemeName in interface com.vaadin.flow.component.HasTheme
    • getThemeNames

      public com.vaadin.flow.dom.ThemeList getThemeNames()
      Specified by:
      getThemeNames in interface com.vaadin.flow.component.HasTheme
    • addThemeNames

      public void addThemeNames(String... themeNames)
      Specified by:
      addThemeNames in interface com.vaadin.flow.component.HasTheme
    • removeThemeNames

      public void removeThemeNames(String... themeNames)
      Specified by:
      removeThemeNames in interface com.vaadin.flow.component.HasTheme
    • setOpenOnHover

      public void setOpenOnHover(boolean openOnHover)
      Specified by:
      setOpenOnHover in interface DropdownButtonComponent
    • isOpenOnHover

      public boolean isOpenOnHover()
      Specified by:
      isOpenOnHover in interface DropdownButtonComponent
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface com.vaadin.flow.component.HasEnabled
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface com.vaadin.flow.component.HasEnabled
    • setTabIndex

      public void setTabIndex(int tabIndex)
      Specified by:
      setTabIndex in interface com.vaadin.flow.component.Focusable<AbstractDropdownButton>
    • getTabIndex

      public int getTabIndex()
      Specified by:
      getTabIndex in interface com.vaadin.flow.component.Focusable<AbstractDropdownButton>
    • focus

      public void focus()
      Specified by:
      focus in interface com.vaadin.flow.component.Focusable<AbstractDropdownButton>
    • blur

      public void blur()
      Specified by:
      blur in interface com.vaadin.flow.component.Focusable<AbstractDropdownButton>
    • addFocusShortcut

      public com.vaadin.flow.component.ShortcutRegistration addFocusShortcut(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers)
      Specified by:
      addFocusShortcut in interface com.vaadin.flow.component.Focusable<AbstractDropdownButton>
    • setWidth

      public void setWidth(String width)
      Specified by:
      setWidth in interface com.vaadin.flow.component.HasSize
    • setWidth

      public void setWidth(float width, com.vaadin.flow.component.Unit unit)
      Specified by:
      setWidth in interface com.vaadin.flow.component.HasSize
    • setMinWidth

      public void setMinWidth(String minWidth)
      Specified by:
      setMinWidth in interface com.vaadin.flow.component.HasSize
    • setMinWidth

      public void setMinWidth(float minWidth, com.vaadin.flow.component.Unit unit)
      Specified by:
      setMinWidth in interface com.vaadin.flow.component.HasSize
    • setMaxWidth

      public void setMaxWidth(String maxWidth)
      Specified by:
      setMaxWidth in interface com.vaadin.flow.component.HasSize
    • setMaxWidth

      public void setMaxWidth(float maxWidth, com.vaadin.flow.component.Unit unit)
      Specified by:
      setMaxWidth in interface com.vaadin.flow.component.HasSize
    • getWidth

      public String getWidth()
      Specified by:
      getWidth in interface com.vaadin.flow.component.HasSize
    • getMinWidth

      public String getMinWidth()
      Specified by:
      getMinWidth in interface com.vaadin.flow.component.HasSize
    • getMaxWidth

      public String getMaxWidth()
      Specified by:
      getMaxWidth in interface com.vaadin.flow.component.HasSize
    • getWidthUnit

      public Optional<com.vaadin.flow.component.Unit> getWidthUnit()
      Specified by:
      getWidthUnit in interface com.vaadin.flow.component.HasSize
    • setHeight

      public void setHeight(String height)
      Specified by:
      setHeight in interface com.vaadin.flow.component.HasSize
    • setHeight

      public void setHeight(float height, com.vaadin.flow.component.Unit unit)
      Specified by:
      setHeight in interface com.vaadin.flow.component.HasSize
    • setMinHeight

      public void setMinHeight(String minHeight)
      Specified by:
      setMinHeight in interface com.vaadin.flow.component.HasSize
    • setMinHeight

      public void setMinHeight(float minHeight, com.vaadin.flow.component.Unit unit)
      Specified by:
      setMinHeight in interface com.vaadin.flow.component.HasSize
    • setMaxHeight

      public void setMaxHeight(String maxHeight)
      Specified by:
      setMaxHeight in interface com.vaadin.flow.component.HasSize
    • setMaxHeight

      public void setMaxHeight(float maxHeight, com.vaadin.flow.component.Unit unit)
      Specified by:
      setMaxHeight in interface com.vaadin.flow.component.HasSize
    • getHeight

      public String getHeight()
      Specified by:
      getHeight in interface com.vaadin.flow.component.HasSize
    • getMinHeight

      public String getMinHeight()
      Specified by:
      getMinHeight in interface com.vaadin.flow.component.HasSize
    • getMaxHeight

      public String getMaxHeight()
      Specified by:
      getMaxHeight in interface com.vaadin.flow.component.HasSize
    • getHeightUnit

      public Optional<com.vaadin.flow.component.Unit> getHeightUnit()
      Specified by:
      getHeightUnit in interface com.vaadin.flow.component.HasSize
    • setSizeFull

      public void setSizeFull()
      Specified by:
      setSizeFull in interface com.vaadin.flow.component.HasSize
    • setWidthFull

      public void setWidthFull()
      Specified by:
      setWidthFull in interface com.vaadin.flow.component.HasSize
    • setHeightFull

      public void setHeightFull()
      Specified by:
      setHeightFull in interface com.vaadin.flow.component.HasSize
    • setSizeUndefined

      public void setSizeUndefined()
      Specified by:
      setSizeUndefined in interface com.vaadin.flow.component.HasSize