|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
verinec.netsim.gui.SimulationToolbar
public class SimulationToolbar
Acts a a controlcenter for the simulation. The user can control the simulaiton via the buttons and silders of this class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JToolBar |
|---|
JToolBar.AccessibleJToolBar, JToolBar.Separator |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private static String |
BACK_ICON
Icon location for back command. |
private JButton |
backward
|
private JTextField |
currentTime
|
private Element |
events
The simulation result currently beeing played. |
private JButton |
forward
|
private static String |
FORWARD_ICON
Icon location for forward command. |
private JButton |
pause
|
private static String |
PAUSE_ICON
Icon location for pause command. |
private JButton |
play
|
private JSlider |
progress
|
private Simulator |
simulator
|
private SimulatorThread |
simuThread
|
private JSlider |
speed
|
private static String |
START_ICON
Icon location for start command. |
private JButton |
stop
|
private static String |
STOP_ICON
Icon location for stop command. |
private VerinecStudio |
verinecStudio
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
SimulationToolbar(VerinecStudio parent,
Simulator simu)
Initializes buttons and sliders. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Handles the events of the buttons. |
int |
getProgress()
Returns the current value of the progressbar. |
void |
initProgress(int start,
int end)
Sets up progressbar. |
void |
setEvents(Element e)
Set the simulation events to play. |
void |
setProgress(int value)
Sets the progressbar to a new value. |
void |
startPlayer(Element e)
Start playing the simulation of the events. |
void |
stateChanged(ChangeEvent e)
Handles the events of the silders. |
void |
terminateSimulation()
Terminates the simulation. |
| Methods inherited from class javax.swing.JToolBar |
|---|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private VerinecStudio verinecStudio
private Simulator simulator
private JButton play
private JButton pause
private JButton stop
private JButton backward
private JButton forward
private JSlider speed
private JSlider progress
private JTextField currentTime
private SimulatorThread simuThread
private Element events
private static String START_ICON
private static String PAUSE_ICON
private static String STOP_ICON
private static String FORWARD_ICON
private static String BACK_ICON
| Constructor Detail |
|---|
public SimulationToolbar(VerinecStudio parent,
Simulator simu)
parent - Reference to the main application window.simu - The simulator instance.| Method Detail |
|---|
public void setEvents(Element e)
e - The events in the <events> tag.public void startPlayer(Element e)
e - The events to play.
public void initProgress(int start,
int end)
start - the startpoint of the progressbar.end - the endpoint of the progressbar.public void terminateSimulation()
public void setProgress(int value)
value - The new value as for JSlider.setValue(int).public int getProgress()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - The event to treat.public void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenere - The event to treat.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||