Actions are typically presented in pop-up menus, or attached to a component such as a window, node, or data object.
The Actions API provides two types of action:
An action called programmatically from menu items in the main menu bar, toolbar buttons in the main toolbars, and keyboard shortcuts throughout the IDE. For example, in the IDE, the action that defines Tools > Options subclasses CallableSystemAction.
An action called programmatically from a node. Nodes typically represent DataObjects. A DataObject is basically a parsed file—a Java object that knows the meaning of what is in a file or what the file represents and can do something with it. Nodes add features to DataObjects that the user interacts with, such as actions, localized display names, and icons.
Both types of action can be created with the New Action wizard. The wizard automatically registers actions in the layer.xml file.
For an example of the use of an action that shows up as a menu item and as a toolbar button, see the For an example of an action that shows up as an edit box in a toolbar, see the