Package madkit.action
Class ActionInfo
java.lang.Object
madkit.action.ActionInfo
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
ConstructorsConstructorDescriptionActionInfo
(E enumAction, int keyEvent, ResourceBundle resource) Builds a new ActionInfo considering anEnum
.ActionInfo
(String codeName, int keyEvent, ResourceBundle resource) Builds a new ActionInfo considering a codeName as a string. -
Method Summary
Modifier and TypeMethodDescriptionenumToMethodName
(E e) Converts the name of an enum object to a Java standardized method name.int
getName()
-
Constructor Details
-
ActionInfo
Builds a new ActionInfo considering anEnum
. 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
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 Details
-
getKeyEvent
public int getKeyEvent()- Returns:
- the keyEvent
-
getBigIcon
- Returns:
- the bigIcon
-
getSmallIcon
- Returns:
- the smallIcon
-
getName
- Returns:
- the name
-
getShortDescription
- Returns:
- the shortDescription
-
getLongDescription
- Returns:
- the longDescription
-
enumToMethodName
Converts the name of an enum object to a Java standardized method name. For instance, using this onAgentAction.LAUNCH_AGENT
will returnlaunchAgent
. This is especially used byAbstractAgent.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.
-