|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.netsim.gui.SimulationScheduler
public class SimulationScheduler
Responsible for the animation of the events. For this reason, the class maintains two tables, one containing all the events and another for the current active events.
| Field Summary | |
|---|---|
private DefaultTableModel |
activeEvents
|
private DefaultTableModel |
eventTable
|
private int |
halftime
needed for Layer2Receive, to determine their start-time. |
private boolean[] |
layerFilter
A filter to control which layers are shown. |
private int |
pausetime
|
private int |
simulationend
unrealistic low value, so this will be changed during initialisation. |
private int |
simulationstart
unrealistic high value, so this will be changed during initialisation. |
private SimulatorThread |
simuThread
|
private VerinecStudio |
verinecStudio
|
| Constructor Summary | |
|---|---|
SimulationScheduler(Element events,
SimulatorThread simuThread,
VerinecStudio parent)
Parses all the events and adds them to the table. |
|
| Method Summary | |
|---|---|
private void |
addToTable(Element events,
Vector data)
Helper method to parse the testfile. |
void |
animateEvents(int time,
int substeps)
Animates all events in the table of the current active events. |
void |
filterEvents(boolean[] theFilter)
Sets a filter for the layers. |
void |
loadEvents(int time)
Update the events table to contain the current ones. |
void |
schedulepause(int time)
Schedules a pause. |
void |
terminateSimulation()
Removes the filterpanel from the sidewindow when the simulation is terminated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private VerinecStudio verinecStudio
private SimulatorThread simuThread
private DefaultTableModel eventTable
private DefaultTableModel activeEvents
private boolean[] layerFilter
private int simulationstart
private int simulationend
private int halftime
private int pausetime
| Constructor Detail |
|---|
public SimulationScheduler(Element events,
SimulatorThread simuThread,
VerinecStudio parent)
throws SimulationException
events - the whole testfile.simuThread - the owner of the Scheduler.parent - A reference to the main application window.
SimulationException - When a network component can not be found on the panel.| Method Detail |
|---|
private void addToTable(Element events,
Vector data)
throws SimulationException
events - the current eventsdata - the ancient events
SimulationException - when a networkcomponent could not be found on the panel.public void schedulepause(int time)
time - the time when the pause shall occur.
public void animateEvents(int time,
int substeps)
time - the current simulation time.substeps - the current substeps.public void loadEvents(int time)
time - The time to load events for.public void filterEvents(boolean[] theFilter)
theFilter - the desired layers.layerFilterpublic void terminateSimulation()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||