Class AbstractDropdownButton.AbstractDropdownButtonItem

java.lang.Object
io.jmix.flowui.kit.component.dropdownbutton.AbstractDropdownButton.AbstractDropdownButtonItem
All Implemented Interfaces:
AbstractDropdownButton.HasMenuItem, DropdownButtonItem
Direct Known Subclasses:
AbstractDropdownButton.ActionItemImpl, AbstractDropdownButton.ComponentItemImpl, AbstractDropdownButton.TextItemImpl
Enclosing class:
AbstractDropdownButton

protected abstract static class AbstractDropdownButton.AbstractDropdownButtonItem extends Object implements AbstractDropdownButton.HasMenuItem, DropdownButtonItem
  • Field Details

    • id

      protected String id
    • item

      protected com.vaadin.flow.component.contextmenu.MenuItem item
    • parent

      protected DropdownButtonComponent parent
  • Constructor Details

    • AbstractDropdownButtonItem

      public AbstractDropdownButtonItem(String id, com.vaadin.flow.component.contextmenu.MenuItem item, DropdownButtonComponent parent)
  • Method Details

    • getId

      public String getId()
      Description copied from interface: DropdownButtonItem
      Returns the unique identifier of the dropdown button item.
      Specified by:
      getId in interface DropdownButtonItem
      Returns:
      the identifier of the item as a string, or null if not set
    • setItem

      public void setItem(com.vaadin.flow.component.contextmenu.MenuItem item)
      Specified by:
      setItem in interface AbstractDropdownButton.HasMenuItem
    • getItem

      public com.vaadin.flow.component.contextmenu.MenuItem getItem()
      Specified by:
      getItem in interface AbstractDropdownButton.HasMenuItem
    • getParent

      public DropdownButtonComponent getParent()
      Description copied from interface: DropdownButtonItem
      Returns the parent dropdown button component to which this item belongs.
      Specified by:
      getParent in interface DropdownButtonItem
      Returns:
      the parent DropdownButtonComponent of this item
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: DropdownButtonItem
      Sets the visibility of the dropdown button item. A visible item is rendered and can interact with users, while an invisible item is not displayed and cannot be interacted with.
      Specified by:
      setVisible in interface DropdownButtonItem
      Parameters:
      visible - if true, the item will be visible; otherwise, it will be hidden
    • isVisible

      public boolean isVisible()
      Description copied from interface: DropdownButtonItem
      Checks whether the dropdown button item is currently visible. A visible item is displayed in the dropdown and can interact with users, whereas an invisible item is hidden and cannot be interacted with.
      Specified by:
      isVisible in interface DropdownButtonItem
      Returns:
      true if the item is visible, false otherwise
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from interface: DropdownButtonItem
      Enables or disables the dropdown button item. When the item is disabled, it cannot be interacted with.
      Specified by:
      setEnabled in interface DropdownButtonItem
      Parameters:
      enabled - if true, the item will be enabled; otherwise, it will be disabled
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: DropdownButtonItem
      Checks whether the dropdown button item is currently enabled. An enabled item can be interacted with, whereas a disabled item cannot.
      Specified by:
      isEnabled in interface DropdownButtonItem
      Returns:
      true if the item is enabled, false otherwise
    • addClickListener

      public com.vaadin.flow.shared.Registration addClickListener(Consumer<DropdownButtonItem.ClickEvent> listener)
      Description copied from interface: DropdownButtonItem
      Adds a listener to handle click events for the dropdown button item. When the item is clicked, the provided Consumer processes the associated DropdownButtonItem.ClickEvent.
      Specified by:
      addClickListener in interface DropdownButtonItem
      Parameters:
      listener - the Consumer to handle the DropdownButtonItem.ClickEvent triggered by a click on the item
      Returns:
      a Registration object that can be used to remove the added listener
    • internalRemoveDropdownButtonItemClickListener

      protected void internalRemoveDropdownButtonItemClickListener(Consumer<DropdownButtonItem.ClickEvent> listener)
    • getEventBus

      protected EventBus getEventBus()