NASA World Wind

gov.nasa.worldwind.symbology.milstd2525.graphics
Class EchelonSymbol

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.symbology.AbstractTacticalSymbol
              extended by gov.nasa.worldwind.symbology.milstd2525.graphics.EchelonSymbol
All Implemented Interfaces:
AVList, MessageListener, Movable, Highlightable, OrderedRenderable, Renderable, TacticalSymbol, WWObject, PropertyChangeListener, EventListener

public class EchelonSymbol
extends AbstractTacticalSymbol

Tactical symbol implementation to render the echelon modifier as part of a tactical graphic.


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
AbstractTacticalSymbol.IconAtlasElement, AbstractTacticalSymbol.IconSource, AbstractTacticalSymbol.IconTexture, AbstractTacticalSymbol.Label, AbstractTacticalSymbol.Line
 
Field Summary
protected static Offset DEFAULT_OFFSET
           
protected  Position orientationPosition
          The label is drawn along a line from the label position to the orientation position.
protected  Angle rotation
          Rotation to apply to symbol, computed each frame.
protected  String sidc
          Identifier for this graphic.
 
Fields inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
activeAttrs, activeIconTexture, activeModifiers, altitudeMode, BEogsh, currentGlyphs, currentLabels, currentLines, DEFAULT_DEPTH_OFFSET, DEFAULT_GLYPH_ATLAS, DEFAULT_LABEL_LINES, DEFAULT_MAX_TIME_SINCE_LAST_USED, DEFAULT_UNITS_FORMAT, defaultAttrs, delegateOwner, depthOffset, dx, dy, enableBatchPicking, enableBatchRendering, eyeDistance, formattedPosition, frameNumber, glyphAtlas, glyphMap, highlightAttrs, highlighted, iconOffset, iconRect, iconRectScaled, iconRetriever, iconSize, iconTexture, LAYOUT_ABSOLUTE, LAYOUT_NONE, LAYOUT_RELATIVE, layoutRect, layoutRectScaled, LOADING_IMAGE_PATH, MAX_SYMBOL_DIMENSION, maxTimeSinceLastUsed, modifierRetriever, modifiers, normalAttrs, offset, pickLayer, pickSupport, placePoint, position, screenPoint, screenRect, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, staticLayoutRect, staticScreenRect, sx, sy, unitsFormat, unresolvedGlyph, visible
 
Constructor Summary
EchelonSymbol(String sidc)
          Constructs a new symbol with the specified position.
 
Method Summary
protected  AVList assembleIconRetrieverParameters(AVList params)
           
protected  Angle computeRotation(Vec4 screenPoint, Vec4 orientationScreenPoint)
          Compute the amount of rotation to apply to a label in order to keep it oriented toward its orientation position.
protected  void computeTransform(DrawContext dc)
           
protected  void drawIcon(DrawContext dc)
          Overridden to apply rotation.
 String getIdentifier()
          Indicates a string identifier for this symbol.
 Position getOrientationPosition()
          Indicates the orientation position.
 void setOrientationPosition(Position orientationPosition)
          Specifies the orientation position.
 
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
addGlyph, addGlyph, addLabel, addLabel, addLine, addLine, applyImplicitModifiers, beginDrawing, computeMinTextLayout, computeScale, computeScaledBounds, computeScaledRect, computeScreenExtent, computeSymbolPoints, createPickedObject, determineActiveAttributes, doDrawOrderedRenderable, draw, drawBatched, drawGlyphs, drawGraphicModifiers, drawLabels, drawLines, drawOrderedRenderable, drawTextModifiers, endDrawing, getActiveAttributes, getAltitudeMode, getAttributes, getDelegateOwner, getDepthOffset, getDistanceFromEye, getFormattedPosition, getGlyph, getGlyphAtlas, getHighlightAttributes, getIconRetriever, getMaxLabelLines, getMaxSymbolDimension, getModifier, getModifierRetriever, getOffset, getPosition, getReferencePosition, getUnitsFormat, intersectsFrustum, isEnableBatchPicking, isEnableBatchRendering, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, layout, layoutDynamicModifiers, layoutGraphicModifiers, layoutIcon, layoutLabelRect, layoutPoints, layoutRect, layoutStaticModifiers, layoutTextModifiers, makeOrderedRenderable, move, moveTo, mustDrawGraphicModifiers, mustDrawIcon, mustDrawTextModifiers, mustLayout, pick, prepareToDraw, removeDeadModifiers, render, reset, setAltitudeMode, setAttributes, setDelegateOwner, setDepthOffset, setEnableBatchPicking, setEnableBatchRendering, setGlyphAtlas, setHighlightAttributes, setHighlighted, setIconRetriever, setModifier, setModifierRetriever, setOffset, setPosition, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setUnitsFormat, setVisible
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
 

Field Detail

DEFAULT_OFFSET

protected static final Offset DEFAULT_OFFSET

orientationPosition

protected Position orientationPosition
The label is drawn along a line from the label position to the orientation position.


rotation

protected Angle rotation
Rotation to apply to symbol, computed each frame.


sidc

protected String sidc
Identifier for this graphic.

Constructor Detail

EchelonSymbol

public EchelonSymbol(String sidc)
Constructs a new symbol with the specified position. The position specifies the latitude, longitude, and altitude where this symbol is drawn on the globe. The position's altitude component is interpreted according to the altitudeMode.

Parameters:
sidc - MIL-STD-2525C sidc code.
Throws:
IllegalArgumentException - if sidc is null, or does not contain a value for the Echelon field.
Method Detail

assembleIconRetrieverParameters

protected AVList assembleIconRetrieverParameters(AVList params)
Overrides:
assembleIconRetrieverParameters in class AbstractTacticalSymbol

computeRotation

protected Angle computeRotation(Vec4 screenPoint,
                                Vec4 orientationScreenPoint)
Compute the amount of rotation to apply to a label in order to keep it oriented toward its orientation position.

Parameters:
screenPoint - Geographic position of the text, projected onto the screen.
orientationScreenPoint - Orientation position, projected onto the screen.
Returns:
The rotation angle to apply when drawing the label.

computeTransform

protected void computeTransform(DrawContext dc)
Overrides:
computeTransform in class AbstractTacticalSymbol

drawIcon

protected void drawIcon(DrawContext dc)
Overridden to apply rotation.

Overrides:
drawIcon in class AbstractTacticalSymbol

getIdentifier

public String getIdentifier()
Indicates a string identifier for this symbol. The format of the identifier depends on the symbol set to which this symbol belongs. For symbols belonging to the MIL-STD-2525 symbol set, this returns a 15-character alphanumeric symbol identification code (SIDC).

Returns:
an identifier for this symbol.

getOrientationPosition

public Position getOrientationPosition()
Indicates the orientation position. The label oriented on a line drawn from the label's position to the orientation position.

Returns:
Position used to orient the label. May be null.

setOrientationPosition

public void setOrientationPosition(Position orientationPosition)
Specifies the orientation position. The label is oriented on a line drawn from the label's position to the orientation position. If the orientation position is null then the label is drawn with no rotation.

Parameters:
orientationPosition - Draw label oriented toward this position.

NASA World Wind