Class ValuePickerButtonActionSupport

java.lang.Object
io.jmix.flowui.kit.component.valuepicker.ValuePickerButtonActionSupport

public class ValuePickerButtonActionSupport extends Object
Provides support for associating and managing an Action with a ValuePickerButton. This class handles updating the button's properties (such as title, icon, and visibility) based on the associated action, and facilitates event registration and cleanup.
  • Field Details

    • button

      protected final ValuePickerButton button
    • action

      protected Action action
    • registration

      protected com.vaadin.flow.shared.Registration registration
    • actionPropertyChangeRegistration

      protected com.vaadin.flow.shared.Registration actionPropertyChangeRegistration
  • Constructor Details

    • ValuePickerButtonActionSupport

      public ValuePickerButtonActionSupport(ValuePickerButton button)
  • Method Details

    • setAction

      public void setAction(@Nullable Action action, boolean overrideComponentProperties)
      Sets the Action for the associated component and updates the component's properties based on the action's state if specified.
      Parameters:
      action - the action to set; may be null
      overrideComponentProperties - a flag indicating whether to update the component's properties based on the action's state
    • getAction

      @Nullable public Action getAction()
      Returns the current Action associated with the component.
      Returns:
      the current action, or null if no action is set
    • removeRegistrations

      protected void removeRegistrations()
    • addPropertyChangeListener

      protected com.vaadin.flow.shared.Registration addPropertyChangeListener()
    • generateTitle

      @Nullable protected String generateTitle(Action action)