Class BattlePosition
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.symbology.AbstractTacticalGraphic
-
- gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BattlePosition
-
- All Implemented Interfaces:
AVList
,Draggable
,Movable
,Highlightable
,PreRenderable
,Renderable
,MilStd2525TacticalGraphic
,TacticalGraphic
public class BattlePosition extends BasicArea
Implementation of Battle Position graphics. This class implements the following graphics:- Battle Position (2.X.2.4.3.1)
- Battle Position, Prepared But Not Occupied (2.X.2.4.3.1.1)
The Echelon label (field B) will be placed between the first and second control points.
-
-
Field Summary
Fields Modifier and Type Field Description 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, dragEnabled, draggableSupport, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
-
-
Constructor Summary
Constructors Constructor Description BattlePosition(java.lang.String sidc)
Create a new area graphic.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyDefaultAttributes(ShapeAttributes attributes)
Apply defaults to the active attributes bundle.protected void
applyDelegateOwner(java.lang.Object owner)
Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic.protected TacticalSymbol
createEchelonSymbol(java.lang.String sidc)
Create a tactical symbol to render the echelon modifier.protected java.lang.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 java.lang.String
getGraphicLabel()
static java.util.List<java.lang.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, doDrag, doRenderTextModifiers, drag, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isDragEnabled, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, onModifierChanged, render, setAttributes, setDelegateOwner, setDragEnabled, 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, 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.render.Highlightable
isHighlighted, setHighlighted
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
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
-
-
-
-
Field Detail
-
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
-
echelonSymbol
protected TacticalSymbol echelonSymbol
Tactical symbol used to render the echelon modifier.
-
symbolAttributes
protected TacticalSymbolAttributes symbolAttributes
Attribute bundle for the echelon symbol.
-
-
Method Detail
-
getSupportedGraphics
public static java.util.List<java.lang.String> getSupportedGraphics()
Indicates the graphics supported by this class.- Returns:
- List of masked SIDC strings that identify graphics that this class supports.
-
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 classAbstractTacticalGraphic
- Parameters:
dc
- Current draw context.
-
createLabelText
protected java.lang.String createLabelText()
Create the text for the main label on this graphic.- Overrides:
createLabelText
in classBasicArea
- Returns:
- Text for the main label. May return null if there is no text.
-
getGraphicLabel
protected java.lang.String getGraphicLabel()
- Overrides:
getGraphicLabel
in classBasicArea
-
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 classBasicArea
- Parameters:
dc
- Current draw context.
-
determineIdentityLabelPositions
protected void determineIdentityLabelPositions()
Overridden to determine the position of the echelon label as well as the identity labels.- Overrides:
determineIdentityLabelPositions
in classBasicArea
-
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 classAbstractMilStd2525TacticalGraphic
- Parameters:
attributes
- Attributes bundle to receive defaults.
-
determineActiveAttributes
protected void determineActiveAttributes()
Determine active attributes for this frame. Overridden to update echelon symbol attributes.- Overrides:
determineActiveAttributes
in classAbstractTacticalGraphic
-
applyDelegateOwner
protected void applyDelegateOwner(java.lang.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 classBasicArea
- Parameters:
owner
- Current delegate owner.
-
createEchelonSymbol
protected TacticalSymbol createEchelonSymbol(java.lang.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.
-
-