Package de.tudresden.sumo.cmd
Class Polygon
java.lang.Object
de.tudresden.sumo.cmd.Polygon
The Class Polygon.
- Author:
- Mario Krumnow, Evamarie Wiessner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SumoCommand
add
(String polygonID, SumoGeometry shape, SumoColor color, boolean fill, String polygonType, int layer) Add a new polygon.static SumoCommand
Returns the color of this polygon.static SumoCommand
Returns the shape of this polygon.static SumoCommand
Returns the number of all Polygons in the network.static SumoCommand
Returns a list of IDs of all polygons.static SumoCommand
getParameter
(String polygonID, String param) Returns the chosen parameter.static SumoCommand
Returns the shape of this polygon.static SumoCommand
Returns the type of the polygon.static SumoCommand
Remove a polygon.static SumoCommand
Set the color of this polygon.static SumoCommand
Set the color of this polygon.static SumoCommand
setParameter
(String polygonID, String param, String value) Sets the chosen parameter.static SumoCommand
setShape
(String polygonID, SumoStringList shape) Set the shape of this polygon.static SumoCommand
Set the type of the polygon.
-
Constructor Details
-
Polygon
public Polygon()
-
-
Method Details
-
getColor
Returns the color of this polygon.- Parameters:
polygonID
- a string identifying the polygon- Returns:
- color of the polygon
-
getIDList
Returns a list of IDs of all polygons.- Returns:
- a list of IDs of all polygons
-
getIDCount
Returns the number of all Polygons in the network.- Returns:
- the number of polygons in the network
-
getParameter
Returns the chosen parameter.- Parameters:
polygonID
- a string identifying the polygonparam
- a string identifying the parameter- Returns:
- the specific parameter
-
setParameter
Sets the chosen parameter.- Parameters:
polygonID
- the polygon IDparam
- a string identifying the parametervalue
- a string identifying the new value- Returns:
- SumoCommand
-
getShape
Returns the shape of this polygon.- Parameters:
polygonID
- a string identifying the polygon return the shape of the polygon- Returns:
- the shape
-
getFilled
Returns the shape of this polygon.- Parameters:
polygonID
- a string identifying the polygon return the shape of the polygon- Returns:
- the shape
-
getType
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 polygonshape
- shape of the polygoncolor
- value (r,g,b,a) of colorfill
- polygon is filled if the value is != 0polygonType
- type of the polygonlayer
- an integer identifying the layer- Returns:
- SumoCommand
-
remove
Remove a polygon.- Parameters:
polygonID
- a string identifying the polygonlayer
- an integer identifying the layer- Returns:
- SumoCommand
-
setColor
Set the color of this polygon.- Parameters:
polygonID
- a string identifying the polygoncolor
- value (r,g,b,a) of color- Returns:
- SumoCommand
-
setFilled
Set the color of this polygon.- Parameters:
polygonID
- a string identifying the polygonfill
- parameter if polygon should be filled- Returns:
- SumoCommand
-
setShape
Set the shape of this polygon.- Parameters:
polygonID
- a string identifying the polygonshape
- shape of the polygon- Returns:
- SumoCommand
-
setType
Set the type of the polygon.- Parameters:
polygonID
- a string identifying the polygonpolygonType
- type of the polygon- Returns:
- SumoCommand
-