Class Gui

java.lang.Object
de.tudresden.sumo.cmd.Gui

public class Gui extends Object
Author:
Mario Krumnow, Evamarie Wiessner
  • Constructor Details

    • Gui

      public Gui()
  • Method Details

    • getBoundary

      public static SumoCommand getBoundary(String viewID)
      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

      public static SumoCommand getIDList()
      Returns the list of available views (open windows).
      Returns:
      list of available views
    • getOffset

      public static SumoCommand getOffset(String viewID)
      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

      public static SumoCommand getSchema(String viewID)
      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

      public static SumoCommand getZoom(String viewID)
      Returns the current zoom factor.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      Returns:
      the current zoom level (in %)
    • screenshot

      public static SumoCommand screenshot(String viewID, String filename)
      Save a screenshot for the given view to the given filename.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      filename - 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 GUI
      xmin - x-coordinate (double) of the lower left corner of the current view
      ymin - y-coordinate (double) of the lower left corner of the current view
      xmax - x-coordinate (double) of the upper right corner of the current view
      ymax - y-coordinate (double) of the upper right corner of the current view
      Returns:
      SumoCommand
    • setOffset

      public static SumoCommand setOffset(String viewID, double x, double y)
      Set the current offset for the given view.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      x - x-offset of the center of the visible network
      y - y-offset of the center of the visible network
      Returns:
      SumoCommand
    • setSchema

      public static SumoCommand setSchema(String viewID, String schemeName)
      Set the current coloring scheme for the given view.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      schemeName - the coloring scheme
      Returns:
      SumoCommand
    • setZoom

      public static SumoCommand setZoom(String viewID, double zoom)
      Set the current zoom factor for the given view.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      zoom - desired zoom factor
      Returns:
      SumoCommand
    • trackVehicle

      public static SumoCommand trackVehicle(String viewID, String vehID)
      Start visually tracking the given vehicle on the given view.
      Parameters:
      viewID - a string identifying the view in the simulation GUI
      vehID - a string identifying the vehicle
      Returns:
      SumoCommand