public class LinearTarget extends AbstractMilStd2525TacticalGraphic
| Modifier and Type | Field and Description |
|---|---|
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.
|
static double |
DEFAULT_VERTICAL_LENGTH
Default length of the arrowhead, as a fraction of the total line length.
|
protected Position |
endPosition
Second control point.
|
protected Path[] |
paths
Paths used to render the graphic.
|
protected Position |
startPosition
First control point.
|
protected static Offset |
TOP_LABEL_OFFSET
Offset applied to the graphic's upper label.
|
protected double |
verticalLength
Length of the vertical segments, as a fraction of the horizontal segment.
|
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCodeactiveOverrides, 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 and Description |
|---|
LinearTarget(String sidc)
Create a new target graphic.
|
| Modifier and Type | Method and Description |
|---|---|
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 List<Position> |
computeVerticalSegmentPositions(Globe globe,
Vec4 basePoint,
Vec4 segment,
double verticalLength)
Compute positions for one of the vertical segments in the graphic.
|
protected void |
createLabels()
Create labels for the graphic.
|
protected Path |
createPath(List<Position> positions)
Create and configure the Path used to render this graphic.
|
protected void |
createShapes(DrawContext dc)
Create the list of positions that describe the shape.
|
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.
|
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.
|
double |
getVerticalLength()
Indicates the length of the vertical segments in the graphic.
|
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.
|
void |
setVerticalLength(double length)
Specifies the length of the vertical segments in the graphic.
|
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setStatusaddLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineActiveAttributes, determineDelegateOwner, determinePerFrameAttributes, doDrag, doRenderGraphicModifiers, doRenderTextModifiers, drag, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, 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, setVisibleaddPropertyChangeListener, 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, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisiblerenderisHighlighted, setHighlightedaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected String additionalText
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).protected static final Offset BOTTOM_LABEL_OFFSET
public static final double DEFAULT_VERTICAL_LENGTH
protected Position endPosition
protected Path[] paths
protected Position startPosition
protected static final Offset TOP_LABEL_OFFSET
protected double verticalLength
public LinearTarget(String sidc)
sidc - Symbol code the identifies the graphic.protected void applyDelegateOwner(Object owner)
applyDelegateOwner in class AbstractTacticalGraphicowner - Current delegate owner.protected List<Position> computeVerticalSegmentPositions(Globe globe, Vec4 basePoint, Vec4 segment, double verticalLength)
globe - Current globe.basePoint - Point at which the vertical segment must meet the horizontal segment.segment - Vector in the direction of the horizontal segment.verticalLength - Length of the vertical segment, in meters.protected void createLabels()
createLabels in class AbstractTacticalGraphicprotected Path createPath(List<Position> positions)
positions - Positions that define the path.protected void createShapes(DrawContext dc)
dc - Current draw context.protected void determineLabelPositions(DrawContext dc)
determineLabelPositions in class AbstractTacticalGraphicdc - Current draw context.protected void doRenderGraphic(DrawContext dc)
doRenderGraphic in class AbstractTacticalGraphicdc - Current draw context.AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext),
AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)public String getAdditionalText()
protected Offset getBottomLabelOffset()
protected String getBottomLabelText()
protected Offset getDefaultLabelOffset()
getDefaultLabelOffset in class AbstractTacticalGraphicpublic Object getModifier(String key)
AbstractMilStd2525TacticalGraphicgetModifier in interface TacticalGraphicgetModifier in class AbstractMilStd2525TacticalGraphickey - Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.null if the modifier is not set.public Iterable<? extends Position> getPositions()
public Position getReferencePosition()
public static List<String> getSupportedGraphics()
public double getVerticalLength()
public void setAdditionalText(String text)
text - The additional text. May be null.public void setModifier(String key, Object value)
AbstractMilStd2525TacticalGraphicsetModifier in interface TacticalGraphicsetModifier in class AbstractMilStd2525TacticalGraphickey - Key that identifies the modifier to set. The possible modifiers depends on the symbol set.value - New value for the modifier.public void setPositions(Iterable<? extends Position> positions)
positions - Control points that orient the graphic. Must provide at least three points.public void setVerticalLength(double length)
length - Length of the vertical segments as a fraction of the horizontal segment. If the vertical length is
0.25, then the vertical segments will be one quarter of the horizontal segment length.