public abstract class AbstractAxisArrow extends AbstractMilStd2525TacticalGraphic
finalPointWidthOfRoute
field controls this behavior.Modifier and Type | Field and Description |
---|---|
protected java.util.List<? extends Position> |
arrowPositions
Positions computed from the control points, used to draw the arrow path.
|
protected boolean |
finalPointWidthOfRoute
Indicates whether the final control point marks the width of the route or the width of the arrowhead.
|
protected Path[] |
paths
Path used to render the line.
|
protected java.lang.Iterable<? extends Position> |
positions
Control points that define the shape.
|
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 |
---|
AbstractAxisArrow(java.lang.String sidc)
Create a new arrow graphic.
|
AbstractAxisArrow(java.lang.String sidc,
int numPaths)
Create a new arrow graphic made up of more than one path.
|
Modifier and Type | Method and Description |
---|---|
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 double |
createArrowHeadPositions(java.util.List<Position> leftPositions,
java.util.List<Position> rightPositions,
java.util.List<Position> arrowHeadPositions,
Globe globe)
Create positions that make up the arrow head.
|
protected void |
createLinePositions(java.util.List<Position> leftPositions,
java.util.List<Position> rightPositions,
double halfWidth,
Globe globe)
Create positions that make up the left and right arrow lines.
|
protected Path |
createPath()
Create and configure the Path used to render this graphic.
|
protected void |
createShapePositions(DrawContext dc)
Create the list of positions that describe the arrow.
|
protected void |
doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.
|
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.
|
boolean |
isFinalPointWidthOfRoute()
Indicates whether or not the final control point marks the width of the arrowhead or the width of the route.
|
void |
setFinalPointWidthOfRoute(boolean finalPointIsWidthOfRoute)
Specifies whether or not the final control point marks the edge of the arrow head or the width of the route.
|
void |
setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.
|
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier, setStatus
addLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, createLabels, determineActiveAttributes, determineDelegateOwner, determineLabelPositions, determinePerFrameAttributes, doDrag, doRenderGraphicModifiers, 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 java.util.List<? extends Position> arrowPositions
protected boolean finalPointWidthOfRoute
protected Path[] paths
protected java.lang.Iterable<? extends Position> positions
public AbstractAxisArrow(java.lang.String sidc)
sidc
- Symbol code the identifies the graphic.public AbstractAxisArrow(java.lang.String sidc, int numPaths)
paths
, and
creates the requested number of paths. The first element in the array is the main path that outlines the arrow.
Subclasses are responsible for configuring the other paths.sidc
- Symbol code the identifies the graphic.numPaths
- Number of paths to create.protected void applyDelegateOwner(java.lang.Object owner)
applyDelegateOwner
in class AbstractTacticalGraphic
owner
- Current delegate owner.protected double createArrowHeadPositions(java.util.List<Position> leftPositions, java.util.List<Position> rightPositions, java.util.List<Position> arrowHeadPositions, Globe globe)
Pt N |\ Left line | \ ----------------| \ Pt 2 Pt 1' \ Pt 1 / ----------------| / Right line | / |/Pt N'
leftPositions
- List to collect positions on the left arrow line. This list receives the position where
the left line meets the arrow head.rightPositions
- List to collect positions on the right arrow line. This list receives the position
where the right line meets the arrow head.arrowHeadPositions
- List to collect positions that make up the arrow head. This list receives positions for
Pt. N, Pt. 1, and Pt. N', in that order.globe
- Current globe.protected void createLinePositions(java.util.List<Position> leftPositions, java.util.List<Position> rightPositions, double halfWidth, Globe globe)
leftPositions
- List to collect positions on the left line.rightPositions
- List to collect positions on the right line.halfWidth
- Distance from the center line to the left or right lines. Half the width of the arrow's
double lines.globe
- Current globe.protected Path createPath()
protected void createShapePositions(DrawContext dc)
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)
public java.lang.Iterable<? extends Position> getPositions()
public Position getReferencePosition()
public boolean isFinalPointWidthOfRoute()
finalPointWidthOfRoute
is true the final control point specifies point B instead.
A |\ | \ ----------------| \ B \ / ----------------| / | / |/
public void setFinalPointWidthOfRoute(boolean finalPointIsWidthOfRoute)
isFinalPointWidthOfRoute()
for details.finalPointIsWidthOfRoute
- True if the final control point determines the width of the route instead of the
width of the arrow head.public void setPositions(java.lang.Iterable<? extends Position> positions)
positions
- Control points that orient the graphic. Must provide at least three points.