uavsim.navigationmodel
Class Waypoint

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

public class Waypoint
extends A_ChartElement

Defines a waypoint.

Author:
Dan Tappan [17.07.11]

Field Summary
private  java.lang.String _label
          the waypoint label, which may be empty
private static java.awt.Color COLOR
          the color of the glyph
private static Latitude RADIUS
          the radius of the glyph
 
Fields inherited from class uavsim.navigationmodel.A_ChartElement
_anchor, _coordinate, _id
 
Constructor Summary
Waypoint(java.lang.String id, CoordinateWorld3D coordinate, java.lang.String label)
          Creates a waypoint chart element.
 
Method Summary
 java.awt.Color getColor()
          Gets the color of the glyph.
 java.lang.String getLabel()
          Gets the waypoint label, which may be empty.
 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

_label

private final java.lang.String _label
the waypoint label, which may be empty


COLOR

private static final java.awt.Color COLOR
the color of the glyph


RADIUS

private static final Latitude RADIUS
the radius of the glyph

Constructor Detail

Waypoint

public Waypoint(java.lang.String id,
                CoordinateWorld3D coordinate,
                java.lang.String label)
Creates a waypoint chart element.

Parameters:
id - - the unique element identifier
coordinate - - the coordinate of the origin
label - - the waypoint label, which may be empty
Method Detail

getColor

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

Specified by:
getColor in class A_ChartElement
Returns:
the color

getLabel

public java.lang.String getLabel()
Gets the waypoint label, which may be empty.

Returns:
the label

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