public class PrincipleDirectionOfFire extends AbstractMilStd2525TacticalGraphic implements PreRenderable
Modifier and Type | Field and Description |
---|---|
protected Angle |
arrowAngle
Length of the arrowhead from base to tip, as a fraction of the total line length.
|
protected double |
arrowLength
Angle of the arrowhead.
|
static Angle |
DEFAULT_ARROWHEAD_ANGLE
Default angle of the arrowhead.
|
static double |
DEFAULT_ARROWHEAD_LENGTH
Default length of the arrowhead, as a fraction of the total line length.
|
static double |
DEFAULT_ARROWHEAD_OUTLINE_WIDTH
Default width of the arrowhead outline.
|
protected double |
outlineWidth
Width of the arrowhead outline, as a fraction of the arrowhead length.
|
protected Path[] |
paths
Path used to render the line.
|
protected Position |
position1
First control point.
|
protected Position |
position2
Second control point.
|
protected Position |
position3
Third control point.
|
protected TacticalSymbol |
symbol
Symbol drawn at the center of the range fan.
|
protected TacticalSymbolAttributes |
symbolAttributes
Attributes applied to the symbol.
|
protected SurfacePolygon |
thickLine
Polygon used to render the "thick" line on the left leg of the graphic.
|
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCode
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 and Description |
---|
PrincipleDirectionOfFire(java.lang.String sidc)
Create a new arrow graphic.
|
Modifier and Type | Method and 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 java.util.List<Position> |
computeArrowheadPositions(DrawContext dc,
Position startPosition,
Position endPosition)
Determine the positions that make up the arrowhead.
|
protected void |
createLabels()
Create labels for the start and end of the path.
|
protected Path |
createPath(java.util.List<Position> positions)
Create and configure the Path used to render this graphic.
|
protected SurfacePolygon |
createPolygon(java.util.List<? extends LatLon> positions) |
protected void |
createShapes(DrawContext dc)
Create the list of positions that describe the arrow.
|
protected void |
determineActiveAttributes()
Determine active attributes for this frame.
|
protected void |
determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels.
|
protected void |
doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.
|
protected void |
doRenderGraphicModifiers(DrawContext dc)
Render the graphic modifiers.
|
Angle |
getArrowAngle()
Indicates the angle of the arrowhead.
|
double |
getArrowLength()
Indicates the length of the arrowhead.
|
java.lang.Object |
getModifier(java.lang.String modifier)
Indicates the current value of a text or graphic modifier.
|
java.lang.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 java.util.List<java.lang.String> |
getSupportedGraphics()
Indicates the graphics supported by this class.
|
java.lang.String |
getSymbol()
Indicates a symbol drawn at the center of the range fan.
|
void |
preRender(DrawContext dc) |
void |
setArrowAngle(Angle arrowAngle)
Specifies the angle of the arrowhead in the graphic.
|
void |
setArrowLength(double arrowLength)
Specifies the length of the arrowhead.
|
void |
setModifier(java.lang.String modifier,
java.lang.Object value)
Specifies the value of a text or graphic modifier.
|
void |
setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.
|
void |
setSymbol(java.lang.String sidc)
Specifies a symbol to draw at the center of the range fan.
|
createSymbol, getDefaultMaterial, getIdentifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setStatus
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
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
render
isHighlighted, setHighlighted
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected Angle arrowAngle
protected double arrowLength
public static final Angle DEFAULT_ARROWHEAD_ANGLE
public static final double DEFAULT_ARROWHEAD_LENGTH
public static final double DEFAULT_ARROWHEAD_OUTLINE_WIDTH
protected double outlineWidth
protected Path[] paths
protected Position position1
protected Position position2
protected Position position3
protected TacticalSymbol symbol
protected TacticalSymbolAttributes symbolAttributes
protected SurfacePolygon thickLine
public PrincipleDirectionOfFire(java.lang.String sidc)
sidc
- Symbol code the identifies the graphic.protected void applyDefaultAttributes(ShapeAttributes attributes)
applyDefaultAttributes
in class AbstractMilStd2525TacticalGraphic
attributes
- Attributes bundle to receive defaults.protected void applyDelegateOwner(java.lang.Object owner)
applyDelegateOwner
in class AbstractTacticalGraphic
owner
- Current delegate owner.protected java.util.List<Position> computeArrowheadPositions(DrawContext dc, Position startPosition, Position endPosition)
dc
- Current draw context.startPosition
- Position of the arrow's base.endPosition
- Position of the arrow head tip.protected void createLabels()
createLabels
in class AbstractTacticalGraphic
protected Path createPath(java.util.List<Position> positions)
positions
- Positions that define the path.protected SurfacePolygon createPolygon(java.util.List<? extends LatLon> positions)
protected void createShapes(DrawContext dc)
dc
- Current draw context.protected void determineActiveAttributes()
determineActiveAttributes
in class AbstractTacticalGraphic
protected void determineLabelPositions(DrawContext dc)
determineLabelPositions
in class AbstractTacticalGraphic
dc
- Current draw context.protected void doRenderGraphic(DrawContext dc)
doRenderGraphic
in class AbstractTacticalGraphic
dc
- Current draw context.AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext)
,
AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)
protected void doRenderGraphicModifiers(DrawContext dc)
doRenderGraphicModifiers
in class AbstractTacticalGraphic
dc
- Current draw context.public Angle getArrowAngle()
public double getArrowLength()
public java.lang.Object getModifier(java.lang.String modifier)
getModifier
in interface TacticalGraphic
getModifier
in class AbstractMilStd2525TacticalGraphic
modifier
- Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.null
if the modifier is not set.public java.lang.Iterable<? extends Position> getPositions()
getPositions
in interface TacticalGraphic
public Position getReferencePosition()
getReferencePosition
in interface Movable
public static java.util.List<java.lang.String> getSupportedGraphics()
public java.lang.String getSymbol()
public void preRender(DrawContext dc)
preRender
in interface PreRenderable
public void setArrowAngle(Angle arrowAngle)
arrowAngle
- The angle of the arrowhead. Must be greater than zero degrees and less than 90 degrees.public void setArrowLength(double arrowLength)
arrowLength
- Length of the arrowhead as a fraction of the total line length. If the arrowhead length is
0.25, then the arrowhead length will be one quarter of the total line length.public void setModifier(java.lang.String modifier, java.lang.Object value)
setModifier
in interface TacticalGraphic
setModifier
in class AbstractMilStd2525TacticalGraphic
modifier
- Key that identifies the modifier to set. The possible modifiers depends on the symbol set.value
- New value for the modifier.public void setPositions(java.lang.Iterable<? extends Position> positions)
setPositions
in interface TacticalGraphic
positions
- Control points that orient the graphic. Must provide at least three points.public void setSymbol(java.lang.String sidc)
SymbologyConstants.SYMBOL_INDICATOR
modifier. The symbol's position will be changed to match the range fan
center position.sidc
- Identifier for a MIL-STD-2525C symbol to draw at the center of the range fan. May be null to indicate
that no symbol is drawn.