|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.gui.AvroraGui
The AvroraGUI
is the top level GUI component. It should
be inited by VisualAction. It stores the physical, visible components
of the GUI and also starts the various threads
Nested Class Summary | |
class |
AvroraGui.PaintThread
This thread will call the various monitor update and repaint methods for whatever monitor is currently being display in real time. |
Field Summary | |
java.lang.String[] |
args
This is a list of arguments passed by the command line that avrora.Main did not process. |
static AvroraGui |
instance
This is the actual instance of AvroraGui that is used. |
javax.swing.JFrame |
masterFrame
This is GUI - everything fits inside the master frame |
javax.swing.JTabbedPane |
monitorResults
This holds all our monitor "chalkboards" for displaying the data they collect |
ManageSimTime |
simTimeBox
This handles the speed up/slow down, pause, stop, and start of a sim |
SimMenuBar |
topMenu
This menu bar now contols most of the options specified by the GUI (this is the file, edit, options menus) |
ManageTopology |
topologyBox
All information on node topology is displayed and set via this class |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This allows the GUI to respond to mouse clicks or other events. |
protected static javax.swing.ImageIcon |
createImageIcon(java.lang.String path)
Returns an ImageIcon, or null if the path was invalid. |
MonitorPanel |
createMonitorPanel(java.lang.String name)
This function creates an options panel and a display panel for a non-global visual monitor. |
void |
debugAppend(java.lang.String b)
Used by DebugStream to allow writing to the debug window. |
java.util.List |
getMonitorList()
Gets all monitors attached to the simulator. |
java.util.List |
getOptionList()
Gets all options for the GUI and simulator. |
Simulation |
getSimulation()
A Simulation object holds data about the current sim running |
static void |
init(Options opt,
java.lang.String[] args)
This function should be called by VisualAction to actually init the static reference to a physical AvroraGUI object |
void |
removeMonitorPanel(MonitorPanel p)
This will remove a visual monitor panel from the tabbed pane. |
void |
showGui()
Once the GUI has been "created" we call this function to physically display it to the screen |
void |
startPaintThread()
This function will dispatch a new thread that will repaint our dynamic monitor window if new data has been collected |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Some modules (like a spinner) detect a state change and not an action. |
void |
stopPaintThread()
This function will dispatch a new thread that will repaint our dynamic monitor window if new data has been collected |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static AvroraGui instance
public java.lang.String[] args
avrora.Main
did not process. Most likely
it's a list of filenames.
public javax.swing.JFrame masterFrame
public SimMenuBar topMenu
public ManageSimTime simTimeBox
public ManageTopology topologyBox
public javax.swing.JTabbedPane monitorResults
Method Detail |
public static void init(Options opt, java.lang.String[] args)
opt
- Options specified from the command lineargs
- file names specified from the command linepublic Simulation getSimulation()
Simulation
object holds data about the current sim running
public java.util.List getMonitorList()
GUIDefaults
public java.util.List getOptionList()
GUIDefaults
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- Holds information about what event happenedpublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- Holds information about what event happenedpublic void debugAppend(java.lang.String b)
b
- generally just one letter that needs to be outputpublic void showGui()
protected static javax.swing.ImageIcon createImageIcon(java.lang.String path)
public void startPaintThread()
public void stopPaintThread()
public MonitorPanel createMonitorPanel(java.lang.String name)
monitorTabMap
name
- Name of the monitor
public void removeMonitorPanel(MonitorPanel p)
MonitorPanel
instance from our global list of monitor
panels. It will NOT destory the monitor options panel, but so
long as the panel is never displayed again this isn't an issue.
p
- The MonitorPanel that needs to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |