Class ActionData

java.lang.Object
madkit.action.ActionData

public class ActionData extends Object
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 Details

    • ActionData

      public ActionData(String codeName, int keyEvent, ResourceBundle resource)
      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

      public ActionData(String codeName, int keyEvent)
      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

      public String getName()
      Returns the name of the action.
      Returns:
      the name of the action.
    • getShortDescription

      public String getShortDescription()
      Returns the short description of the action.
      Returns:
      the short description of the action.
    • getLongDescription

      public String getLongDescription()
      Returns the long description of the action.
      Returns:
      the long description of the action.
    • getGraphic

      public Node getGraphic()
      Returns the graphic node for the action.
      Returns:
      the graphic node for the action.
    • getImage

      public Image getImage()
      Returns the image for the action.
      Returns:
      the image for the action.
    • getSmallImage

      public Image getSmallImage()
      Returns the small image for the action.
      Returns:
      the small image for the action.
    • getGraphicMenu

      public ImageView getGraphicMenu()
      Returns the graphic node for the action menu.
      Returns:
      the graphic node for the action menu.
    • getAccelerator

      public KeyCombination getAccelerator()
      Returns the keyboard shortcut for the action.
      Returns:
      the keyboard shortcut for the action.
    • getFXAction

      public ActionFromEnum getFXAction()
      Returns the ActionFromEnum associated with this action data.
      Returns:
      the ActionFromEnum associated with this action data.
    • doAction

      public void doAction()
      Performs the action.