Interface Action

All Known Subinterfaces:
Action.ExecutableAction, Action.HasTarget, Action.MainTabSheetAction, Action.OperationResultAction, Action.ScreenAction<S>, Action.SecuredAction
All Known Implementing Classes:
AbstractAction, AbstractEditPresentationAction, AbstractLookupAction, AbstractPresentationAction, AbstractPrintFormAction, AbstractScreenAction, AddAction, AssignToUsersAction, BaseAction, BulkEditAction, ChangePasswordAction, ChartEditFragment.ChartSeriesMoveAction, CreateAction, DateIntervalAction, DeletePresentationAction, DialogAction, EditAction, EditFetchPlanAction, EditorCloseAction, EditorCommitAction, EditorCommitAndCloseAction, EditorDiscardAction, EditorEnableEditingAction, EditorPrintFormAction, EditorScreenShowEntityInfoAction, EditPresentationAction, EntityClearAction, EntityInspectorBrowser.ExportAction, EntityLookupAction, EntityOpenAction, EntityOpenCompositionAction, ExcelExportAction, ExcludeAction, ExecutionHistoryAction, ExportAction, FilterAction, FilterAddConditionAction, FilterClearValuesAction, FilterCopyAction, FilterEditAction, FilterMakeDefaultAction, FilterRemoveAction, FilterSaveAction, FilterSaveAsAction, FilterSaveWithValuesAction, InputDialogAction, ItemOrderableAction, ItemTrackingAction, JsonExportAction, ListAction, ListPrintFormAction, LookupDiscardAction, LookupSelectAction, MasterDetailCancelAction, MasterDetailCommitAction, OperationResultScreenAction, PropertyFilterImpl.OperationChangeAction, RefreshAction, RelatedAction, RemoveAction, ReportExecutionBrowser.DownloadDocumentAction, ResetPasswordAction, ResetPresentationAction, ResetRememberMeTokenAction, RunReportAction, SaveAsPresentationAction, SavePresentationAction, ScreenCloseAction, SecuredListAction, ShowEntityInfoAction, ShowPivotAction, ShowRoleAssignmentsAction, ShowUserSubstitutionsAction, SubstituteUserAction, TagLookupAction, ValueClearAction, ValuesSelectAction, ViewAction

public interface Action
The Action interface abstracts away a function from a visual component.

The action is executed by invoking its actionPerform(Component) method.

  • Field Details

  • Method Details

    • getId

      String getId()
      Returns:
      action's identifier
    • getCaption

      @Nullable String getCaption()
      Returns:
      action's caption
    • setCaption

      void setCaption(@Nullable String caption)
    • getDescription

      @Nullable String getDescription()
      Returns:
      action's description
    • setDescription

      void setDescription(@Nullable String description)
    • getShortcutCombination

      @Nullable KeyCombination getShortcutCombination()
      Returns:
      action's keyboard shortcut
    • setShortcutCombination

      void setShortcutCombination(@Nullable KeyCombination shortcut)
    • setShortcut

      void setShortcut(@Nullable String shortcut)
      Set shortcut from string representation.
      Parameters:
      shortcut - string of type "Modifiers-Key", e.g. "Alt-N". Case-insensitive.
    • getIcon

      @Nullable String getIcon()
      Returns:
      action's icon
    • setIcon

      void setIcon(@Nullable String icon)
    • isEnabled

      boolean isEnabled()
      Returns:
      whether the action is currently enabled
    • setEnabled

      void setEnabled(boolean enabled)
    • isVisible

      boolean isVisible()
      Returns:
      whether the action is currently visible
    • setVisible

      void setVisible(boolean visible)
    • refreshState

      void refreshState()
      Refresh internal state of the action to initialize enabled, visible, caption, icon, etc. properties depending on programmatically set values and user permissions set at runtime.

      For example, this method is called by visual components holding actions when they are bound to data. At this moment the action can find out what entity it is connected to and change its state according to the user permissions.

    • getOwner

      @Nullable ActionOwner getOwner()
      Returns:
      a single component owning the action. If there are several owners, first will be returned.
    • getOwners

      Collection<ActionOwner> getOwners()
      Returns:
      the collection of owners
    • addOwner

      void addOwner(ActionOwner actionOwner)
      Add an owner component.
      Parameters:
      actionOwner - owner component
    • removeOwner

      void removeOwner(ActionOwner actionOwner)
      Remove the owner component.
      Parameters:
      actionOwner - owner component
    • actionPerform

      void actionPerform(Component component)
      Invoked by owning component to execute the action.
      Parameters:
      component - invoking component
    • addPropertyChangeListener

      void addPropertyChangeListener(Consumer<PropertyChangeEvent> listener)
      Adds a listener to be notified about Enabled, Caption or Icon property changes.
      Parameters:
      listener - a listener object
    • removePropertyChangeListener

      void removePropertyChangeListener(Consumer<PropertyChangeEvent> listener)
      Removes the listener.
      Parameters:
      listener - a listener object
      See Also: