Class JmixButtonActionSupport

java.lang.Object
io.jmix.flowui.kit.component.button.JmixButtonActionSupport

public class JmixButtonActionSupport extends Object
Delegate that handles action set to JmixButton.
  • Field Details

    • button

      protected final JmixButton button
    • action

      protected Action action
    • buttonClickRegistration

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

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

    • JmixButtonActionSupport

      public JmixButtonActionSupport(JmixButton button)
  • Method Details

    • setAction

      public void setAction(@Nullable Action action, boolean overrideComponentProperties)
      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
      Parameters:
      action - an action to set
      overrideComponentProperties - whether action properties override component properties
    • getAction

      @Nullable public Action getAction()
      Returns:
      an action or null
    • addActionVariant

      protected void addActionVariant(JmixButton component, ActionVariant actionVariant)
    • removeActionVariant

      protected void removeActionVariant(JmixButton component, ActionVariant actionVariant)
    • removeRegistrations

      protected void removeRegistrations()
    • updateText

      protected void updateText(boolean overrideComponentProperties)
    • updateEnabled

      protected void updateEnabled()
    • updateVisible

      protected void updateVisible()
    • updateActionVariant

      protected void updateActionVariant(boolean overrideComponentProperties)
    • updateIcon

      protected void updateIcon(boolean overrideComponentProperties)
    • updateTitle

      protected void updateTitle(boolean overrideComponentProperties)
    • onButtonClick

      protected void onButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    • onActionPropertyChange

      protected void onActionPropertyChange(PropertyChangeEvent event)