Class DropdownButton

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.dropdownbutton.DropdownButton
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, com.vaadin.flow.component.shared.HasThemeVariant<DropdownButtonVariant>, DropdownButtonComponent, HasSubParts, HasTitle, Serializable

public class DropdownButton extends AbstractDropdownButton implements com.vaadin.flow.component.shared.HasThemeVariant<DropdownButtonVariant>
Represents a dropdown button component. This class is used as a customizable button with an associated dropdown menu.
See Also:
  • Field Details

    • ATTRIBUTE_JMIX_ROLE_VALUE

      protected static final String ATTRIBUTE_JMIX_ROLE_VALUE
      See Also:
  • Constructor Details

    • DropdownButton

      public DropdownButton()
  • Method Details

    • initContent

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

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

      protected void updateDropdownIconSlot()
    • 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)
      Description copied from interface: DropdownButtonComponent
      Sets the icon for the component.
      Specified by:
      setIcon in interface DropdownButtonComponent
      Parameters:
      icon - the icon to set. Can be null to clear the current icon.
    • isDropdownIndicatorVisible

      public boolean isDropdownIndicatorVisible()
      Returns whether if the dropdown indicator is currently visible.
      Returns:
      true if the dropdown indicator is visible, false otherwise
    • setDropdownIndicatorVisible

      public void setDropdownIndicatorVisible(boolean dropdownIndicatorVisible)
      Sets the visibility of the dropdown indicator.
      Parameters:
      dropdownIndicatorVisible - true to display the indicator, or false to hide it.
    • updateIconSlot

      protected void updateIconSlot()