Package de.tudresden.sumo.cmd
Class Poi
- java.lang.Object
-
- de.tudresden.sumo.cmd.Poi
-
public class Poi extends Object
The Class Poi.- Author:
- Mario Krumnow, Evamarie Wiessner
-
-
Constructor Summary
Constructors Constructor Description Poi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SumoCommandadd(String poiID, double x, double y, SumoColor color, String poiType, int layer, String imgFile, double width, double height, double angle)Add a new point-of-interest.static SumoCommandgetColor(String poiID)Returns the color of this poi.static SumoCommandgetIDCount()Returns the number of all Poi's in the network.static SumoCommandgetIDList()Returns a list of IDs of all poi.static SumoCommandgetParameter(String poiID, String param)Returns the chosen parameter.static SumoCommandgetPosition(String poiID)Returns the position of this poi.static SumoCommandgetType(String poiID)Returns the type of the poi.static SumoCommandremove(String poiID, int layer)Remove a poi.static SumoCommandsetColor(String poiID, SumoColor color)Set the color of this poi.static SumoCommandsetParameter(String poiID, String param, String value)Sets the chosen parameter.static SumoCommandsetPosition(String poiID, double x, double y)Set the position of this poi.static SumoCommandsetType(String poiID, String poiType)Set the type of the poi.
-
-
-
Method Detail
-
add
public static SumoCommand add(String poiID, double x, double y, SumoColor color, String poiType, int layer, String imgFile, double width, double height, double angle)
Add a new point-of-interest.- Parameters:
poiID- a string identifying the point-of-interestx- x-coordinate of the pointy- y-coordinate of the pointcolor- value (r,g,b,a) of colorpoiType- a string identifying the type of a poilayer- an integer identifying the layerimgFile- image filewidth- width of the poiheight- height of the poiangle- angle of the poi- Returns:
- SumoCommand
-
getIDCount
public static SumoCommand getIDCount()
Returns the number of all Poi's in the network.- Returns:
- the number of POI's in the network
-
getColor
public static SumoCommand getColor(String poiID)
Returns the color of this poi.- Parameters:
poiID- a string identifying the point-of-interest- Returns:
- color value
-
getIDList
public static SumoCommand getIDList()
Returns a list of IDs of all poi.- Returns:
- a list of IDs of all points of interest
-
getParameter
public static SumoCommand getParameter(String poiID, String param)
Returns the chosen parameter.- Parameters:
poiID- a string identifying the poiparam- a string identifying the parameter- Returns:
- the specific parameter
-
setParameter
public static SumoCommand setParameter(String poiID, String param, String value)
Sets the chosen parameter.- Parameters:
poiID- the poi IDparam- a string identifying the parametervalue- a string identifying the new value- Returns:
- SumoCommand
-
getPosition
public static SumoCommand getPosition(String poiID)
Returns the position of this poi.- Parameters:
poiID- a string identifying the point-of-interest- Returns:
- position of the point
-
getType
public static SumoCommand getType(String poiID)
Returns the type of the poi.- Parameters:
poiID- a string identifying the point-of-interest- Returns:
- type of the point
-
remove
public static SumoCommand remove(String poiID, int layer)
Remove a poi.- Parameters:
poiID- a string identifying the point-of-interestlayer- an integer identifying the layer- Returns:
- SumoCommand
-
setColor
public static SumoCommand setColor(String poiID, SumoColor color)
Set the color of this poi.- Parameters:
poiID- a string identifying the point-of-interestcolor- value (r,g,b,a) of color- Returns:
- SumoCommand
-
setPosition
public static SumoCommand setPosition(String poiID, double x, double y)
Set the position of this poi.- Parameters:
poiID- a string identifying the point-of-interestx- x-coordinate of the pointy- y-coordinate of the point- Returns:
- SumoCommand
-
setType
public static SumoCommand setType(String poiID, String poiType)
Set the type of the poi.- Parameters:
poiID- a string identifying the point-of-interestpoiType- a string identifying the type of a poi- Returns:
- SumoCommand
-
-