Package madkit.action
Enum Class GUIManagerAction
- All Implemented Interfaces:
Serializable
,Comparable<GUIManagerAction>
,java.lang.constant.Constable
Enum representing operations which could be done by the default GUI manager of MaDKit. It could
be used by an agent to interact with the GUI manager by creating
Action
using
getActionFor(AbstractAgent, Object...)
.- Since:
- MaDKit 5.0.0.14
- Version:
- 0.9
- Author:
- Fabien Michel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFor connecting kernels in a wide area networkDeiconify all the agent framesRequests an agent frame disposal: This will kill the agent.Iconify all the agent framesKills all the agents having a GUIRequests an agent frame creation. -
Method Summary
Modifier and TypeMethodDescriptiongetActionFor
(AbstractAgent agent, Object... commandOptions) Returns an Action that will send to the GUI manager the corresponding request.static GUIManagerAction
Returns the enum constant of this class with the specified name.static GUIManagerAction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONNECT_TO_IP
For connecting kernels in a wide area network -
ICONIFY_ALL
Iconify all the agent frames -
DEICONIFY_ALL
Deiconify all the agent frames -
KILL_AGENTS
Kills all the agents having a GUI -
SETUP_AGENT_GUI
Requests an agent frame creation. The corresponding action should be created by specifying the targeted agent:SETUP_AGENT_GUI.getActionFor(anAgent, targetedAgent);
-
DISPOSE_AGENT_GUI
Requests an agent frame disposal: This will kill the agent. The corresponding action should be created by specify the targeted agent:SETUP_AGENT_GUI.getActionFor(anAgent, targetedAgent);
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getActionFor
Returns an Action that will send to the GUI manager the corresponding request. The corresponding action should be created by specifying the agent for which this action is created. Here is an example :KILL_AGENTS.getActionFor(anAgent);
anAgent
send a message to the gui manager asking the kill of all GUI agents.- Parameters:
agent
- the agent for which this Action will be createdcommandOptions
- optional information related to the action itself- Returns:
- an Action that could be used in an GUI for instance
-
getActionInfo
- Returns:
- the actionInfo
-