NASA World Wind

gov.nasa.worldwind.symbology.milstd2525.graphics.lines
Class FireSupportLine

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.lines.FireSupportLine
All Implemented Interfaces:
AVList, Movable, Highlightable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic
Direct Known Subclasses:
MunitionFlightPath

public class FireSupportLine
extends AbstractMilStd2525TacticalGraphic

Implementation of Fire Support line graphics. This class implements the following graphics:


Field Summary
protected  String additionalText
          The value of an optional second text string for the graphic.
protected static Offset BOTTOM_LABEL_OFFSET
          Offset applied to the graphic's lower label.
protected static int CFL_OUTLINE_STIPPLE_FACTOR
          Factor applied to the stipple pattern used to draw the dashed line for a Coordinated Fire Line.
protected  Path path
          Paths used to render the graphic.
protected static Offset TOP_LABEL_OFFSET
          Offset applied to the graphic's upper label.
 
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
FireSupportLine(String sidc)
          Create a new target 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  Object[] computePathLength(DrawContext dc)
          Compute the length of the path, and determine the start and end positions.
protected  void createLabels()
          Create labels for the graphic.
protected  Path createPath()
          Create and configure the Path used to render this graphic.
protected  void determineLabelPositions(DrawContext dc)
          Determine positions for the start and end labels.
protected  void doRenderGraphic(DrawContext dc)
          Render this graphic, without modifiers.
 String getAdditionalText()
          Indicates an additional text identification for this graphic.
protected  Offset getBottomLabelOffset()
          Indicates the offset applied to the lower label.
protected  String getBottomLabelText()
          Determine text for the graphic's bottom label.
protected  Offset getDefaultLabelOffset()
          Indicates the default offset applied to the graphic's main label.
