NASA World Wind

gov.nasa.worldwind.symbology.milstd2525
Class AbstractMilStd2525TacticalGraphic

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
All Implemented Interfaces:
AVList, Movable, Highlightable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic
Direct Known Subclasses:
AbstractAxisArrow, AbstractCircularGraphic, AbstractRectangularGraphic, Ambush, AttackByFirePosition, BasicArea, CircularRangeFan, DirectionOfAttack, Dummy, FireSupportLine, ForwardEdgeOfBattleArea, HoldingLine, InfiltrationLane, LimitedAccessArea, LinearTarget, MinimumSafeDistanceZones, PhaseLine, PrincipleDirectionOfFire, Route, SearchArea, SectorRangeFan

public abstract class AbstractMilStd2525TacticalGraphic
extends AbstractTacticalGraphic
implements MilStd2525TacticalGraphic, Renderable

Base class for MIL-STD-2525 tactical graphics.


Field Summary
protected  String maskedSymbolCode
          Symbol identifier with fields that do not influence the type of graphic replaced with hyphens.
protected static int OUTLINE_STIPPLE_FACTOR_ANTICIPATED
          Factor applied to the stipple pattern used to draw graphics in anticipated state.
protected static int OUTLINE_STIPPLE_FACTOR_PRESENT
          Factor applied to the stipple pattern used to draw graphics in present state.
protected static short OUTLINE_STIPPLE_PATTERN
          Stipple pattern applied to graphics in the anticipated state.
protected  SymbolCode symbolCode
          Indicates a string identifier for this symbol.
 
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
protected AbstractMilStd2525TacticalGraphic(String symbolCode)
           
 
Method Summary
protected  void applyDefaultAttributes(ShapeAttributes attributes)
          Apply defaults to the active attributes bundle.
protected  TacticalSymbol createSymbol(String sidc, Position position, TacticalSymbolAttributes attrs)
           
protected  Material getDefaultMaterial()
          Indicates the default Material for this graphic.
 String getIdentifier()
          Indicates a string identifier for this graphic.
 Object getModifier(String modifier)
          Indicates the current value of a text or graphic modifier.
protected  int getOutlineStippleFactor()
          Indicates the factor applied to the stipple pattern used to draw dashed lines when the graphic is "anticipated".
protected  short getOutlineStipplePattern()
          Indicates the stipple pattern used to draw dashed lines when the graphic is "anticipated".
 String getStatus()
          Indicates the current value of graphic's Status/Operational Condition field.
 String getText()
          Convenience method to access the text modifier of the graphic.
protected  boolean mustShowHostileIndicator()
          Indicates whether or not the graphic must display the hostile/enemy indicator, if the graphic supports the indicator.
 void setModifier(String modifier, Object value)
          Specifies the value of a text or graphic modifier.
 void setStatus(String value)
          Specifies this graphic's Status/Operational Condition field.
 
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
addLabel, applyDelegateOwner, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, createLabels, determineActiveAttributes, determineDelegateOwner, determineLabelPositions, determinePerFrameAttributes, doRenderGraphic, doRenderGraphicModifiers, 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, getPositions, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setPositions, 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
getReferencePosition, 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

maskedSymbolCode

protected String maskedSymbolCode
Symbol identifier with fields that do not influence the type of graphic replaced with hyphens. See SymbolCode.toMaskedString().


OUTLINE_STIPPLE_FACTOR_ANTICIPATED

protected static final int OUTLINE_STIPPLE_FACTOR_ANTICIPATED
Factor applied to the stipple pattern used to draw graphics in anticipated state.

See Also:
Constant Field Values

OUTLINE_STIPPLE_FACTOR_PRESENT

protected static final int OUTLINE_STIPPLE_FACTOR_PRESENT
Factor applied to the stipple pattern used to draw graphics in present state.

See Also:
Constant Field Values

OUTLINE_STIPPLE_PATTERN

protected static final short OUTLINE_STIPPLE_PATTERN
Stipple pattern applied to graphics in the anticipated state.

