Interface ActionData

  • All Known Implementing Classes:
    AbstractActionDataTag, ActionControlTag, ActionDataImpl, ActionDataTag, ActionTag, MenuItemTag, SimplePopupMenuHandler, ToolButtonTag

    public interface ActionData

    Definition of an interface for describing properties of an action.

    This interface is used in communication between a concrete implementation of the ActionManager interface and tag handler classes for defining action objects. The properties defined by this interface are supported by the generic action classes.

    The here specified properties are typical for GUI controls that represent actions, e.g. a textual description, an icon, and a tool tip text.

    Version:
    $Id: ActionData.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Method Detail

      • getName

        String getName()
        Returns the name of the represented action.
        Returns:
        the action's name
      • getText

        String getText()
        Returns a text for this action. This is the text as displayed for the user, e.g. the name of a menu.
        Returns:
        the action's text
      • getToolTip

        String getToolTip()
        Returns the tool tip text for the represented action.
        Returns:
        the tool tip
      • getMnemonicKey

        int getMnemonicKey()
        Returns the mnemonic for the represented action. The mnemonic is the letter in an action's text that be typed for triggering the action. For instance, if the action is represented by a menu item, the text of the item will display this character in a high-lighted way (e.g. underlined). If the parent menu is open, the user can directly type this character for selecting this menu item.
        Returns:
        the mnemonic
      • getAccelerator

        Accelerator getAccelerator()
        Returns the Accelerator associated with this action. Through an accelerator the action can be associated with a specific key combination. By typing this key combination the action will be triggered. An example for an accelerator is the well-known key combination CONTROL+C for copying the current selection into the clipboard.
        Returns:
        the Accelerator for this action; can be null, then the action is not associated with an Accelerator
      • getIcon

        Object getIcon()
        Returns an icon for the represented action.
        Returns:
        an icon for the action
      • getTask

        Object getTask()
        Returns the task object for the represented action. This object will be invoked whenever the action is triggered. A task can be a Runnable or an ActionTask object.
        Returns:
        the task for the action