Class ActionData
java.lang.Object
madkit.action.ActionData
Represents the data associated with an action, including descriptions, icons, and
keyboard shortcuts. This class is used to manage and retrieve information about actions
in the application.
It provides methods to get the name, descriptions, icons, and keyboard shortcuts for
the action.
-
Constructor Summary
ConstructorsConstructorDescriptionActionData
(String codeName, int keyEvent) Constructs a new ActionData with the specified code name and key event, using the default resource bundle.ActionData
(String codeName, int keyEvent, ResourceBundle resource) Constructs a new ActionData with the specified code name, key event, and resource bundle. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doAction()
Performs the action.Returns the keyboard shortcut for the action.Returns the ActionFromEnum associated with this action data.Returns the graphic node for the action.Returns the graphic node for the action menu.getImage()
Returns the image for the action.Returns the long description of the action.getName()
Returns the name of the action.Returns the short description of the action.Returns the small image for the action.
-
Constructor Details
-
ActionData
Constructs a new ActionData with the specified code name, key event, and resource bundle.- Parameters:
codeName
- the code name of the action as a string. For instance, "JCONSOLE".keyEvent
- the key event associated with the action.resource
- the resource bundle for internationalization.
-
ActionData
Constructs a new ActionData with the specified code name and key event, using the default resource bundle.- Parameters:
codeName
- the code name of the action as a string. For instance, "JCONSOLE".keyEvent
- the key event associated with the action.
-
-
Method Details
-
getName
-
getShortDescription
Returns the short description of the action.- Returns:
- the short description of the action.
-
getLongDescription
Returns the long description of the action.- Returns:
- the long description of the action.
-
getGraphic
Returns the graphic node for the action.- Returns:
- the graphic node for the action.
-
getImage
-
getSmallImage
Returns the small image for the action.- Returns:
- the small image for the action.
-
getGraphicMenu
Returns the graphic node for the action menu.- Returns:
- the graphic node for the action menu.
-
getAccelerator
Returns the keyboard shortcut for the action.- Returns:
- the keyboard shortcut for the action.
-
getFXAction
Returns the ActionFromEnum associated with this action data.- Returns:
- the ActionFromEnum associated with this action data.
-
doAction
public void doAction()Performs the action.
-