public class Route extends AbstractMilStd2525TacticalGraphic implements TacticalRoute, PreRenderable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Iterable<? extends TacticalPoint> |
children
Graphics drawn at the route control points.
|
protected static Offset |
DEFAULT_OFFSET |
static double |
DEFAULT_WIDTH
Width of the route if no width is specified in the modifiers.
|
protected java.util.List<Path> |
paths
Path used to render the route.
|
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 |
---|
Route(java.lang.String sidc) |
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 Position |
computeMainLabelPosition(DrawContext dc,
TacticalGraphicLabel label,
Position midpoint,
Position posB)
Compute the position of the graphic's main label.
|
protected void |
createLabels() |
protected java.lang.String |
createLabelText()
Create the text for the main label on this graphic.
|
protected Path |
createPath(Position start,
Position end)
Create between two points and configure the Path.
|
protected void |
createPaths(DrawContext dc)
Create the paths used to draw the route.
|
protected void |
determineLabelPositions(DrawContext dc)
Compute the position for the area's main label.
|
protected void |
doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.
|
java.lang.Iterable<? extends TacticalPoint> |
getControlPoints()
Indicates the control points along this route.
|
protected Offset |
getDefaultLabelOffset()
Indicates the default offset applied to the graphic's main label.
|
protected java.lang.String |
getGraphicLabel()
Return the string that identifies this type of route.
|
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.
|
double |
getWidth()
Indicates the width of the route, in meters.
|
void |
preRender(DrawContext dc) |
void |
setAttributes(TacticalGraphicAttributes attributes)
Specifies attributes for this graphic in the normal (as opposed to highlighted) state.
|
void |
setControlPoints(java.lang.Iterable<? extends TacticalPoint> points)
Specifies the control points along this route.
|
void |
setHighlightAttributes(TacticalGraphicAttributes attributes)
Specifies attributes for this graphic in the highlighted state.
|
void |
setHighlighted(boolean highlighted)
Specifies whether to highlight the shape.
|
void |
setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.
|
void |
setStatus(java.lang.String status)
Specifies this graphic's Status/Operational Condition field.
|
void |
setWidth(double width)
Specifies the width of the route.
|
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier
addLabel, 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, setDelegateOwner, setDragEnabled, 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, getIdentifier, getLabelOffset, getModifier, getText, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setDelegateOwner, setLabelOffset, setModifier, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
render
isHighlighted
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected java.lang.Iterable<? extends TacticalPoint> children
protected static final Offset DEFAULT_OFFSET
public static final double DEFAULT_WIDTH
protected java.util.List<Path> paths
protected java.lang.Iterable<? extends Position> positions
protected void applyDelegateOwner(java.lang.Object owner)
applyDelegateOwner
in class AbstractTacticalGraphic
owner
- Current delegate owner.protected Position computeMainLabelPosition(DrawContext dc, TacticalGraphicLabel label, Position midpoint, Position posB)
dc
- Current draw context.label
- Label for which to compute position.midpoint
- Midpoint of the first route segment.posB
- End point of the first route segment.protected void createLabels()
createLabels
in class AbstractTacticalGraphic
protected java.lang.String createLabelText()
protected Path createPath(Position start, Position end)
start
- First positionend
- Second positionprotected void createPaths(DrawContext dc)
dc
- Current draw context.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)
public java.lang.Iterable<? extends TacticalPoint> getControlPoints()
getControlPoints
in interface TacticalRoute
protected Offset getDefaultLabelOffset()
AbstractTacticalGraphic
getDefaultLabelOffset
in class AbstractTacticalGraphic
protected java.lang.String getGraphicLabel()
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 double getWidth()
public void preRender(DrawContext dc)
preRender
in interface PreRenderable
public void setAttributes(TacticalGraphicAttributes attributes)
setAttributes
in interface TacticalGraphic
setAttributes
in class AbstractTacticalGraphic
attributes
- new attributes. May be null, in which case default attributes are used.public void setControlPoints(java.lang.Iterable<? extends TacticalPoint> points)
setControlPoints
in interface TacticalRoute
points
- New control points.public void setHighlightAttributes(TacticalGraphicAttributes attributes)
setAttributes
for more information on how the attributes are
interpreted. Overridden to apply new attributes to route control points.setHighlightAttributes
in interface TacticalGraphic
setHighlightAttributes
in class AbstractTacticalGraphic
attributes
- Attributes to apply to the graphic when it is highlighted. May be null, in which default
attributes are used.public void setHighlighted(boolean highlighted)
setHighlighted
in interface Highlightable
setHighlighted
in class AbstractTacticalGraphic
highlighted
- true to highlight the shape, otherwise false.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 setStatus(java.lang.String status)
setStatus
in interface MilStd2525TacticalGraphic
setStatus
in class AbstractMilStd2525TacticalGraphic
status
- the new value for the Status/Operational Condition field.public void setWidth(double width)
setModifier(SymbologyConstants.DISTANCE, value)
.width
- Width of the route, in meters.