Class MilStd2525TacticalSymbol
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.symbology.AbstractTacticalSymbol
-
- gov.nasa.worldwind.symbology.milstd2525.MilStd2525TacticalSymbol
-
- All Implemented Interfaces:
AVList
,Draggable
,MessageListener
,Movable
,Highlightable
,Renderable
,TacticalSymbol
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class MilStd2525TacticalSymbol extends AbstractTacticalSymbol
Implementation ofTacticalSymbol
that provides support for tactical symbols from the MIL-STD-2525 symbology set. See the Tutorial for instructions on using TacticalSymbol in an application.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
AbstractTacticalSymbol.IconAtlasElement, AbstractTacticalSymbol.IconSource, AbstractTacticalSymbol.IconTexture, AbstractTacticalSymbol.Label, AbstractTacticalSymbol.Line, AbstractTacticalSymbol.OrderedSymbol
-
Nested classes/interfaces inherited from interface gov.nasa.worldwind.symbology.TacticalSymbol
TacticalSymbol.LODSelector
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.awt.Font
DEFAULT_FRAME_SHAPE_FONT
static UnitsFormat
DEFAULT_UNITS_FORMAT
Default unit format.protected static java.util.Set<java.lang.String>
exerciseSymbols
protected boolean
isGroundSymbol
protected SymbolCode
symbolCode
Indicates a string identifier for this symbol.protected static java.util.Map<java.lang.String,java.lang.String>
symbolEchelonMap
protected boolean
useGroundHeadingIndicator
-
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, defaultAttrs, delegateOwner, depthOffset, dragEnabled, draggableSupport, enableBatchPicking, enableBatchRendering, formattedPosition, frameNumber, glyphAtlas, glyphMap, highlightAttrs, highlighted, iconOffset, iconRect, iconRetriever, iconSize, iconTexture, LAYOUT_ABSOLUTE, LAYOUT_NONE, LAYOUT_RELATIVE, LOADING_IMAGE_PATH, LODSelector, MAX_SYMBOL_DIMENSION, maxTimeSinceLastUsed, modifierRetriever, modifiers, normalAttrs, offset, pickLayer, pickSupport, position, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, staticLayoutRect, staticScreenRect, thisFramesOrderedSymbol, unitsFormat, unresolvedGlyph, visible
-
-
Constructor Summary
Constructors Constructor Description MilStd2525TacticalSymbol(java.lang.String symbolId, Position position)
Constructs a tactical symbol for the MIL-STD-2525 symbology set with the specified symbol identifier and position.MilStd2525TacticalSymbol(java.lang.String symbolId, Position position, AVList modifiers)
Constructs a tactical symbol for the MIL-STD-2525 symbology set with the specified symbol identifier, position, and list of modifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendTextModifier(java.lang.StringBuilder sb, AVList modifiers, java.lang.String modifierKey, java.lang.Integer maxLength)
protected void
applyImplicitModifiers(AVList modifiers)
Add implicit modifiers to the modifier list.protected AVList
assembleIconRetrieverParameters(AVList params)
protected void
computeTransform(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
java.lang.String
getIdentifier()
Indicates a string identifier for this symbol.protected int
getMaxLabelLines(AVList modifiers)
protected java.lang.String
getModifierCode(AVList modifiers, java.lang.String modifierKey)
protected java.lang.String
getReinforcedReducedModifier(AVList modifiers, java.lang.String modifierKey)
java.lang.String
getStatus()
Indicates the current value of symbol's Status/Operational Condition field.protected void
init(java.lang.String symbolId, AVList modifiers)
protected void
initIconLayout()
boolean
isShowFill()
Indicates whether this symbol draws its fill.boolean
isShowFrame()
Indicates whether this symbol draws its frame.boolean
isShowIcon()
Indicates whether this symbol draws its internal icon.protected void
layoutDynamicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Layout dynamic modifiers around the symbol.protected void
layoutGraphicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Layout static graphic modifiers around the symbol.protected void
layoutTextModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Layout static text modifiers around the symbol.protected boolean
mustUseAlternateOperationalCondition(AVList modifiers)
Indicates whether or not the symbol should be displayed using the alternate Operational Condition indicator described in MIL-STD-2525C spec Table III-2, pg.void
setShowFill(boolean showFill)
Specifies whether to draw this symbol's fill.void
setShowFrame(boolean showFrame)
Specifies whether to draw this symbol's frame.void
setShowIcon(boolean showIcon)
Specifies whether to draw this symbol's internal icon.void
setStatus(java.lang.String value)
Specifies this symbol's Status/Operational Condition field.-
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
addGlyph, addGlyph, addLabel, addLabel, addLine, addLine, beginDrawing, computeMinTextLayout, computeScale, computeScaledBounds, computeScaledRect, computeScreenExtent, computeSymbolPoints, createPickedObject, determineActiveAttributes, doDrag, doDrawOrderedRenderable, drag, draw, drawBatched, drawGlyphs, drawGraphicModifiers, drawIcon, drawLabels, drawLines, drawOrderedRenderable, drawTextModifiers, endDrawing, getActiveAttributes, getAltitudeMode, getAttributes, getDelegateOwner, getDepthOffset, getFormattedPosition, getGlyph, getGlyphAtlas, getHighlightAttributes, getIconRetriever, getLODSelector, getMaxSymbolDimension, getModifier, getModifierRetriever, getOffset, getPosition, getReferencePosition, getUnitsFormat, intersectsFrustum, isDragEnabled, isEnableBatchPicking, isEnableBatchRendering, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, layout, layoutIcon, layoutLabelRect, layoutPoints, layoutRect, layoutStaticModifiers, makeOrderedRenderable, move, moveTo, mustDrawGraphicModifiers, mustDrawIcon, mustDrawTextModifiers, mustLayout, pick, prepareToDraw, removeDeadModifiers, render, reset, setAltitudeMode, setAttributes, setDelegateOwner, setDepthOffset, setDragEnabled, setEnableBatchPicking, setEnableBatchRendering, setGlyphAtlas, setHighlightAttributes, setHighlighted, setIconRetriever, setLODSelector, 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, 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 gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
DEFAULT_UNITS_FORMAT
public static final UnitsFormat DEFAULT_UNITS_FORMAT
Default unit format.
-
DEFAULT_FRAME_SHAPE_FONT
protected static final java.awt.Font DEFAULT_FRAME_SHAPE_FONT
-
symbolEchelonMap
protected static final java.util.Map<java.lang.String,java.lang.String> symbolEchelonMap
-
exerciseSymbols
protected static final java.util.Set<java.lang.String> exerciseSymbols
-
symbolCode
protected SymbolCode symbolCode
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). Calculated from the current modifiers at construction and during each call toAbstractTacticalSymbol.setModifier(String, Object)
. Initiallynull
.
-
isGroundSymbol
protected boolean isGroundSymbol
-
useGroundHeadingIndicator
protected boolean useGroundHeadingIndicator
-
-
Constructor Detail
-
MilStd2525TacticalSymbol
public MilStd2525TacticalSymbol(java.lang.String symbolId, Position position)
Constructs a tactical symbol for the MIL-STD-2525 symbology set with the specified symbol identifier and position. This constructor does not accept any supplemental modifiers, so the symbol contains only the attributes specified by its symbol identifier. This constructor does not accept any icon retrieval path, so the created symbol retrieves its icons from the default location.The symbolId specifies the tactical symbol's appearance. The symbolId must be a 15-character alphanumeric symbol identification code (SIDC). The symbol's shape, fill color, outline color, and icon are all defined by the symbol identifier. Use the '-' character to specify null entries in the symbol identifier.
The position specifies the latitude, longitude, and altitude where the symbol is drawn on the globe. The position's altitude component is interpreted according to the altitudeMode.
- Parameters:
symbolId
- a 15-character alphanumeric symbol identification code (SIDC).position
- the latitude, longitude, and altitude where the symbol is drawn.- Throws:
java.lang.IllegalArgumentException
- if either the symbolId or the position arenull
, or if the symbolId is not a valid 15-character alphanumeric symbol identification code (SIDC).
-
MilStd2525TacticalSymbol
public MilStd2525TacticalSymbol(java.lang.String symbolId, Position position, AVList modifiers)
Constructs a tactical symbol for the MIL-STD-2525 symbology set with the specified symbol identifier, position, and list of modifiers. This constructor does not accept any icon retrieval path, so the created symbol retrieves its icons from the default location.The symbolId specifies the tactical symbol's appearance. The symbolId must be a 15-character alphanumeric symbol identification code (SIDC). The symbol's shape, fill color, outline color, and icon are all defined by the symbol identifier. Use the '-' character to specify null entries in the symbol identifier.
The position specifies the latitude, longitude, and altitude where the symbol is drawn on the globe. The position's altitude component is interpreted according to this symbol's altitudeMode.
The modifiers specify supplemental graphic and text attributes as key-value pairs. See the MilStd2525TacticalSymbol class documentation for the list of recognized modifiers. In the case where both the symbol identifier and the modifiers list specify the same attribute, the modifiers list has priority.
- Parameters:
symbolId
- a 15-character alphanumeric symbol identification code (SIDC).position
- the latitude, longitude, and altitude where the symbol is drawn.modifiers
- an optional list of key-value pairs specifying the symbol's modifiers. May benull
to specify that the symbol contains only the attributes in its symbol identifier.- Throws:
java.lang.IllegalArgumentException
- if either the symbolId or the position arenull
, or if the symbolId is not a valid 15-character alphanumeric symbol identification code (SIDC).
-
-
Method Detail
-
init
protected void init(java.lang.String symbolId, AVList modifiers)
-
getIdentifier
public java.lang.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.
-
getStatus
public java.lang.String getStatus()
Indicates the current value of symbol's Status/Operational Condition field.- Returns:
- this symbol's Status/Operational Condition field.
- See Also:
setStatus(String)
-
setStatus
public void setStatus(java.lang.String value)
Specifies this symbol's Status/Operational Condition field. A symbol'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 symbol's Status can define its operational condition. The recognized values depend on the specific MIL-STD-2525 symbology scheme the symbol belongs to:Warfighting, Signals Intelligence, Stability Operations
- STATUS_ANTICIPATED
- STATUS_PRESENT
- STATUS_PRESENT_FULLY_CAPABLE
- STATUS_PRESENT_DAMAGED
- STATUS_PRESENT_DESTROYED
- STATUS_PRESENT_FULL_TO_CAPACITY
Tactical Graphics
- STATUS_ANTICIPATED
- STATUS_SUSPECTED
- STATUS_PRESENT
- STATUS_KNOWN
Emergency Management
- STATUS_ANTICIPATED
- STATUS_PRESENT
- Parameters:
value
- the new value for the Status/Operational Condition field.- Throws:
java.lang.IllegalArgumentException
- if the specified value isnull
or is not one of the accepted status values.
-
isShowFrame
public boolean isShowFrame()
Indicates whether this symbol draws its frame. SeesetShowFrame(boolean)
for a description of how this property is used.- Returns:
true
if this symbol draws its frame, otherwisefalse
.
-
setShowFrame
public void setShowFrame(boolean showFrame)
Specifies whether to draw this symbol's frame. The showFrame property provides control over this tactical symbol's display option hierarchy as defined by MIL-STD-2525C, section 5.4.5 and table III.When
true
, this symbol's frame is drawn. This state corresponds to MIL-STD-2525C, table III, row 1.When
false
, this symbol's frame is not drawn. Instead, only the symbol's internal icon is drawn. This state corresponds to MIL-STD-2525C, table III, row 4.- Parameters:
showFrame
-true
to draw this symbol's frame, otherwisefalse
.
-
isShowFill
public boolean isShowFill()
Indicates whether this symbol draws its fill. SeesetShowFill(boolean)
for a description of how this property is used.- Returns:
true
if this symbol draws its fill, otherwisefalse
.
-
setShowFill
public void setShowFill(boolean showFill)
Specifies whether to draw this symbol's fill. The showFill property provides control over this tactical symbol's display option hierarchy as defined by MIL-STD-2525C, section 5.4.5 and table III.When
true
, this symbol's fill is drawn. This state corresponds to MIL-STD-2525C, table III, row 1.When
false
, this symbol's fill is not drawn. Instead, only the symbol's frame and internal icon are drawn. This state corresponds to MIL-STD-2525C, table III, row 2.- Parameters:
showFill
-true
to draw this symbol's fill, otherwisefalse
.
-
isShowIcon
public boolean isShowIcon()
Indicates whether this symbol draws its internal icon. SeesetShowIcon(boolean)
for a description of how this property is used.- Returns:
true
if this symbol draws its icon, otherwisefalse
.
-
setShowIcon
public void setShowIcon(boolean showIcon)
Specifies whether to draw this symbol's internal icon. The showIcon property provides control over this tactical symbol's display option hierarchy as defined by MIL-STD-2525C, section 5.4.5 and table III.When
true
, this symbol's icon is drawn. This state corresponds to MIL-STD-2525C, table III, row 1.When
false
, this symbol's icon is not drawn. Instead, only the symbol's frame and fill are drawn. This state corresponds to MIL-STD-2525C, table III, row 5.- Parameters:
showIcon
-true
to draw this symbol's icon, otherwisefalse
.
-
initIconLayout
protected void initIconLayout()
-
assembleIconRetrieverParameters
protected AVList assembleIconRetrieverParameters(AVList params)
- Overrides:
assembleIconRetrieverParameters
in classAbstractTacticalSymbol
-
applyImplicitModifiers
protected void applyImplicitModifiers(AVList modifiers)
Description copied from class:AbstractTacticalSymbol
Add implicit modifiers to the modifier list. This method is called each frame to add modifiers that are determined implicitly by the symbol state, rather than set explicitly by the application. For example, the location modifier can be determined by the symbol position without the application needing to specify it.- Overrides:
applyImplicitModifiers
in classAbstractTacticalSymbol
- Parameters:
modifiers
- List of modifiers. This method may modify this list by adding implicit modifiers.
-
layoutGraphicModifiers
protected void layoutGraphicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Description copied from class:AbstractTacticalSymbol
Layout static graphic modifiers around the symbol. Static modifiers are not expected to change due to changes in view. The static layout is computed when a modifier is changed, but may not be computed each frame. For example, a text modifier indicating a symbol identifier would only need to be laid out when the text is changed, so this is best treated as a static modifier. However a direction of movement line that needs to be computed based on the current eye position should be treated as a dynamic modifier.- Overrides:
layoutGraphicModifiers
in classAbstractTacticalSymbol
- Parameters:
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.- See Also:
AbstractTacticalSymbol.layoutDynamicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
-
mustUseAlternateOperationalCondition
protected boolean mustUseAlternateOperationalCondition(AVList modifiers)
Indicates whether or not the symbol should be displayed using the alternate Operational Condition indicator described in MIL-STD-2525C spec Table III-2, pg. 19. The alternate display is always used for symbols in the Emergency Management scheme (see MIL-STD-2525C // spec section G.5.5.14, pg. 1030). It is be used for other symbols if the SymbologyConstants.OPERATIONAL_CONDITION_ALTERNATE modifier is set.- Parameters:
modifiers
- Symbol modifiers.- Returns:
- True if the symbol must use the alternate operational condition indicator.
-
layoutDynamicModifiers
protected void layoutDynamicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Description copied from class:AbstractTacticalSymbol
Layout dynamic modifiers around the symbol. Dynamic modifiers are expected to (potentially) change each frame, and are laid out each frame. For example, a direction of movement line that is computed based on the current eye position would be treated as a dynamic modifier. Dynamic modifiers are always laid out after static modifiers.- Overrides:
layoutDynamicModifiers
in classAbstractTacticalSymbol
- Parameters:
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.- See Also:
AbstractTacticalSymbol.layoutStaticModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
-
layoutTextModifiers
protected void layoutTextModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
Description copied from class:AbstractTacticalSymbol
Layout static text modifiers around the symbol. Static modifiers are not expected to change due to changes in view. The static layout is computed when a modifier is changed, but may not be computed each frame. For example, a text modifier indicating a symbol identifier would only need to be laid out when the text is changed, so this is best treated as a static modifier. However a direction of movement line that needs to be computed based on the current eye position should be treated as a dynamic modifier.- Overrides:
layoutTextModifiers
in classAbstractTacticalSymbol
- Parameters:
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.- See Also:
AbstractTacticalSymbol.layoutDynamicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
-
getMaxLabelLines
protected int getMaxLabelLines(AVList modifiers)
- Overrides:
getMaxLabelLines
in classAbstractTacticalSymbol
-
getModifierCode
protected java.lang.String getModifierCode(AVList modifiers, java.lang.String modifierKey)
-
getReinforcedReducedModifier
protected java.lang.String getReinforcedReducedModifier(AVList modifiers, java.lang.String modifierKey)
-
appendTextModifier
protected void appendTextModifier(java.lang.StringBuilder sb, AVList modifiers, java.lang.String modifierKey, java.lang.Integer maxLength)
-
computeTransform
protected void computeTransform(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
- Overrides:
computeTransform
in classAbstractTacticalSymbol
-
-