|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.observer.GUIEnvironmentObserver
public class RoombaEnvironmentObserver
Provides a GUI display for observing the progress of a RobotEnvironment.
Your feedback on possible improvements to the GUI code are very welcome.
Constructor Summary | |
---|---|
RoombaEnvironmentObserver(int delay)
Constructs a new RoombaEnvironmentObserver, which can then be attached to a (single!) RobotEnvironment to track progress. |
Method Summary | |
---|---|
void |
agentAdded(AgentAddedEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
Fired when an agent is added to an environment. |
void |
agentChoseAction(AgentChoseActionEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
Fired when an agent in an environment chooses an action (i.e. |
void |
agentReceivedPercepts(AgentReceivedPerceptsEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
Fired when an agent in an environment receives percepts, i.e. |
void |
environmentBeganRunning(EnvironmentBeganRunningEvent theEvent)
Fired when an environment has just begun its run() loop. |
void |
environmentObjectAdded(EnvironmentObjectAddedEvent theEvent)
Fired when an EnvironmentObject is added to an environment. |
void |
environmentStoppedRunning(EnvironmentStoppedRunningEvent theEvent)
Fired when an environment is about to stop its run() loop. |
void |
playingStateChanged(ObserverPlayingStateChangedEvent theEvent)
Fired when the user clicks one of the buttons to change the playing state. |
void |
propertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoombaEnvironmentObserver(int delay)
delay
- number of milliseconds to pause between each agent action. Something in the range 10-500 is good.Method Detail |
---|
public void propertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
propertyChange
in interface java.beans.PropertyChangeListener
public void environmentBeganRunning(EnvironmentBeganRunningEvent theEvent)
environmentBeganRunning
in interface EnvironmentBeganRunningListener
theEvent
- event specifying the environmentpublic void agentAdded(AgentAddedEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
agentAdded
in interface AgentAddedListener<RobotAction,RobotPercept,RobotAgent>
theEvent
- event specifying the environment and agentpublic void environmentObjectAdded(EnvironmentObjectAddedEvent theEvent)
We should add ourselves as a property-change observer for this object.
environmentObjectAdded
in interface EnvironmentObjectAddedListener
theEvent
- event specifying the environment and the object.public void agentReceivedPercepts(AgentReceivedPerceptsEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
agentReceivedPercepts
in interface AgentReceivedPerceptsListener<RobotAction,RobotPercept,RobotAgent>
theEvent
- event specifying the environment, agent, and set of perceptspublic void agentChoseAction(AgentChoseActionEvent<RobotAction,RobotPercept,RobotAgent> theEvent)
agentChoseAction
in interface AgentChoseActionListener<RobotAction,RobotPercept,RobotAgent>
theEvent
- specifies the environment, agent, and actionpublic void environmentStoppedRunning(EnvironmentStoppedRunningEvent theEvent)
environmentStoppedRunning
in interface EnvironmentStoppedRunningListener
theEvent
- event specifying the environment.public void playingStateChanged(ObserverPlayingStateChangedEvent theEvent)
playingStateChanged
in interface ObserverPlayingStateChangedListener
theEvent
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |