|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aima.basic.BasicEnvironmentView aima.gui.framework.AgentAppModel
public class AgentAppModel
Facade hiding application specific design decisions from
the AgentAppFrame
. Subclasses should add methods to access
informations about the environment's and the agent's state. Note that any
data shown by an agent view must be provided by a corresponding model.
The model-view-controller architecture forbids any component of the
application except the controller to directly access the view components
and it forbids the views to access information without consulting the model.
Nested Class Summary | |
---|---|
static interface |
AgentAppModel.ModelChangedListener
Observer interface for views which need to be informed about model state changes and log messages to be printed out. |
Field Summary | |
---|---|
protected java.util.List<AgentAppModel.ModelChangedListener> |
listeners
Maintains all views. |
Constructor Summary | |
---|---|
AgentAppModel()
|
Method Summary | |
---|---|
void |
addModelChangedListener(AgentAppModel.ModelChangedListener listener)
Adds a new view to the model. |
void |
envChanged(java.lang.String command)
Reacts on environment changes. |
void |
fireModelChanged()
Signals to all registered listeners that the model has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<AgentAppModel.ModelChangedListener> listeners
Constructor Detail |
---|
public AgentAppModel()
Method Detail |
---|
public void addModelChangedListener(AgentAppModel.ModelChangedListener listener)
public void fireModelChanged()
public void envChanged(java.lang.String command)
envChanged
in class BasicEnvironmentView
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |