madkit.action

## Enum GUIManagerAction

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

- All Implemented Interfaces:
    Serializable, Comparable<GUIManagerAction>

      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`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and 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
    `LOG_LEVEL`
    `SETUP_AGENT_GUI` Requests an agent frame creation.
    `WARNING_LOG_LEVEL`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 type with the specified name.
    `static GUIManagerAction[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

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

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

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

- - ### Enum Constant Detail

    - #### 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(javax.swing.JFrame)`

    - #### LOG_LEVEL

          public static final GUIManagerAction LOG_LEVEL

    - #### WARNING_LOG_LEVEL

          public static final GUIManagerAction WARNING_LOG_LEVEL

    - #### 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 Detail

    - #### values

          public static GUIManagerAction[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (GUIManagerAction c : GUIManagerAction.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static GUIManagerAction valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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

Fabien Michel, Olivier Gutknecht, Jacques Ferber - September 27 2016