|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
fr.lifl.jedi.controllersCore.AbstractGUIController<ColorGridGUI>
fr.lifl.jedi.gui.display.colorGrid.ColorGridGUIController
public class ColorGridGUIController
This controller handles the messages exchanged between the running simulation and the GUI that displays it
in a ColorGridGUI.
| JEDI V 2.2 |
| Created the 7th avr. 2009 |
| Modified the 5th may 2009 |
| Yoann Kubera |
| SMAC Team (Systèmes Multi-Agents et Comportement) |
| LIFL (Laboratoire d'Informatique Fondamentale de Lille) |
| University of Lille, France |
| Field Summary |
|---|
| Fields inherited from class fr.lifl.jedi.controllersCore.AbstractGUIController |
|---|
core, view |
| Constructor Summary | |
|---|---|
ColorGridGUIController(ColorGridGUI view)
Constructor of the Controller that rules the behavior of a ColorGridGUI |
|
| Method Summary | |
|---|---|
protected void |
computeNewSimulationStepImage()
Gets informations from the environment, in order to update the double buffer that displays simulations data. |
protected void |
handleViewMessage(ISimulationEvent event)
Defines how the controller reacts when it receives an event coming from the view. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
protected void |
reactToCloseRequest()
This method is called when the program is about to exit. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
protected void |
updateViewAfterInitialization()
This method is called whenever the simulation core finished the environment's initialization. |
protected void |
updateViewAfterTimeStep()
This method is called whenever a simulation step ends. |
protected void |
updateViewAtSimulationsAbortion()
This method is called when the simulation ended because of an abortion (because of a ToSimulationCoreControlEvents.TO_CORE_ABORT_SIMULATION event
sent by the controller of a simulation control GUI). |
protected void |
updateViewAtSimulationsEnd()
This method is called when the simulation ended normaly -- i.e. |
protected void |
updateViewDuringTimeStep()
This method is called whenever a simulation step starts. |
protected void |
updateViewWhenPaused()
This method is called whenever the simulation is paused. |
protected void |
updateViewWhileInitializing()
This method is called when the simulation core begins to (and has not finished to) initialize the simulation. |
void |
zoomDecrement()
This method is called whenever the zoom is decremented with the mouse wheel. |
void |
zoomIncrement()
This method is called whenever the zoom is incremented with the mouse wheel. |
| Methods inherited from class fr.lifl.jedi.controllersCore.AbstractGUIController |
|---|
getView, setSimulationCore, update |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorGridGUIController(ColorGridGUI view)
view - the view associated with this controller.| Method Detail |
|---|
protected void handleViewMessage(ISimulationEvent event)
AbstractGUIController
handleViewMessage in class AbstractGUIController<ColorGridGUI>event - The event that came from the view.AbstractGUIController.handleViewMessage(fr.lifl.jedi.gui.ISimulationEvent)protected void computeNewSimulationStepImage()
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerChangeListener.stateChanged(javax.swing.event.ChangeEvent)public void zoomIncrement()
public void zoomDecrement()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerMouseListener.mouseClicked(java.awt.event.MouseEvent)public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerMouseListener.mouseEntered(java.awt.event.MouseEvent)public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerMouseListener.mouseExited(java.awt.event.MouseEvent)public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerMouseListener.mousePressed(java.awt.event.MouseEvent)public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerMouseListener.mouseReleased(java.awt.event.MouseEvent)public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerMouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)protected void reactToCloseRequest()
AbstractGUIControllerAbstractGUIController.reactToCloseRequest()
method.
reactToCloseRequest in class AbstractGUIController<ColorGridGUI>AbstractGUIController.reactToCloseRequest()protected void updateViewAfterInitialization()
AbstractGUIControllerAbstractGUIController.updateViewAfterInitialization() method.
updateViewAfterInitialization in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewAfterInitialization()protected void updateViewAfterTimeStep()
AbstractGUIControllerAbstractGUIController.updateViewAfterTimeStep() method.
updateViewAfterTimeStep in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewAfterTimeStep()protected void updateViewAtSimulationsAbortion()
AbstractGUIControllerToSimulationCoreControlEvents.TO_CORE_ABORT_SIMULATION event
sent by the controller of a simulation control GUI).
The simulation can be initialized again only when all controllers registered to the simulation
core finished their call to the AbstractGUIController.updateViewAtSimulationsAbortion()
method.
updateViewAtSimulationsAbortion in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewAtSimulationsAbortion()protected void updateViewAtSimulationsEnd()
AbstractGUIControllerSimulationCore.hasToStop()).
The simulation can be initialized again only when all controllers registered to the simulation
core finished their call to the AbstractGUIController.updateViewAtSimulationsEnd()
method.
updateViewAtSimulationsEnd in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewAtSimulationsEnd()protected void updateViewDuringTimeStep()
AbstractGUIController
updateViewDuringTimeStep in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewDuringTimeStep()protected void updateViewWhenPaused()
AbstractGUIControllerAbstractGUIController.updateViewWhenPaused()
method.
updateViewWhenPaused in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewWhenPaused()protected void updateViewWhileInitializing()
AbstractGUIController
updateViewWhileInitializing in class AbstractGUIController<ColorGridGUI>AbstractGUIController.updateViewWhileInitializing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||