|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjrobots.graphics.GUI
public class GUI
This class represents the GUI as a whole. Any interaction with the GUI must go through this class.
Field Summary | |
---|---|
javax.media.opengl.GLCanvas |
arena
|
PlayButton |
buttonPlayPause
|
SimulateButton |
buttonSimulate
|
static GUI |
gui
|
javax.swing.JSlider |
timelineSlider
|
Constructor Summary | |
---|---|
GUI()
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This is the eventhandler for all buttons. |
void |
clickPlayPauseButton()
Toggles the "Play/Pause" button. |
int |
getCurrentSimulationStateIndex()
|
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)
This method is called wehen there is a MouseEvent at the BotList |
void |
setCurrentSimulationStateIndex(int index)
This method tells the GUI which SimulationState should be
displayed (until further notice). |
void |
stateChanged(javax.swing.event.ChangeEvent e)
This method is called if the timeline slider in the GUI changes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static GUI gui
public PlayButton buttonPlayPause
public SimulateButton buttonSimulate
public javax.swing.JSlider timelineSlider
public javax.media.opengl.GLCanvas arena
Constructor Detail |
---|
public GUI()
Method Detail |
---|
public void setCurrentSimulationStateIndex(int index)
SimulationState
should be
displayed (until further notice).
index
- into the SimulationRun
list of statespublic void clickPlayPauseButton()
public int getCurrentSimulationStateIndex()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |