gui
Class DTNSimGUI

java.lang.Object
  extended by ui.DTNSimUI
      extended by gui.DTNSimGUI

public class DTNSimGUI
extends DTNSimUI

Graphical User Interface for simulator


Field Summary
 
Fields inherited from class ui.DTNSimUI
lastUpdate, MM_WARMUP_S, NROF_REPORT_S, REPORT_S, reports, scen, simCancelled, simDone, world
 
Constructor Summary
DTNSimGUI()
           
 
Method Summary
 void centerViewAt(Coord loc)
          Sets certain location to be in the center of the playfield view
 void closeSim()
          Closes the program if simulation is done or cancels it.
 Coord getCenterViewCoord()
          Returns the world coordinates that are currently in the center of the viewport
 InfoPanel getInfoPanel()
          Returns the info panel of the GUI
 MainWindow getParentFrame()
          Returns the parent frame (window) of the gui.
protected  void runSim()
          Runs simulation after the model has been initialized.
 void setFocus(DTNHost host)
          Sets a node's graphical presentation in the center of the playfield view
 void setPaused(boolean paused)
          Sets the pause of the simulation on/off
 void showPath(Path path)
          Shows a path on the playfield
 void update(boolean forcedUpdate)
          Updates the GUI
 
Methods inherited from class ui.DTNSimUI
addReport, done, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTNSimGUI

public DTNSimGUI()
Method Detail

runSim

protected void runSim()
Description copied from class: DTNSimUI
Runs simulation after the model has been initialized.

Specified by:
runSim in class DTNSimUI

closeSim

public void closeSim()
Closes the program if simulation is done or cancels it.


update

public void update(boolean forcedUpdate)
Updates the GUI


setPaused

public void setPaused(boolean paused)
Sets the pause of the simulation on/off

Parameters:
paused - True if pause should be set on

setFocus

public void setFocus(DTNHost host)
Sets a node's graphical presentation in the center of the playfield view

Parameters:
host - The node to center

showPath

public void showPath(Path path)
Shows a path on the playfield

Parameters:
path - The path to show

getCenterViewCoord

public Coord getCenterViewCoord()
Returns the world coordinates that are currently in the center of the viewport

Returns:
The coordinates

centerViewAt

public void centerViewAt(Coord loc)
Sets certain location to be in the center of the playfield view

Parameters:
loc - The location to center

getInfoPanel

public InfoPanel getInfoPanel()
Returns the info panel of the GUI

Returns:
the info panel of the GUI

getParentFrame

public MainWindow getParentFrame()
Returns the parent frame (window) of the gui.

Returns:
The parent frame