edu.memphis.ccrg.lida.framework.gui
Class FrameworkGuiControllerImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.gui.FrameworkGuiControllerImpl
All Implemented Interfaces:
FrameworkGuiController

public class FrameworkGuiControllerImpl
extends java.lang.Object
implements FrameworkGuiController

Default Implementation of FrameworkGuiController

Author:
Javier Snaider

Constructor Summary
FrameworkGuiControllerImpl(Agent agent, java.util.Properties commands)
           
 
Method Summary
 java.lang.Object executeCommand(Command command)
          Executes a command sent by the GUI
 java.lang.Object executeCommand(java.lang.String commandName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Executes a command specified by the name.
 void registerAgent(Agent agent)
          Sets the Agent this controller controls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameworkGuiControllerImpl

public FrameworkGuiControllerImpl(Agent agent,
                                  java.util.Properties commands)
Parameters:
agent - Agent object
commands - the commands
Method Detail

executeCommand

public java.lang.Object executeCommand(java.lang.String commandName,
                                       java.util.Map<java.lang.String,java.lang.Object> parameters)
Description copied from interface: FrameworkGuiController
Executes a command specified by the name. This name corresponds to a property in guiCommands.properties file.

Specified by:
executeCommand in interface FrameworkGuiController
Parameters:
commandName - the name of the command, names must be defined in guiCommands.properties
parameters - a Map of optional parameters for the command.
Returns:
the result of the command.

executeCommand

public java.lang.Object executeCommand(Command command)
Description copied from interface: FrameworkGuiController
Executes a command sent by the GUI

Specified by:
executeCommand in interface FrameworkGuiController
Parameters:
command - the command to execute.
Returns:
The result of the command.

registerAgent

public void registerAgent(Agent agent)
Description copied from interface: FrameworkGuiController
Sets the Agent this controller controls. This Agent object represents the model.

Specified by:
registerAgent in interface FrameworkGuiController
Parameters:
agent - Agent