Package de.tudresden.sumo.cmd
Class Polygon
java.lang.Object
de.tudresden.sumo.cmd.Polygon
The Class Polygon.
- Author:
- Mario Krumnow, Evamarie Wiessner
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic SumoCommandadd(String polygonID, SumoGeometry shape, SumoColor color, boolean fill, String polygonType, int layer) Add a new polygon.static SumoCommandReturns the color of this polygon.static SumoCommandReturns the shape of this polygon.static SumoCommandReturns the number of all Polygons in the network.static SumoCommandReturns a list of IDs of all polygons.static SumoCommandgetParameter(String polygonID, String param) Returns the chosen parameter.static SumoCommandReturns the shape of this polygon.static SumoCommandReturns the type of the polygon.static SumoCommandRemove a polygon.static SumoCommandSet the color of this polygon.static SumoCommandSet the color of this polygon.static SumoCommandsetParameter(String polygonID, String param, String value) Sets the chosen parameter.static SumoCommandsetShape(String polygonID, SumoStringList shape) Set the shape of this polygon.static SumoCommandSet the type of the polygon.
- 
Constructor Details- 
Polygonpublic Polygon()
 
- 
- 
Method Details- 
getColorReturns the color of this polygon.- Parameters:
- polygonID- a string identifying the polygon
- Returns:
- color of the polygon
 
- 
getIDListReturns a list of IDs of all polygons.- Returns:
- a list of IDs of all polygons
 
- 
getIDCountReturns the number of all Polygons in the network.- Returns:
- the number of polygons in the network
 
- 
getParameterReturns the chosen parameter.- Parameters:
- polygonID- a string identifying the polygon
- param- a string identifying the parameter
- Returns:
- the specific parameter
 
- 
setParameterSets the chosen parameter.- Parameters:
- polygonID- the polygon ID
- param- a string identifying the parameter
- value- a string identifying the new value
- Returns:
- SumoCommand
 
- 
getShapeReturns the shape of this polygon.- Parameters:
- polygonID- a string identifying the polygon return the shape of the polygon
- Returns:
- the shape
 
- 
getFilledReturns the shape of this polygon.- Parameters:
- polygonID- a string identifying the polygon return the shape of the polygon
- Returns:
- the shape
 
- 
getTypeReturns the type of the polygon.- Parameters:
- polygonID- a string identifying the polygon
- Returns:
- type of the polygon
 
- 
addpublic 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
 
- 
removeRemove a polygon.- Parameters:
- polygonID- a string identifying the polygon
- layer- an integer identifying the layer
- Returns:
- SumoCommand
 
- 
setColorSet the color of this polygon.- Parameters:
- polygonID- a string identifying the polygon
- color- value (r,g,b,a) of color
- Returns:
- SumoCommand
 
- 
setFilledSet the color of this polygon.- Parameters:
- polygonID- a string identifying the polygon
- fill- parameter if polygon should be filled
- Returns:
- SumoCommand
 
- 
setShapeSet the shape of this polygon.- Parameters:
- polygonID- a string identifying the polygon
- shape- shape of the polygon
- Returns:
- SumoCommand
 
- 
setTypeSet the type of the polygon.- Parameters:
- polygonID- a string identifying the polygon
- polygonType- type of the polygon
- Returns:
- SumoCommand
 
 
-