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
interface and tag handler classes for defining action objects. The properties defined by this interface are supported by the generic action classes.ActionManager
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Accelerator
getAccelerator()
Returns theAccelerator
associated with this action.Object
getIcon()
Returns an icon for the represented action.int
getMnemonicKey()
Returns the mnemonic for the represented action.String
getName()
Returns the name of the represented action.Object
getTask()
Returns the task object for the represented action.String
getText()
Returns a text for this action.String
getToolTip()
Returns the tool tip text for the represented action.
-
-
-
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 theAccelerator
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 anAccelerator
-
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 aRunnable
or an
object.ActionTask
- Returns:
- the task for the action
-
-