public class SearchArea 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 SurfacePolygon |
arrowHead1
Polygon render an arrow head at the end of one of the graphic's legs.
|
protected SurfacePolygon |
arrowHead2
Polygon render an arrow head at the end of one of the graphic's legs.
|
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.
|
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.
|
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 |
---|
SearchArea(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 java.util.List<Position> |
computeArrowheadPositions(DrawContext dc,
Position base,
Position tip,
double arrowLength,
Angle arrowAngle)
Compute the positions of the arrow head of the graphic's legs.
|
protected java.util.List<Position> |
computePathPositions(Position startPosition,
Position endPosition,
Angle delta) |
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 |
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, createLabels, determineDelegateOwner, determineLabelPositions, 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 SurfacePolygon arrowHead1
protected SurfacePolygon arrowHead2
protected double arrowLength
public static final Angle DEFAULT_ARROWHEAD_ANGLE
public static final double DEFAULT_ARROWHEAD_LENGTH
protected Path[] paths
protected Position position1
protected Position position2
protected Position position3
protected TacticalSymbol symbol
protected TacticalSymbolAttributes symbolAttributes
public SearchArea(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 java.util.List<Position> computeArrowheadPositions(DrawContext dc, Position base, Position tip, double arrowLength, Angle arrowAngle)
dc
- Current draw contextbase
- Position of the arrow's starting point.tip
- Position of the arrow head tip.arrowLength
- Length of the arrowhead as a fraction of the total line length.arrowAngle
- Angle of the arrow head.protected java.util.List<Position> computePathPositions(Position startPosition, Position endPosition, Angle delta)
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 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.