madkit.action

## Class ActionInfo

- java.lang.Object
- - madkit.action.ActionInfo

-     public class ActionInfo
      extends Object

  This class encapsulates action information which could be used to easily create a new `MDKAbstractAction`.
  Since:
    MaDKit 5.0.0.14
  Version:
    1.1
  Author:
    Fabien Michel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActionInfo(E enumAction, int keyEvent, ResourceBundle resource)` Builds a new ActionInfo considering an `Enum`.
    `ActionInfo(String codeName, int keyEvent, ResourceBundle resource)` Builds a new ActionInfo considering a codeName as a string.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <E extends Enum<E>> String` | `enumToMethodName(E e)` Converts the name of an enum object to a Java standardized method name.
    `ImageIcon` | `getBigIcon()`
    `int` | `getKeyEvent()`
    `String` | `getLongDescription()`
    `String` | `getName()`
    `String` | `getShortDescription()`
    `ImageIcon` | `getSmallIcon()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ActionInfo

          public ActionInfo(E enumAction,
                            int keyEvent,
                            ResourceBundle resource)

      Builds a new ActionInfo considering an `Enum`. If the considered enum is from this package, it will be built automatically with values contained in the madkit.i18n directory
      Parameters:
        `enumAction` -
        `keyEvent` -

    - #### ActionInfo

          public ActionInfo(String codeName,
                            int keyEvent,
                            ResourceBundle resource)

      Builds a new ActionInfo considering a codeName as a string.
      Parameters:
        `codeName` - the code name of the action as a string. For instance JCONSOLE.
        `keyEvent` -
        `resource` -

  - ### Method Detail

    - #### getKeyEvent

          public int getKeyEvent()

      Returns:
        the keyEvent

    - #### getBigIcon

          public ImageIcon getBigIcon()

      Returns:
        the bigIcon

    - #### getSmallIcon

          public ImageIcon getSmallIcon()

      Returns:
        the smallIcon

    - #### getName

          public String getName()

      Returns:
        the name

    - #### getShortDescription

          public String getShortDescription()

      Returns:
        the shortDescription

    - #### getLongDescription

          public String getLongDescription()

      Returns:
        the longDescription

    - #### enumToMethodName

          public static <E extends Enum<E>> String enumToMethodName(E e)

      Converts the name of an enum object to a Java standardized method name. For instance, using this on `AgentAction.LAUNCH_AGENT` will return `launchAgent`. This is especially used by `AbstractAgent.proceedEnumMessage(madkit.message.EnumMessage)` to reflexively call the method of an agent which corresponds to the code of such messages.
      Parameters:
        `e` - the enum object to convert
      Returns:
        a string having a Java standardized method name form.

Fabien Michel, Olivier Gutknecht, Jacques Ferber - February 17 2020