Class ObservableBaseAction<A extends ObservableBaseAction<A>>

All Implemented Interfaces:
Action, HasShortcutCombination
Direct Known Subclasses:
LogoutAction, PropertyFilter.OperationChangeAction, SecuredBaseAction, SubstituteUserAction, TabbedViewsContainerAction

public class ObservableBaseAction<A extends ObservableBaseAction<A>> extends BaseAction
Base implementation of Action that introduces execution observation support.
See Also:
  • Field Details

  • Constructor Details

    • ObservableBaseAction

      public ObservableBaseAction(String id)
  • Method Details

    • actionPerform

      public void actionPerform(com.vaadin.flow.component.Component component)
      Description copied from interface: Action
      Executes action logic.
      Specified by:
      actionPerform in interface Action
      Overrides:
      actionPerform in class BaseAction
      Parameters:
      component - Component that triggered this action
    • withText

      public A withText(@Nullable String text)
      Description copied from class: BaseAction
      Sets the text property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withText in class BaseAction
      Parameters:
      text - text to set or null to remove
      Returns:
      this object
    • withEnabled

      public A withEnabled(boolean enabled)
      Description copied from class: BaseAction
      Sets the enabled property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withEnabled in class BaseAction
      Parameters:
      enabled - whether the action is currently enabled
      Returns:
      this object
    • withVisible

      public A withVisible(boolean visible)
      Description copied from class: BaseAction
      Sets the visible property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withVisible in class BaseAction
      Parameters:
      visible - whether the action is currently visible
      Returns:
      this object
    • withIcon

      public A withIcon(@Nullable com.vaadin.flow.component.Component icon)
      Description copied from class: BaseAction
      Sets the icon property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withIcon in class BaseAction
      Parameters:
      icon - icon to set or null to remove
      Returns:
      this object
    • withIcon

      @Deprecated(since="3.0", forRemoval=true) public A withIcon(@Nullable com.vaadin.flow.component.icon.Icon icon)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: BaseAction
      Sets the icon property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withIcon in class BaseAction
      Parameters:
      icon - icon to set or null to remove
      Returns:
      this object
    • withDescription

      public A withDescription(@Nullable String description)
      Description copied from class: BaseAction
      Sets the description property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withDescription in class BaseAction
      Parameters:
      description - description to set or null to remove
      Returns:
      this object
    • withVariant

      public A withVariant(ActionVariant variant)
      Description copied from class: BaseAction
      Sets the variant property value of an action. May be used by components to initialize their appearance.
      Overrides:
      withVariant in class BaseAction
      Parameters:
      variant - variant to set
      Returns:
      this object
    • withShortcutCombination

      public A withShortcutCombination(@Nullable KeyCombination shortcutCombination)
      Description copied from class: BaseAction
      Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.
      Overrides:
      withShortcutCombination in class BaseAction
      Parameters:
      shortcutCombination - key combination to set or null to remove
      Returns:
      this object
    • withHandler

      public A withHandler(@Nullable Consumer<ActionPerformedEvent> handler)
      Description copied from class: BaseAction
      Adds a listener to be notified when action is performed.
      Overrides:
      withHandler in class BaseAction
      Parameters:
      handler - listener to add or null to remove all
      Returns:
      this object
    • getUiObservationSupport

      protected Optional<UiObservationSupport> getUiObservationSupport()