NASA World Wind

gov.nasa.worldwind.symbology.milstd2525.graphics.areas
Class BattlePosition

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.symbology.AbstractTacticalGraphic
          extended by gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
              extended by gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
                  extended by gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BattlePosition
All Implemented Interfaces:
AVList, Movable, Highlightable, PreRenderable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic

public class BattlePosition
extends BasicArea

Implementation of Battle Position graphics. This class implements the following graphics:

The Echelon label (field B) will be placed between the first and second control points.


Field Summary
protected  TacticalSymbol echelonSymbol
          Tactical symbol used to render the echelon modifier.
protected static int PBNO_OUTLINE_STIPPLE_FACTOR
          Factor applied to the stipple pattern used to draw the dashed line for a Prepared but not Occupied area.
protected  TacticalSymbolAttributes symbolAttributes
          Attribute bundle for the echelon symbol.
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
identityLabel1, identityLabel2, polygon
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCode
 
Fields inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
activeOverrides, activeShapeAttributes, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_LABEL_INTERIOR_OPACITY, delegateOwner, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
 
Constructor Summary
BattlePosition(String sidc)
          Create a new area graphic.
 
Method Summary
protected  void applyDefaultAttributes(ShapeAttributes attributes)
          Apply defaults to the active attributes bundle.
protected  void applyDelegateOwner(Object owner)
          Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic.
protected  TacticalSymbol createEchelonSymbol(String sidc)
          Create a tactical symbol to render the echelon modifier.
protected  String createLabelText()
          Create the text for the main label on this graphic.
protected  void determineActiveAttributes()
          Determine active attributes for this frame.
protected  void determineIdentityLabelPositions()
           Overridden to determine the position of the echelon label as well as the identity labels.
protected  void determineLabelPositions(DrawContext dc)
          Determine the appropriate position for the graphic's labels.
protected  void doRenderGraphicModifiers(DrawContext dc)
          Render the graphic modifiers.
protected  String getGraphicLabel()
           
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
createLabels, createPolygon, determineMainLabelPosition, doRenderGraphic, getLabelAlignment, getPositionCount, getPositions, getReferencePosition, makeShapes, preRender, setPositions
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier, setStatus
 
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
addLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineDelegateOwner, determinePerFrameAttributes, doRenderTextModifiers, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, onModifierChanged, render, setAttributes, setDelegateOwner, setHighlightAttributes, setHighlighted, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
 
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.symbology.TacticalGraphic
getAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
 
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
 
Methods inherited from interface gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
 
Methods inherited from interface gov.nasa.worldwind.Movable
move, moveTo
 
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
 

Field Detail

echelonSymbol

protected TacticalSymbol echelonSymbol
Tactical symbol used to render the echelon modifier.


PBNO_OUTLINE_STIPPLE_FACTOR

protected static final int PBNO_OUTLINE_STIPPLE_FACTOR
Factor applied to the stipple pattern used to draw the dashed line for a Prepared but not Occupied area.

See Also:
Constant Field Values

symbolAttributes

protected TacticalSymbolAttributes symbolAttributes
Attribute bundle for the echelon symbol.

Constructor Detail

BattlePosition

public BattlePosition(String sidc)
Create a new area graphic.

Parameters:
sidc - Symbol code the identifies the graphic.
Method Detail

applyDefaultAttributes

protected void applyDefaultAttributes(ShapeAttributes attributes)
Description copied from class: AbstractMilStd2525TacticalGraphic
Apply defaults to the active attributes bundle. The default attributes are determined by the type of graphic. This method is called each frame to reset the active shape attributes to the appropriate default state. Override attributes specified by the application may be applied after the defaults have been set.

Overrides:
applyDefaultAttributes in class AbstractMilStd2525TacticalGraphic
Parameters:
attributes - Attributes bundle to receive defaults.

applyDelegateOwner

protected void applyDelegateOwner(Object owner)
Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic. This base class will apply the delegate owner to Label objects. Subclasses must implement this method to apply the delegate owner to any Renderables that they will draw in order to render the graphic. Overridden to apply delegate owner to echelon symbol.

Overrides:
applyDelegateOwner in class BasicArea
Parameters:
owner - Current delegate owner.

createEchelonSymbol

protected TacticalSymbol createEchelonSymbol(String sidc)
Create a tactical symbol to render the echelon modifier.

Parameters:
sidc - Identifier for the symbol.
Returns:
A symbol to render the echelon modifier.

createLabelText

protected String createLabelText()
Create the text for the main label on this graphic.

Overrides:
createLabelText in class BasicArea
Returns:
Text for the main label. May return null if there is no text.

determineActiveAttributes

protected void determineActiveAttributes()
Determine active attributes for this frame. Overridden to update echelon symbol attributes.

Overrides:
determineActiveAttributes in class AbstractTacticalGraphic

determineIdentityLabelPositions

protected void determineIdentityLabelPositions()
Overridden to determine the position of the echelon label as well as the identity labels.

Overrides:
determineIdentityLabelPositions in class BasicArea

determineLabelPositions

protected void determineLabelPositions(DrawContext dc)
Determine the appropriate position for the graphic's labels. Overridden to determine the position of the echelon label.

Overrides:
determineLabelPositions in class BasicArea
Parameters:
dc - Current draw context.

doRenderGraphicModifiers

protected void doRenderGraphicModifiers(DrawContext dc)
Render the graphic modifiers. This base class does not render anything, but subclasses may override this method to draw graphic modifiers. Overridden to render the echelon modifier.

Overrides:
doRenderGraphicModifiers in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.

getGraphicLabel

protected String getGraphicLabel()
Overrides:
getGraphicLabel in class BasicArea

getSupportedGraphics

public static List<String> getSupportedGraphics()
Indicates the graphics supported by this class.

Returns:
List of masked SIDC strings that identify graphics that this class supports.

NASA World Wind