edu.memphis.ccrg.lida.framework.gui.commands
Interface Command

All Known Implementing Classes:
AddPanelCommand, AddTicksCommand, CommandImpl, EnableTicksModeCommand, PauseRunningThreadsCommand, QuitAllCommand, ResetEnvironmentCommand, ResumeRunningThreadsCommand, SetTimeScaleCommand

public interface Command

A command is an encapsulation of an event from the Gui such as a button press or a slider state change. Implementations should add themselves to guiCommands.properties.

Author:
Javier Snaider

Method Summary
 void execute(Agent agent)
          Executes this command performing the necessary actions in the model (the Agent).
 java.lang.Object getParameter(java.lang.String name)
          Gets a parameter by name.
 java.lang.Object getResult()
          Returns result of the command.
 void setParameter(java.lang.String name, java.lang.Object value)
          Set single parameter for command.
 void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
          Sets optional parameters for command.
 

Method Detail

execute

void execute(Agent agent)
Executes this command performing the necessary actions in the model (the Agent).

Parameters:
agent - Agent Object

getResult

java.lang.Object getResult()
Returns result of the command.

Returns:
the result of the command's execution

setParameters

void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Sets optional parameters for command.

Parameters:
parameters - parameters

setParameter

void setParameter(java.lang.String name,
                  java.lang.Object value)
Set single parameter for command.

Parameters:
name - name of parameter
value - default value to use if parameter cannot be found

getParameter

java.lang.Object getParameter(java.lang.String name)
Gets a parameter by name.

Parameters:
name - retrieved parameter
Returns:
the parameter