Class Polygon

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

public class Polygon extends Object
The Class Polygon.
Author:
Mario Krumnow, Evamarie Wiessner
  • Constructor Details

    • Polygon

      public Polygon()
  • Method Details

    • getColor

      public static SumoCommand getColor(String polygonID)
      Returns the color of this polygon.
      Parameters:
      polygonID - a string identifying the polygon
      Returns:
      color of the polygon
    • getIDList

      public static SumoCommand getIDList()
      Returns a list of IDs of all polygons.
      Returns:
      a list of IDs of all polygons
    • getIDCount

      public static SumoCommand getIDCount()
      Returns the number of all Polygons in the network.
      Returns:
      the number of polygons in the network
    • getParameter

      public static SumoCommand getParameter(String polygonID, String param)
      Returns the chosen parameter.
      Parameters:
      polygonID - a string identifying the polygon
      param - a string identifying the parameter
      Returns:
      the specific parameter
    • setParameter

      public static SumoCommand setParameter(String polygonID, String param, String value)
      Sets the chosen parameter.
      Parameters:
      polygonID - the polygon ID
      param - a string identifying the parameter
      value - a string identifying the new value
      Returns:
      SumoCommand
    • getShape

      public static SumoCommand getShape(String polygonID)
      Returns the shape of this polygon.
      Parameters:
      polygonID - a string identifying the polygon return the shape of the polygon
      Returns:
      the shape
    • getFilled

      public static SumoCommand getFilled(String polygonID)
      Returns the shape of this polygon.
      Parameters:
      polygonID - a string identifying the polygon return the shape of the polygon
      Returns:
      the shape
    • getType

      public static SumoCommand getType(String polygonID)
      Returns the type of the polygon.
      Parameters:
      polygonID - a string identifying the polygon
      Returns:
      type of the polygon
    • add

      public static SumoCommand add(String polygonID, SumoGeometry shape, SumoColor color, boolean fill, String polygonType, int layer)
      Add a new polygon.
      Parameters:
      polygonID - a string identifying the polygon
      shape - shape of the polygon
      color - value (r,g,b,a) of color
      fill - polygon is filled if the value is != 0
      polygonType - type of the polygon
      layer - an integer identifying the layer
      Returns:
      SumoCommand
    • remove

      public static SumoCommand remove(String polygonID, int layer)
      Remove a polygon.
      Parameters:
      polygonID - a string identifying the polygon
      layer - an integer identifying the layer
      Returns:
      SumoCommand
    • setColor

      public static SumoCommand setColor(String polygonID, SumoColor color)
      Set the color of this polygon.
      Parameters:
      polygonID - a string identifying the polygon
      color - value (r,g,b,a) of color
      Returns:
      SumoCommand
    • setFilled

      public static SumoCommand setFilled(String polygonID, boolean fill)
      Set the color of this polygon.
      Parameters:
      polygonID - a string identifying the polygon
      fill - parameter if polygon should be filled
      Returns:
      SumoCommand
    • setShape

      public static SumoCommand setShape(String polygonID, SumoStringList shape)
      Set the shape of this polygon.
      Parameters:
      polygonID - a string identifying the polygon
      shape - shape of the polygon
      Returns:
      SumoCommand
    • setType

      public static SumoCommand setType(String polygonID, String polygonType)
      Set the type of the polygon.
      Parameters:
      polygonID - a string identifying the polygon
      polygonType - type of the polygon
      Returns:
      SumoCommand