public class Gui
extends Object
Constructor and Description |
---|
Gui() |
Modifier and Type | Method and Description |
---|---|
static SumoCommand |
getBoundary(String viewID)
Returns the coordinates of the lower left and the upper right corner of
the currently visible view.
|
static SumoCommand |
getIDList()
Returns the list of available views (open windows).
|
static SumoCommand |
getOffset(String viewID)
Returns the x and y offset of the center of the current view.
|
static SumoCommand |
getSchema(String viewID)
Returns the name of the current coloring scheme.
|
static SumoCommand |
getZoom(String viewID)
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 |
setOffset(String viewID,
double x,
double y)
Set the current offset for the given view.
|
static SumoCommand |
setSchema(String viewID,
String schemeName)
Set the current coloring scheme for the given view.
|
static SumoCommand |
setZoom(String viewID,
double zoom)
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.
|
public static SumoCommand getBoundary(String viewID)
viewID
- a string identifying the view in the simulation GUIpublic static SumoCommand getIDList()
public static SumoCommand getOffset(String viewID)
viewID
- a string identifying the view in the simulation GUIpublic static SumoCommand getSchema(String viewID)
viewID
- a string identifying the view in the simulation GUIpublic static SumoCommand getZoom(String viewID)
viewID
- a string identifying the view in the simulation GUIpublic static SumoCommand screenshot(String viewID, String filename)
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 wellpublic static SumoCommand setBoundary(String viewID, double xmin, double ymin, double xmax, double ymax)
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
viewpublic static SumoCommand setOffset(String viewID, double x, double y)
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 networkpublic static SumoCommand setSchema(String viewID, String schemeName)
viewID
- a string identifying the view in the simulation GUIschemeName
- the coloring schemepublic static SumoCommand setZoom(String viewID, double zoom)
viewID
- a string identifying the view in the simulation GUIzoom
- desired zoom factorpublic static SumoCommand trackVehicle(String viewID, String vehID)
viewID
- a string identifying the view in the simulation GUIvehID
- a string identifying the vehicle