protected  String getEndOfLineText()
          /** Determine text for the labels at the start and end of the line.
 Object getModifier(String key)
          Indicates the current value of a text or graphic modifier.
 Iterable<? extends Position> getPositions()
          Indicates the positions of the control points that place and orient the graphic.
 Position getReferencePosition()
          A position associated with the object that indicates its aggregate geographic position.
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
protected  Offset getTopLabelOffset()
          Indicates the offset applied to the upper label.
protected  String getTopLabelText()
          Determine text for the graphic's top label.
protected  boolean isDrawDoubleLabel()
          Indicates whether or not the graphic includes double pairs of top and bottom labels.
 void setAdditionalText(String text)
          Indicates an additional text identification for this graphic.
 void setModifier(String key, Object value)
          Specifies the value of a text or graphic modifier.
 void setPositions(Iterable<? extends Position> positions)
          Specifies the positions of the control points that place and orient the graphic.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
createSymbol, getDefaultMaterial, getIdentifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setStatus
 
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
addLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineActiveAttributes, determineDelegateOwner, determinePerFrameAttributes, doRenderGraphicModifiers, doRenderTextModifiers, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, 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

additionalText

protected String additionalText
The value of an optional second text string for the graphic. This value is equivalent to the "T1" modifier defined by MIL-STD-2525C. It can be set using setAdditionalText(String), or by passing an Iterable to setModifier(String, Object) with a key of SymbologyConstants.UNIQUE_DESIGNATION (additional text is the second value in the iterable).


BOTTOM_LABEL_OFFSET

protected static final Offset BOTTOM_LABEL_OFFSET
Offset applied to the graphic's lower label. This offset aligns the top edge of the label with the geographic position, in order to keep the label above the graphic as the zoom changes.


CFL_OUTLINE_STIPPLE_FACTOR

protected static final int CFL_OUTLINE_STIPPLE_FACTOR
Factor applied to the stipple pattern used to draw the dashed line for a Coordinated Fire Line.

See Also:
Constant Field Values

path

protected Path path
Paths used to render the graphic.


TOP_LABEL_OFFSET

protected static final Offset TOP_LABEL_OFFSET
Offset applied to the graphic's upper label. This offset aligns the bottom edge of the label with the geographic position, in order to keep the label above the graphic as the zoom changes.

Constructor Detail

FireSupportLine

public FireSupportLine(String sidc)
Create a new target graphic.

Parameters:
sidc - Symbol code the identifies the graphic.
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. Overridden to draw Coordinated Fire Line with dashed pattern.

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.

Specified by:
applyDelegateOwner in class AbstractTacticalGraphic
Parameters:
owner - Current delegate owner.

computePathLength

protected Object[] computePathLength(DrawContext dc)
Compute the length of the path, and determine the start and end positions.

Parameters:
dc - Current draw context.
Returns:
Returns the path's start position, end position, and length (non-terrain following) as a three element array: [Position start, Position end, Double length].

createLabels

protected void createLabels()
Create labels for the graphic.

Overrides:
createLabels in class AbstractTacticalGraphic

createPath

protected Path createPath()
Create and configure the Path used to render this graphic.

Returns:
New path configured with defaults appropriate for this type of graphic.

determineLabelPositions

protected void determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels.

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

doRenderGraphic

protected void doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.

Specified by:
doRenderGraphic in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.
See Also:
AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext), AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)

getAdditionalText

public String getAdditionalText()
Indicates an additional text identification for this graphic. This value is equivalent to the "T1" modifier in MIL-STD-2525C (a second Unique Designation modifier).

Returns:
The additional text. May be null.

getBottomLabelOffset

protected Offset getBottomLabelOffset()
Indicates the offset applied to the lower label.

Returns:
Offset applied to the bottom label.

getBottomLabelText

protected String getBottomLabelText()
Determine text for the graphic's bottom label.

Returns:
Text for the bottom label. May return null if there is no bottom label.

getDefaultLabelOffset

protected Offset getDefaultLabelOffset()
Indicates the default offset applied to the graphic's main label. This offset may be overridden by the graphic attributes.

Overrides:
getDefaultLabelOffset in class AbstractTacticalGraphic
Returns:
Offset to apply to the main label.

getEndOfLineText

protected String getEndOfLineText()
/** Determine text for the labels at the start and end of the line.

Returns:
Text for the end of line labels.

getModifier

public Object getModifier(String key)
Description copied from class: AbstractMilStd2525TacticalGraphic
Indicates the current value of a text or graphic modifier.

Specified by:
getModifier in interface TacticalGraphic
Overrides:
getModifier in class AbstractMilStd2525TacticalGraphic
Parameters:
key - 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.

getPositions

public Iterable<? extends Position> getPositions()
Indicates the positions of the control points that place and orient the graphic.

Returns:
positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many.

getReferencePosition

public Position getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.

Returns:
the object's reference position, or null if no reference position is available.

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.

getTopLabelOffset

protected Offset getTopLabelOffset()
Indicates the offset applied to the upper label.

Returns:
Offset applied to the upper label.

getTopLabelText

protected String getTopLabelText()
Determine text for the graphic's top label.

Returns:
Text for the top label. May return null if there is no top label.

isDrawDoubleLabel

protected boolean isDrawDoubleLabel()
Indicates whether or not the graphic includes double pairs of top and bottom labels. The Final Support Coordination Line (FSCL) and Restrictive Fire Lines (RFL) include double labels, but the Coordination Fire Line (CFL) does not.

Returns:
true if the graphic includes two pairs of top/bottom labels. Both pairs contain the same text content.

setAdditionalText

public void setAdditionalText(String text)
Indicates an additional text identification for this graphic. Setting this value is equivalent to setting the "T1" modifier in MIL-STD-2525C (a second Unique Designation modifier).

Parameters:
text - The additional text. May be null.

setModifier

public void setModifier(String key,
                        Object value)
Description copied from class: AbstractMilStd2525TacticalGraphic
Specifies the value of a text or graphic modifier.

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

setPositions

public void setPositions(Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.

Parameters:
positions - Control points that orient the graphic. Must provide at least three points.

NASA World Wind