Package madkit.action

# Enum Class GUIManagerAction

java.lang.Object
java.lang.Enum<GUIManagerAction>
madkit.action.GUIManagerAction

All Implemented Interfaces:
  `Serializable`, `Comparable<GUIManagerAction>`, `java.lang.constant.Constable`

public enum GUIManagerAction extends Enum<GUIManagerAction>
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:
  - `Action`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CONNECT_TO_IP`
  For connecting kernels in a wide area network
  `DEICONIFY_ALL`
  Deiconify all the agent frames
  `DISPOSE_AGENT_GUI`
  Requests an agent frame disposal: This will kill the agent.
  `ICONIFY_ALL`
  Iconify all the agent frames
  `KILL_AGENTS`
  Kills all the agents having a GUI
  `SETUP_AGENT_GUI`
  Requests an agent frame creation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Action`
  `getActionFor(AbstractAgent agent, Object... commandOptions)`
  Returns an Action that will send to the GUI manager the corresponding request.
  `ActionInfo`
  `getActionInfo()`
  `static GUIManagerAction`
  `valueOf(String name)`
  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.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### CONNECT_TO_IP

    public static final GUIManagerAction CONNECT_TO_IP
    For connecting kernels in a wide area network

  - ### ICONIFY_ALL

    public static final GUIManagerAction ICONIFY_ALL
    Iconify all the agent frames

  - ### DEICONIFY_ALL

    public static final GUIManagerAction DEICONIFY_ALL
    Deiconify all the agent frames

  - ### KILL_AGENTS

    public static final GUIManagerAction KILL_AGENTS
    Kills all the agents having a GUI

  - ### SETUP_AGENT_GUI

    public static final GUIManagerAction 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);

    They could be identical.
    See Also:
      - `AbstractAgent.setupFrame(madkit.gui.AgentFrame)`

  - ### DISPOSE_AGENT_GUI

    public static final GUIManagerAction 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);

    They could be identical.

- ## Method Details

  - ### values

    public static GUIManagerAction[] 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

    public static GUIManagerAction valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null

  - ### getActionFor

    public Action getActionFor(AbstractAgent agent, Object... commandOptions)
    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);

    This will create an agent that will make `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 created
      `commandOptions` - optional information related to the action itself
    Returns:
      an Action that could be used in an GUI for instance

  - ### getActionInfo

    public ActionInfo getActionInfo()
    Returns:
      the actionInfo