controller
Interface IEnvAdapter


public interface IEnvAdapter

Adapter to connect the environment controls and the model.

Author:
Mathias Ricken

Method Summary
 boolean createEnvironment(AEnvFactory factory)
          Create environment from factory.
 void edit(java.awt.geom.Point2D.Double p, int button)
          Edit a field.
 ICmdFactory getCmdFactory()
          Return the factory to make commands for the simulation driver.
 java.lang.String[] getEnvironmentClassNames()
          Return an array of environment class names to be loaded at startup.
 java.lang.String[] getFishClassNames()
          Return an array of fish class names to be loaded at startup.
 ISecurityAdapter getSecurityAdapter()
          Return the security adapter.
 java.lang.String getToolTipText(java.awt.geom.Point2D.Double p)
          Get a tool tip description for a specific place in the environment.
 boolean loadEnvironment(java.lang.String filename)
          Load environment from file.
 boolean saveEnvironment(java.lang.String filename)
          Save environment to file.
 void setSeedLambda(ILambda seedCmd)
          Set the seed command.
 

Method Detail

loadEnvironment

boolean loadEnvironment(java.lang.String filename)
Load environment from file.

Parameters:
filename - filename
Returns:
true if successful

saveEnvironment

boolean saveEnvironment(java.lang.String filename)
Save environment to file.

Parameters:
filename - filename
Returns:
true if successful

createEnvironment

boolean createEnvironment(AEnvFactory factory)
Create environment from factory.

Parameters:
factory - factory
Returns:
true if successful

setSeedLambda

void setSeedLambda(ILambda seedCmd)
Set the seed command. This command gets executed before a new environment is created or loaded.

Parameters:
seedCmd - command to set

edit

void edit(java.awt.geom.Point2D.Double p,
          int button)
Edit a field.

Parameters:
p - mouse coordinates
button - mouse button pressed

getToolTipText

java.lang.String getToolTipText(java.awt.geom.Point2D.Double p)
Get a tool tip description for a specific place in the environment.

Parameters:
p - mouse coordinates
Returns:
tool tip text

getEnvironmentClassNames

java.lang.String[] getEnvironmentClassNames()
Return an array of environment class names to be loaded at startup.

Returns:
array of class names

getFishClassNames

java.lang.String[] getFishClassNames()
Return an array of fish class names to be loaded at startup.

Returns:
array of class names

getCmdFactory

ICmdFactory getCmdFactory()
Return the factory to make commands for the simulation driver.

Returns:
command factory

getSecurityAdapter

ISecurityAdapter getSecurityAdapter()
Return the security adapter.

Returns:
security adapter