See Also:
Constant Field Values

symbolCode

protected SymbolCode symbolCode
Indicates a string identifier for this symbol. The format of the identifier depends on the symbol set to which this graphic belongs. For symbols belonging to the MIL-STD-2525 symbol set, this returns a 15-character alphanumeric symbol identification code (SIDC). Calculated from the current modifiers at construction and during each call to setModifier(String, Object). Initially null.

Constructor Detail

AbstractMilStd2525TacticalGraphic

protected AbstractMilStd2525TacticalGraphic(String symbolCode)
Method Detail

applyDefaultAttributes

protected void applyDefaultAttributes(ShapeAttributes attributes)
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 AbstractTacticalGraphic
Parameters:
attributes - Attributes bundle to receive defaults.

createSymbol

protected TacticalSymbol createSymbol(String sidc,
                                      Position position,
                                      TacticalSymbolAttributes attrs)

getDefaultMaterial

protected Material getDefaultMaterial()
Indicates the default Material for this graphic.

Returns:
The default material, determined by the graphic's standard identity.

getIdentifier

public String getIdentifier()
Indicates a string identifier for this graphic. The format of the identifier depends on the symbol set to which the graphic belongs.

Specified by:
getIdentifier in interface TacticalGraphic
Returns:
An identifier for this graphic.

getModifier

public Object getModifier(String modifier)
Indicates the current value of a text or graphic modifier.

Specified by:
getModifier in interface TacticalGraphic
Overrides:
getModifier in class AbstractTacticalGraphic
Parameters:
modifier - Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.
Returns:
The value of the modifier, or null if the modifier is not set.

getOutlineStippleFactor

protected int getOutlineStippleFactor()
Indicates the factor applied to the stipple pattern used to draw dashed lines when the graphic is "anticipated". This value is not used when the graphic is "present".

Returns:
Factor applied to the stipple pattern.
See Also:
ShapeAttributes.getOutlineStippleFactor()

getOutlineStipplePattern

protected short getOutlineStipplePattern()
Indicates the stipple pattern used to draw dashed lines when the graphic is "anticipated".

Returns:
Factor applied to the stipple pattern.
See Also:
ShapeAttributes.getOutlineStipplePattern()

getStatus

public String getStatus()
Indicates the current value of graphic's Status/Operational Condition field.

Specified by:
getStatus in interface MilStd2525TacticalGraphic
Returns:
this graphic's Status/Operational Condition field.
See Also:
MilStd2525TacticalGraphic.setStatus(String)

getText

public String getText()
Convenience method to access the text modifier of the graphic. Calling this method is equivalent to calling getModifier(SymbologyConstants.UNIQUE_DESIGNATION).

Specified by:
getText in interface TacticalGraphic
Overrides:
getText in class AbstractTacticalGraphic
Returns:
Descriptive text for this graphic.
See Also:
TacticalGraphic.getModifier(String)

mustShowHostileIndicator

protected boolean mustShowHostileIndicator()
Indicates whether or not the graphic must display the hostile/enemy indicator, if the graphic supports the indicator.

Returns:
true if AbstractTacticalGraphic.isShowHostileIndicator() is true, and the graphic represents a hostile entity.

setModifier

public void setModifier(String modifier,
                        Object value)
Specifies the value of a text or graphic modifier.

Specified by:
setModifier in interface TacticalGraphic
Overrides:
setModifier in class AbstractTacticalGraphic
Parameters:
modifier - Key that identifies the modifier to set. The possible modifiers depends on the symbol set.
value - New value for the modifier.

setStatus

public void setStatus(String value)
Specifies this graphic's Status/Operational Condition field. A graphic's Status defines whether the represented object exists at the time the symbol was generated, or is anticipated to exist in the future. Additionally, a graphic's Status can define its operational condition. The recognized values depend on the graphic's scheme:

Tactical graphics

Meteorological and Oceanographic

Emergency Management

Specified by:
setStatus in interface MilStd2525TacticalGraphic
Parameters:
value - the new value for the Status/Operational Condition field.

NASA World Wind