net.sf.jguiraffe.gui.builder.action
Interface ActionData

All Known Implementing Classes:
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 156 2009-03-03 21:04:47Z oheger $
Author:
Oliver Heger

Method Summary
 Accelerator getAccelerator()
          Returns the Accelerator associated with this action.
 java.lang.Object getIcon()
          Returns an icon for the represented action.
 int getMnemonicKey()
          Returns the mnemonic for the represented action.
 java.lang.String getName()
          Returns the name of the represented action.
 java.lang.Object getTask()
          Returns the task object for the represented action.
 java.lang.String getText()
          Returns a text for this action.
 java.lang.String getToolTip()
          Returns the tool tip text for the represented action.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the represented action.

Returns:
the action's name

getText

java.lang.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

java.lang.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

java.lang.Object getIcon()
Returns an icon for the represented action.

Returns:
an icon for the action

getTask

java.lang.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


Copyright © 2009 The JGUIraffe Team. All Rights Reserved.