uavsim.navigationmodel
Class Route

java.lang.Object
  extended by uavsim.navigationmodel.A_ChartElement
      extended by uavsim.navigationmodel.Route

public class Route
extends A_ChartElement

Defines a route as an ordered collection of waypoints.

Author:
Dan Tappan [17.07.11]

Field Summary
private  java.util.List<Waypoint> _waypoints
          the waypoints
private static java.awt.Color LINE_COLOR
          the color of the route line
private static Latitude LINE_WIDTH
          the width of the route line
 
Fields inherited from class uavsim.navigationmodel.A_ChartElement
_anchor, _coordinate, _id
 
Constructor Summary
Route(java.lang.String id)
          Creates a route chart element.
 
Method Summary
 void addWaypoint(Waypoint waypoint)
          Adds a waypoint to the route.
 java.awt.Color getColor()
          Gets the color of the glyph.
 java.util.List<Waypoint> getWaypoints()
          Gets the waypoints.
 void render(java.awt.Graphics2D graphics, I_WorldMappable mapper, boolean areDetailsVisible)
          Renders the glyph.
 java.lang.String toString()
          
 
Methods inherited from class uavsim.navigationmodel.A_ChartElement
areDetailsVisible, getCoordinate, getDesignator, getFrequency, getID, hasFrequency, renderLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_waypoints

private final java.util.List<Waypoint> _waypoints
the waypoints


LINE_COLOR

private static final java.awt.Color LINE_COLOR
the color of the route line


LINE_WIDTH

private static final Latitude LINE_WIDTH
the width of the route line

Constructor Detail

Route

public Route(java.lang.String id)
Creates a route chart element.

Parameters:
id - - the unique element identifier
Method Detail

addWaypoint

public void addWaypoint(Waypoint waypoint)
Adds a waypoint to the route.

Parameters:
waypoint - - the waypoint

getColor

public java.awt.Color getColor()
Gets the color of the glyph.

Specified by:
getColor in class A_ChartElement
Returns:
the color

getWaypoints

public java.util.List<Waypoint> getWaypoints()
Gets the waypoints.

Returns:
the waypoints as an unmodifiable list.

render

public void render(java.awt.Graphics2D graphics,
                   I_WorldMappable mapper,
                   boolean areDetailsVisible)
Renders the glyph.

Overrides:
render in class A_ChartElement
Parameters:
graphics - - the graphics context
mapper - - the mapper that translates screen and world coordinates
areDetailsVisible - - whether low-level details that would clutter the display should be rendered

toString

public java.lang.String toString()

Overrides:
toString in class A_ChartElement