|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.netsim.gui.Simulator
public class Simulator
Simulator module for Verinec. Provides ways to start a simulation and visualizes the simulation output. This module will disallow modifications.
to learn how to run simulation in endless loop| Nested Class Summary | |
|---|---|
(package private) class |
Simulator.GenerateAction
Display the dialog to generate input events. |
(package private) class |
Simulator.LoadSimuInputAction
Load simulation input. |
(package private) class |
Simulator.PlaySimuResultAction
Load simulation result and display it. |
(package private) class |
Simulator.RunSimulationAction
Calculate simulation result and display it. |
(package private) class |
Simulator.SaveSimuInputAction
Save simulation input that was edited for this network. |
(package private) class |
Simulator.SaveSimuResultAction
Save simulation result, normally created by the simulator. |
| Field Summary | |
|---|---|
private Component |
configPanel
|
private Events |
events
|
private Action |
loadSimuInputAction
|
private Action |
loadSimuResultAction
|
private Logger |
logger
|
private JMenu |
menuSimulation
|
private static String |
NETWORK_ICON
Icon for the new action. |
private Action |
runSimulationAction
|
private Action |
saveSimeResultAction
|
private Action |
saveSimuInputAction
|
private Events |
simulationEvents
|
private SimulationToolbar |
simulationToolbar
|
private VerinecStudio |
verinecStudio
|
| Constructor Summary | |
|---|---|
Simulator()
|
|
| Method Summary | |
|---|---|
void |
addSimuInput(Event input)
Add an input event to the list for running the simulation. |
boolean |
calculateSimulation()
Use test definition objects to run the simulator with and play the results. |
void |
editEvent(Event event,
boolean isNewEvent)
Shows the dialog to create/edit an event. |
void |
editEvent(int index)
Shows the dialog to edit an Event from the Events List. |
void |
editEvents(int[] selectedIndices)
|
void |
enableSaveMenu()
This method enables the save menu point in the simulation Menu |
Events |
getEvents()
Gets the input Events for the Simulator |
void |
inputChanged()
This method indicates the config Panel that something in the event list has changed. |
void |
load(VerinecStudio parent)
Load this module to be the active module. |
void |
loadResult(String filename)
Load a test result file and display it. |
void |
playSimulation()
Start playing the simulation. |
void |
resetConfiguration(Component c)
Will never be called because we have no config panel. |
void |
resultAvailable(boolean b)
Tell the module whether there is a result that can be saved. |
void |
saveConfiguration(Component c)
Will never be called because we have no config panel. |
String |
toString()
The toString method should just return the modules name for the module selection dropdown. |
void |
unload()
Stops the simulation. |
void |
updateComponent(NwComponent c)
Adds context menues depending on the types. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Logger logger
private static final String NETWORK_ICON
private JMenu menuSimulation
private Action loadSimuInputAction
private Action saveSimuInputAction
private Action runSimulationAction
private Action loadSimuResultAction
private Action saveSimeResultAction
private Events events
private Events simulationEvents
private SimulationToolbar simulationToolbar
private VerinecStudio verinecStudio
private Component configPanel
| Constructor Detail |
|---|
public Simulator()
| Method Detail |
|---|
public String toString()
IVerinecModule
toString in interface IVerinecModuletoString in class ObjectIVerinecModule.toString()
public void load(VerinecStudio parent)
throws VerinecException
IVerinecModule
load in interface IVerinecModuleparent - The analyser to use for call backs.
VerinecException - If something goes wrong while loading. The module will not be used after throwing an exception.IVerinecModule.load(verinec.gui.VerinecStudio)public void updateComponent(NwComponent c)
c - The component to update.public void resultAvailable(boolean b)
b - True if there is a result available, false otherwise.public void unload()
unload in interface IVerinecModuleIVerinecModule.unload()public void addSimuInput(Event input)
input - The input element.public void inputChanged()
public void enableSaveMenu()
public boolean calculateSimulation()
public void playSimulation()
public void loadResult(String filename)
calculateSimulation() method,
but loads an exisiting result file.
After the file is loaded, automatically starts the simulation.
filename - Name of a existing test result file.public void saveConfiguration(Component c)
c - Configuration panel.public void resetConfiguration(Component c)
c - Configuration panel.
public void editEvent(Event event,
boolean isNewEvent)
event - the event object that will be edited in the dialog.isNewEvent - true if a new event will be created, false otherwise.public void editEvents(int[] selectedIndices)
selectedIndices - public Events getEvents()
public void editEvent(int index)
index - the index of the Event from the Events List that should be edited.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||