Package de.tudresden.sumo.cmd
Class Gui
java.lang.Object
de.tudresden.sumo.cmd.Gui
- Author:
- Mario Krumnow, Evamarie Wiessner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SumoCommand
getBoundary
(String viewID) Returns the coordinates of the lower left and the upper right corner of the currently visible view.static SumoCommand
Returns the list of available views (open windows).static SumoCommand
Returns the x and y offset of the center of the current view.static SumoCommand
Returns the name of the current coloring scheme.static SumoCommand
Returns the current zoom factor.static SumoCommand
screenshot
(String viewID, String filename) Save a screenshot for the given view to the given filename.static SumoCommand
setBoundary
(String viewID, double xmin, double ymin, double xmax, double ymax) Set the current boundary for the given view (see getBoundary()).static SumoCommand
Set the current offset for the given view.static SumoCommand
Set the current coloring scheme for the given view.static SumoCommand
Set the current zoom factor for the given view.static SumoCommand
trackVehicle
(String viewID, String vehID) Start visually tracking the given vehicle on the given view.
-
Constructor Details
-
Gui
public Gui()
-
-
Method Details
-
getBoundary
Returns the coordinates of the lower left and the upper right corner of the currently visible view.- Parameters:
viewID
- a string identifying the view in the simulation GUI- Returns:
- coordinates of the lower left and the upper right corner of the visible network
-
getIDList
Returns the list of available views (open windows).- Returns:
- list of available views
-
getOffset
Returns the x and y offset of the center of the current view.- Parameters:
viewID
- a string identifying the view in the simulation GUI- Returns:
- the x and y offset of the center of the visible network
-
getSchema
Returns the name of the current coloring scheme.- Parameters:
viewID
- a string identifying the view in the simulation GUI- Returns:
- the visualization scheme (e.g. "standard")
-
getZoom
Returns the current zoom factor.- Parameters:
viewID
- a string identifying the view in the simulation GUI- Returns:
- the current zoom level (in %)
-
screenshot
Save a screenshot for the given view to the given filename.- Parameters:
viewID
- a string identifying the view in the simulation GUIfilename
- a string to name the file, the fileformat is guessed from the extension, the available formats differ from platform to platform but should at least include ps, svg and pdf, on linux probably gif, png and jpg as well- Returns:
- SumoCommand
-
setBoundary
public static SumoCommand setBoundary(String viewID, double xmin, double ymin, double xmax, double ymax) Set the current boundary for the given view (see getBoundary()).- Parameters:
viewID
- a string identifying the view in the simulation GUIxmin
- x-coordinate (double) of the lower left corner of the current viewymin
- y-coordinate (double) of the lower left corner of the current viewxmax
- x-coordinate (double) of the upper right corner of the current viewymax
- y-coordinate (double) of the upper right corner of the current view- Returns:
- SumoCommand
-
setOffset
Set the current offset for the given view.- Parameters:
viewID
- a string identifying the view in the simulation GUIx
- x-offset of the center of the visible networky
- y-offset of the center of the visible network- Returns:
- SumoCommand
-
setSchema
Set the current coloring scheme for the given view.- Parameters:
viewID
- a string identifying the view in the simulation GUIschemeName
- the coloring scheme- Returns:
- SumoCommand
-
setZoom
Set the current zoom factor for the given view.- Parameters:
viewID
- a string identifying the view in the simulation GUIzoom
- desired zoom factor- Returns:
- SumoCommand
-
trackVehicle
Start visually tracking the given vehicle on the given view.- Parameters:
viewID
- a string identifying the view in the simulation GUIvehID
- a string identifying the vehicle- Returns:
- SumoCommand
-