Interface CommonActionsProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addActionPerformedListener​(java.lang.Object action, ActionPerformedListener listener)
      Add a listener which gets triggered before and after a certain action is triggered.
      java.lang.String getActionID​(java.lang.Object actionOrUIObject)
      Get an unique ID (which does not depend on the action name) for an action Oxygen has mounted on the main JMenuBar or on the toolbars or for an UI component like a JMenuItem or a JButton provided by Oxygen.
      void invokeAction​(java.lang.Object action)
      If an action was obtained using one of the methods in this interface this method provides means to invoke an action on AWT thread (for the standalone distribution) or SWT thread (for the eclipse distribution).
      void removeActionPerformedListener​(java.lang.Object action, ActionPerformedListener listener)
      Remove the listener which gets triggered before and after a certain action is triggered.
    • Method Detail

      • invokeAction

        void invokeAction​(java.lang.Object action)
        If an action was obtained using one of the methods in this interface this method provides means to invoke an action on AWT thread (for the standalone distribution) or SWT thread (for the eclipse distribution). The action will be invoked only if it is enabled in the current context.
        Parameters:
        action - The action to invoke
        Since:
        12.1
      • getActionID

        java.lang.String getActionID​(java.lang.Object actionOrUIObject)
        Get an unique ID (which does not depend on the action name) for an action Oxygen has mounted on the main JMenuBar or on the toolbars or for an UI component like a JMenuItem or a JButton provided by Oxygen. If the action appears on a contextual menu but is not installed on a main menu it will be prefixed with the constant "ACTION_WITH_NO_SHORTCUT/"
        Parameters:
        actionOrUIObject - The action or UI component for which to retrieve the ID.
        Returns:
        The unique human-readable ID which does not depend on the user interface language or null if the ID could not be determined.
        Since:
        13.2
      • addActionPerformedListener

        void addActionPerformedListener​(java.lang.Object action,
                                        ActionPerformedListener listener)
        Add a listener which gets triggered before and after a certain action is triggered.
        Parameters:
        action - The action on which to add the listener.
        listener - The listener.
        Since:
        15
      • removeActionPerformedListener

        void removeActionPerformedListener​(java.lang.Object action,
                                           ActionPerformedListener listener)
        Remove the listener which gets triggered before and after a certain action is triggered.
        Parameters:
        action - The action.
        listener - The listener.
        Since:
        15