public abstract class AbstractTacticalSymbol extends WWObjectImpl implements TacticalSymbol, Movable, Draggable
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTacticalSymbol.IconAtlasElement |
protected static class |
AbstractTacticalSymbol.IconSource |
protected static class |
AbstractTacticalSymbol.IconTexture |
protected static class |
AbstractTacticalSymbol.Label |
protected static class |
AbstractTacticalSymbol.Line |
protected class |
AbstractTacticalSymbol.OrderedSymbol |
TacticalSymbol.LODSelector
Modifier and Type | Field and Description |
---|---|
protected TacticalSymbolAttributes |
activeAttrs
Indicates this symbol's currently active attributes.
|
protected WWTexture |
activeIconTexture |
protected AVList |
activeModifiers
Modifiers active this frame.
|
protected int |
altitudeMode
Indicates this symbol's altitude mode.
|
protected OGLStackHandler |
BEogsh
Support for setting up and restoring OpenGL state during rendering.
|
protected java.util.List<AbstractTacticalSymbol.IconAtlasElement> |
currentGlyphs |
protected java.util.List<AbstractTacticalSymbol.Label> |
currentLabels |
protected java.util.List<AbstractTacticalSymbol.Line> |
currentLines |
protected static double |
DEFAULT_DEPTH_OFFSET
The default depth offset in device independent depth units: -8200.
|
protected static TextureAtlas |
DEFAULT_GLYPH_ATLAS
The default glyph texture atlas.
|
protected static int |
DEFAULT_LABEL_LINES
The default number of label lines to expect when computing the minimum size of the text layout rectangle.
|
protected static long |
DEFAULT_MAX_TIME_SINCE_LAST_USED |
static UnitsFormat |
DEFAULT_UNITS_FORMAT
Default unit format.
|
protected static TacticalSymbolAttributes |
defaultAttrs
The attributes used if attributes are not specified.
|
protected java.lang.Object |
delegateOwner
Indicates an object to attach to the picked object list instead of this symbol.
|
protected java.lang.Double |
depthOffset |
protected boolean |
dragEnabled
Dragging support properties.
|
protected DraggableSupport |
draggableSupport |
protected boolean |
enableBatchPicking |
protected boolean |
enableBatchRendering |
protected java.lang.String |
formattedPosition
Current symbol position, formatted using the current unit format.
|
protected long |
frameNumber
The frame used to calculate this symbol's per-frame values.
|
protected TextureAtlas |
glyphAtlas |
protected java.util.Map<java.lang.String,AbstractTacticalSymbol.IconAtlasElement> |
glyphMap |
protected TacticalSymbolAttributes |
highlightAttrs
Indicates this symbol's highlight attributes.
|
protected boolean |
highlighted
Indicates whether this symbol is highlighted.
|
protected Offset |
iconOffset |
protected java.awt.Rectangle |
iconRect |
protected IconRetriever |
iconRetriever |
protected Size |
iconSize |
protected WWTexture |
iconTexture |
protected static java.lang.String |
LAYOUT_ABSOLUTE |
protected static java.lang.String |
LAYOUT_NONE |
protected static java.lang.String |
LAYOUT_RELATIVE |
static java.lang.String |
LOADING_IMAGE_PATH
The image file displayed while the icon is loading.
|
protected TacticalSymbol.LODSelector |
LODSelector
The LOD selector specified by the application, or null if none specified (the default).
|
protected static int |
MAX_SYMBOL_DIMENSION
Maximum expected size of a symbol, used to estimate screen bounds for view frustum culling.
|
protected long |
maxTimeSinceLastUsed |
protected IconRetriever |
modifierRetriever |
protected AVList |
modifiers
Indicates the current text and graphic modifiers assigned to this symbol.
|
protected TacticalSymbolAttributes |
normalAttrs
Indicates this symbol's normal (as opposed to highlight) attributes.
|
protected Offset |
offset |
protected Layer |
pickLayer
Per-frame layer indicating this symbol's layer when its ordered renderable was created.
|
protected PickSupport |
pickSupport
Support for setting up and restoring picking state, and resolving the picked object.
|
protected Position |
position
Indicates this symbol's geographic position.
|
protected boolean |
showGraphicModifiers
Indicates whether this symbol draws its supplemental graphic modifiers.
|
protected boolean |
showHostileIndicator
Indicates whether or not to display the implicit hostile indicator modifier.
|
protected boolean |
showLocation
Indicates whether or not to display the implicit location modifier.
|
protected boolean |
showTextModifiers
Indicates whether this symbol draws its supplemental text modifiers.
|
protected java.awt.Rectangle |
staticLayoutRect
Layout rect computed from the icon and static modifiers.
|
protected java.awt.Rectangle |
staticScreenRect
Screen rect computed from the icon and static modifiers.
|
protected AbstractTacticalSymbol.OrderedSymbol |
thisFramesOrderedSymbol |
protected UnitsFormat |
unitsFormat
Unit format used to format location and altitude for text modifiers.
|
protected boolean |
unresolvedGlyph
Indicates that one or more glyphs have not been resolved.
|
protected boolean |
visible
Indicates whether this symbol is drawn when in view.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractTacticalSymbol()
Constructs a new symbol with no position.
|
protected |
AbstractTacticalSymbol(Position position)
Constructs a new symbol with the specified position.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addGlyph(DrawContext dc,
Offset offset,
Offset hotspot,
java.lang.String modifierCode,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
addGlyph(DrawContext dc,
Offset offset,
Offset hotspot,
java.lang.String modifierCode,
AVList retrieverParams,
java.lang.Object layoutMode,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
addLabel(DrawContext dc,
Offset offset,
Offset hotspot,
java.lang.String modifierText,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
addLabel(DrawContext dc,
Offset offset,
Offset hotspot,
java.lang.String modifierText,
java.awt.Font font,
java.awt.Color color,
java.lang.Object layoutMode,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
addLine(DrawContext dc,
Offset offset,
java.util.List<? extends java.awt.geom.Point2D> points,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
addLine(DrawContext dc,
Offset offset,
java.util.List<? extends java.awt.geom.Point2D> points,
java.lang.Object layoutMode,
int numPointsInLayout,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
applyImplicitModifiers(AVList modifiers)
Add implicit modifiers to the modifier list.
|
protected AVList |
assembleIconRetrieverParameters(AVList params) |
protected void |
beginDrawing(DrawContext dc,
int attrMask) |
protected java.awt.Dimension |
computeMinTextLayout(DrawContext dc,
AVList modifiers)
Compute the dimension of the minimum layout rectangle for the text modifiers.
|
protected void |
computeScale(AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
computeScaledBounds(DrawContext dc,
AVList modifiers,
AbstractTacticalSymbol.OrderedSymbol osym)
Compute the bounds of symbol after the scale has been applied.
|
protected java.awt.Rectangle |
computeScaledRect(java.awt.Rectangle rect,
java.awt.Dimension maxDimension,
double scaleX,
double scaleY) |
protected java.awt.Rectangle |
computeScreenExtent(AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
computeSymbolPoints(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
computeTransform(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected PickedObject |
createPickedObject(int colorCode) |
protected void |
determineActiveAttributes() |
protected void |
doDrag(DragContext dragContext) |
protected void |
doDrawOrderedRenderable(DrawContext dc,
PickSupport pickCandidates,
AbstractTacticalSymbol.OrderedSymbol osym) |
void |
drag(DragContext dragContext)
Drag the object given the provided
DragContext . |
protected void |
draw(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
drawBatched(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol firstSymbol) |
protected void |
drawGlyphs(DrawContext dc) |
protected void |
drawGraphicModifiers(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
drawIcon(DrawContext dc) |
protected void |
drawLabels(DrawContext dc) |
protected void |
drawLines(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
drawOrderedRenderable(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
drawTextModifiers(DrawContext dc) |
protected void |
endDrawing(DrawContext dc) |
protected TacticalSymbolAttributes |
getActiveAttributes() |
int |
getAltitudeMode()
Indicates this symbol's altitude mode.
|
TacticalSymbolAttributes |
getAttributes()
Returns this symbol's normal (as opposed to highlight) attributes.
|
java.lang.Object |
getDelegateOwner()
Indicates the delegate owner of this symbol.
|
protected java.lang.Double |
getDepthOffset() |
protected java.lang.String |
getFormattedPosition()
Indicates the symbol's current position, formatted according to the current UnitsFormat.
|
protected AbstractTacticalSymbol.IconAtlasElement |
getGlyph(java.lang.String modifierCode,
AVList retrieverParams) |
protected TextureAtlas |
getGlyphAtlas() |
TacticalSymbolAttributes |
getHighlightAttributes()
Returns this symbol's highlight attributes.
|
protected IconRetriever |
getIconRetriever() |
TacticalSymbol.LODSelector |
getLODSelector()
Indicates this symbol's level of detail selector.
|
protected int |
getMaxLabelLines(AVList modifiers) |
protected int |
getMaxSymbolDimension()
Indicates the maximum expected size of a rendered tactical symbol.
|
java.lang.Object |
getModifier(java.lang.String modifier)
Indicates the current value of a text or graphic modifier.
|
protected IconRetriever |
getModifierRetriever() |
Offset |
getOffset()
Indicates a location within the symbol to align with the symbol point.
|
Position |
getPosition()
Indicates this symbol's geographic position.
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
UnitsFormat |
getUnitsFormat()
Indicates the unit format used to format values in text modifiers.
|
protected boolean |
intersectsFrustum(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
boolean |
isDragEnabled()
Indicates whether the object is enabled for dragging.
|
boolean |
isEnableBatchPicking() |
boolean |
isEnableBatchRendering() |
boolean |
isHighlighted()
Indicates whether to highlight the shape.
|
boolean |
isShowGraphicModifiers()
Indicates whether this symbol draws its supplemental graphic modifiers.
|
boolean |
isShowHostileIndicator()
Indicates whether or not to display an indicator when the symbol represents a hostile entity.
|
boolean |
isShowLocation()
Indicates whether or not to display this symbol's location as a text modifier.
|
boolean |
isShowTextModifiers()
Indicates whether this symbol draws its supplemental text modifiers.
|
boolean |
isVisible()
Indicates whether this symbol is drawn when in view.
|
protected void |
layout(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
layoutDynamicModifiers(DrawContext dc,
AVList modifiers,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout dynamic modifiers around the symbol.
|
protected void |
layoutGraphicModifiers(DrawContext dc,
AVList modifiers,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout static graphic modifiers around the symbol.
|
protected void |
layoutIcon(DrawContext dc,
AbstractTacticalSymbol.IconSource source,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected java.awt.Rectangle |
layoutLabelRect(Offset offset,
Offset hotspot,
java.awt.Dimension size,
java.lang.Object layoutMode,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout a label rectangle relative to the current layout.
|
protected java.util.List<? extends java.awt.geom.Point2D> |
layoutPoints(Offset offset,
java.util.List<? extends java.awt.geom.Point2D> points,
java.lang.Object layoutMode,
int numPointsInLayout,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected java.awt.Rectangle |
layoutRect(Offset offset,
Offset hotspot,
java.awt.Dimension size,
java.lang.Object layoutMode,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout a rectangle relative to the current layout.
|
protected void |
layoutStaticModifiers(DrawContext dc,
AVList modifiers,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout static modifiers around the symbol.
|
protected void |
layoutTextModifiers(DrawContext dc,
AVList modifiers,
AbstractTacticalSymbol.OrderedSymbol osym)
Layout static text modifiers around the symbol.
|
protected void |
makeOrderedRenderable(DrawContext dc) |
void |
move(Position delta)
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
|
void |
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
|
protected boolean |
mustDrawGraphicModifiers(DrawContext dc) |
protected boolean |
mustDrawIcon(DrawContext dc) |
protected boolean |
mustDrawTextModifiers(DrawContext dc) |
protected boolean |
mustLayout(AbstractTacticalSymbol.IconSource iconSource,
AVList modifiers)
Determines if the icon layout or static modifier layout must be computed.
|
void |
pick(DrawContext dc,
java.awt.Point pickPoint,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
prepareToDraw(DrawContext dc,
AbstractTacticalSymbol.OrderedSymbol osym) |
protected void |
removeDeadModifiers(long now) |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
protected void |
reset()
Invalidate the symbol layout, causing it to be recomputed on the next frame.
|
void |
setAltitudeMode(int altitudeMode)
Specifies this symbol's altitude mode.
|
void |
setAttributes(TacticalSymbolAttributes normalAttrs)
Specifies this symbol's normal (as opposed to highlight) attributes.
|
void |
setDelegateOwner(java.lang.Object owner)
Specifies the delegate owner of this symbol.
|
protected void |
setDepthOffset(java.lang.Double depthOffset) |
void |
setDragEnabled(boolean enabled)
Controls whether the object is enabled for dragging.
|
void |
setEnableBatchPicking(boolean enableBatchPicking) |
void |
setEnableBatchRendering(boolean enableBatchRendering) |
protected void |
setGlyphAtlas(TextureAtlas atlas) |
void |
setHighlightAttributes(TacticalSymbolAttributes highlightAttrs)
Specifies this symbol's highlight attributes.
|
void |
setHighlighted(boolean highlighted)
Specifies whether to highlight the shape.
|
protected void |
setIconRetriever(IconRetriever retriever) |
void |
setLODSelector(TacticalSymbol.LODSelector LODSelector)
Specifies this symbols level of detail selector.
|
void |
setModifier(java.lang.String modifier,
java.lang.Object value)
Specifies the value of a text or graphic modifier.
|
protected void |
setModifierRetriever(IconRetriever retriever) |
void |
setOffset(Offset offset)
Specifies a location within the tactical symbol to align with the symbol point.
|
void |
setPosition(Position position)
Specifies this symbol's geographic position.
|
void |
setShowGraphicModifiers(boolean showGraphicModifiers)
Specifies whether to draw this symbol's supplemental graphic modifiers.
|
void |
setShowHostileIndicator(boolean show)
Specifies whether or not to display an indicator when the symbol represents a hostile entity.
|
void |
setShowLocation(boolean show)
Specifies whether or not to display this symbol's location as a text modifier.
|
void |
setShowTextModifiers(boolean showTextModifiers)
Specifies whether to draw this symbol's supplemental text modifiers.
|
void |
setUnitsFormat(UnitsFormat unitsFormat)
Specifies the unit format used to format values in text modifiers.
|
void |
setVisible(boolean visible)
Specifies whether this symbol is drawn when in view.
|
onMessage, propertyChange
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
getIdentifier
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
onMessage
protected TacticalSymbolAttributes activeAttrs
determineActiveAttributes()
. Initialized
to a new BasicTacticalSymbolAttributes.protected WWTexture activeIconTexture
protected AVList activeModifiers
modifiers
, and applying changings in
applyImplicitModifiers(gov.nasa.worldwind.avlist.AVList)
.protected int altitudeMode
setAltitudeMode(int)
for a description of the valid altitude
modes. Initially Worldwind.ABSOLUTE.protected OGLStackHandler BEogsh
beginDrawing(gov.nasa.worldwind.render.DrawContext, int)
and endDrawing(gov.nasa.worldwind.render.DrawContext)
.protected java.util.List<AbstractTacticalSymbol.IconAtlasElement> currentGlyphs
protected java.util.List<AbstractTacticalSymbol.Label> currentLabels
protected java.util.List<AbstractTacticalSymbol.Line> currentLines
protected static final double DEFAULT_DEPTH_OFFSET
protected static final TextureAtlas DEFAULT_GLYPH_ATLAS
layoutGlyphModifier
. Initialized with initial dimensions of 1024x128 and maximum dimensions of
2048x2048. Configured to remove the least recently used texture elements when more space is needed.protected static final int DEFAULT_LABEL_LINES
protected static final long DEFAULT_MAX_TIME_SINCE_LAST_USED
public static final UnitsFormat DEFAULT_UNITS_FORMAT
protected static TacticalSymbolAttributes defaultAttrs
protected java.lang.Object delegateOwner
protected java.lang.Double depthOffset
protected boolean dragEnabled
protected DraggableSupport draggableSupport
protected boolean enableBatchPicking
protected boolean enableBatchRendering
protected java.lang.String formattedPosition
protected long frameNumber
protected TextureAtlas glyphAtlas
protected java.util.Map<java.lang.String,AbstractTacticalSymbol.IconAtlasElement> glyphMap
protected TacticalSymbolAttributes highlightAttrs
null
, indicating that the default attributes
are used. Initially null
.protected boolean highlighted
true
if this symbol is highlighted, otherwise
false
. Initially false
.protected Offset iconOffset
protected java.awt.Rectangle iconRect
protected IconRetriever iconRetriever
protected Size iconSize
protected WWTexture iconTexture
protected static final java.lang.String LAYOUT_ABSOLUTE
protected static final java.lang.String LAYOUT_NONE
protected static final java.lang.String LAYOUT_RELATIVE
public static final java.lang.String LOADING_IMAGE_PATH
protected TacticalSymbol.LODSelector LODSelector
protected static final int MAX_SYMBOL_DIMENSION
protected long maxTimeSinceLastUsed
protected IconRetriever modifierRetriever
protected AVList modifiers
setModifier(String, Object)
. Initialized to a new AVListImpl, and populated during construction from values in
the string identifier and the modifiers list.protected TacticalSymbolAttributes normalAttrs
null
, indicating that
the default attributes are used. Initially null
.protected Offset offset
protected Layer pickLayer
makeOrderedRenderable(gov.nasa.worldwind.render.DrawContext)
. Used to define the picked object's layer
during pick resolution. Initially null
.protected PickSupport pickSupport
pick(gov.nasa.worldwind.render.DrawContext, java.awt.Point,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
.protected Position position
setPosition(gov.nasa.worldwind.geom.Position)
for a
description of how tactical symbols interpret their position. Must be non-null, and is initialized during
construction.protected boolean showGraphicModifiers
true
if this symbol draws
its graphic modifiers, otherwise false
. Initially true
.protected boolean showHostileIndicator
protected boolean showLocation
protected boolean showTextModifiers
true
if this symbol draws its
text modifiers, otherwise false
. Initially true
.protected java.awt.Rectangle staticLayoutRect
protected java.awt.Rectangle staticScreenRect
protected AbstractTacticalSymbol.OrderedSymbol thisFramesOrderedSymbol
protected UnitsFormat unitsFormat
protected boolean unresolvedGlyph
protected boolean visible
true
if this symbol is drawn when in view,
otherwise false
. Initially true
.protected AbstractTacticalSymbol()
protected AbstractTacticalSymbol(Position position)
position
- the latitude, longitude, and altitude where the symbol is drawn.java.lang.IllegalArgumentException
- if the position is null
.protected void addGlyph(DrawContext dc, Offset offset, Offset hotspot, java.lang.String modifierCode, AbstractTacticalSymbol.OrderedSymbol osym)
protected void addGlyph(DrawContext dc, Offset offset, Offset hotspot, java.lang.String modifierCode, AVList retrieverParams, java.lang.Object layoutMode, AbstractTacticalSymbol.OrderedSymbol osym)
protected void addLabel(DrawContext dc, Offset offset, Offset hotspot, java.lang.String modifierText, AbstractTacticalSymbol.OrderedSymbol osym)
protected void addLabel(DrawContext dc, Offset offset, Offset hotspot, java.lang.String modifierText, java.awt.Font font, java.awt.Color color, java.lang.Object layoutMode, AbstractTacticalSymbol.OrderedSymbol osym)
protected void addLine(DrawContext dc, Offset offset, java.util.List<? extends java.awt.geom.Point2D> points, AbstractTacticalSymbol.OrderedSymbol osym)
protected void addLine(DrawContext dc, Offset offset, java.util.List<? extends java.awt.geom.Point2D> points, java.lang.Object layoutMode, int numPointsInLayout, AbstractTacticalSymbol.OrderedSymbol osym)
protected void applyImplicitModifiers(AVList modifiers)
modifiers
- List of modifiers. This method may modify this list by adding implicit modifiers.protected void beginDrawing(DrawContext dc, int attrMask)
protected java.awt.Dimension computeMinTextLayout(DrawContext dc, AVList modifiers)
dc
- Current draw context.modifiers
- The text modifiers.protected void computeScale(AbstractTacticalSymbol.OrderedSymbol osym)
protected void computeScaledBounds(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.protected java.awt.Rectangle computeScaledRect(java.awt.Rectangle rect, java.awt.Dimension maxDimension, double scaleX, double scaleY)
protected java.awt.Rectangle computeScreenExtent(AbstractTacticalSymbol.OrderedSymbol osym)
protected void computeSymbolPoints(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void computeTransform(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected PickedObject createPickedObject(int colorCode)
protected void determineActiveAttributes()
protected void doDrag(DragContext dragContext)
protected void doDrawOrderedRenderable(DrawContext dc, PickSupport pickCandidates, AbstractTacticalSymbol.OrderedSymbol osym)
public void drag(DragContext dragContext)
Draggable
DragContext
.drag
in interface Draggable
dragContext
- the DragContext
of this dragging event.protected void draw(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void drawBatched(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol firstSymbol)
protected void drawGlyphs(DrawContext dc)
protected void drawGraphicModifiers(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void drawIcon(DrawContext dc)
protected void drawLabels(DrawContext dc)
protected void drawLines(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void drawOrderedRenderable(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void drawTextModifiers(DrawContext dc)
protected void endDrawing(DrawContext dc)
protected TacticalSymbolAttributes getActiveAttributes()
public int getAltitudeMode()
TacticalSymbol.setAltitudeMode(int)
for a description of the valid altitude
modes.getAltitudeMode
in interface TacticalSymbol
public TacticalSymbolAttributes getAttributes()
getAttributes
in interface TacticalSymbol
null
, indicating that the default highlight
attributes are used.public java.lang.Object getDelegateOwner()
getDelegateOwner
in interface TacticalSymbol
protected java.lang.Double getDepthOffset()
protected java.lang.String getFormattedPosition()
protected AbstractTacticalSymbol.IconAtlasElement getGlyph(java.lang.String modifierCode, AVList retrieverParams)
protected TextureAtlas getGlyphAtlas()
public TacticalSymbolAttributes getHighlightAttributes()
getHighlightAttributes
in interface TacticalSymbol
null
, indicating that the default attributes are
used.protected IconRetriever getIconRetriever()
public TacticalSymbol.LODSelector getLODSelector()
TacticalSymbol
getLODSelector
in interface TacticalSymbol
protected int getMaxLabelLines(AVList modifiers)
protected int getMaxSymbolDimension()
public java.lang.Object getModifier(java.lang.String modifier)
TacticalSymbol.setModifier(String, Object)
for a
description of how modifiers values are interpreted.getModifier
in interface TacticalSymbol
modifier
- the modifier key.null
, indicating that this symbol does not display the specified
modifier.protected IconRetriever getModifierRetriever()
public Offset getOffset()
setOffset
for more information.public Position getPosition()
TacticalSymbol.setPosition(gov.nasa.worldwind.geom.Position)
for a
description of how tactical symbols interpret their position.getPosition
in interface TacticalSymbol
public Position getReferencePosition()
getReferencePosition
in interface Movable
public UnitsFormat getUnitsFormat()
getUnitsFormat
in interface TacticalSymbol
protected boolean intersectsFrustum(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
public boolean isDragEnabled()
Draggable
isDragEnabled
in interface Draggable
public boolean isEnableBatchPicking()
public boolean isEnableBatchRendering()
public boolean isHighlighted()
isHighlighted
in interface Highlightable
public boolean isShowGraphicModifiers()
isShowGraphicModifiers
in interface TacticalSymbol
public boolean isShowHostileIndicator()
setShowHostileIndicator
for more information.isShowHostileIndicator
in interface TacticalSymbol
public boolean isShowLocation()
isShowLocation
in interface TacticalSymbol
public boolean isShowTextModifiers()
isShowTextModifiers
in interface TacticalSymbol
public boolean isVisible()
isVisible
in interface TacticalSymbol
protected void layout(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void layoutDynamicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.layoutStaticModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
protected void layoutGraphicModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.layoutDynamicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
protected void layoutIcon(DrawContext dc, AbstractTacticalSymbol.IconSource source, AbstractTacticalSymbol.OrderedSymbol osym)
protected java.awt.Rectangle layoutLabelRect(Offset offset, Offset hotspot, java.awt.Dimension size, java.lang.Object layoutMode, AbstractTacticalSymbol.OrderedSymbol osym)
offset
- Offset into either the iconRect
or layoutRect
at which to align the hot spot.hotspot
- Offset into the rectangle of the hot spot.size
- Size of the rectangle.layoutMode
- One of LAYOUT_ABSOLUTE
, LAYOUT_RELATIVE
, or LAYOUT_NONE
.osym
- The OrderedSymbol to hold the per-frame data.protected java.util.List<? extends java.awt.geom.Point2D> layoutPoints(Offset offset, java.util.List<? extends java.awt.geom.Point2D> points, java.lang.Object layoutMode, int numPointsInLayout, AbstractTacticalSymbol.OrderedSymbol osym)
protected java.awt.Rectangle layoutRect(Offset offset, Offset hotspot, java.awt.Dimension size, java.lang.Object layoutMode, AbstractTacticalSymbol.OrderedSymbol osym)
offset
- Offset into either the iconRect
or layoutRect
at which to align the hot spot.hotspot
- Offset into the rectangle of the hot spot.size
- Size of the rectangle.layoutMode
- One of LAYOUT_ABSOLUTE
, LAYOUT_RELATIVE
, or LAYOUT_NONE
.osym
- The OrderedSymbol to hold the per-frame data.protected void layoutStaticModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
layoutGraphicModifiers
and layoutTextModifiers
.dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.layoutDynamicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
,
layoutGraphicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
,
layoutTextModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
protected void layoutTextModifiers(DrawContext dc, AVList modifiers, AbstractTacticalSymbol.OrderedSymbol osym)
dc
- Current draw context.modifiers
- Current modifiers.osym
- The OrderedSymbol to hold the per-frame data.layoutDynamicModifiers(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.avlist.AVList,
gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
protected void makeOrderedRenderable(DrawContext dc)
public void move(Position delta)
public void moveTo(Position position)
protected boolean mustDrawGraphicModifiers(DrawContext dc)
protected boolean mustDrawIcon(DrawContext dc)
protected boolean mustDrawTextModifiers(DrawContext dc)
protected boolean mustLayout(AbstractTacticalSymbol.IconSource iconSource, AVList modifiers)
iconSource
- Current icon source.modifiers
- Current modifiers.public void pick(DrawContext dc, java.awt.Point pickPoint, AbstractTacticalSymbol.OrderedSymbol osym)
protected void prepareToDraw(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void removeDeadModifiers(long now)
public void render(DrawContext dc)
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
protected void reset()
public void setAltitudeMode(int altitudeMode)
This symbol assumes the altitude mode WorldWind.ABSOLUTE if the specified mode is not recognized.
setAltitudeMode
in interface TacticalSymbol
altitudeMode
- this symbol's new altitude mode.public void setAttributes(TacticalSymbolAttributes normalAttrs)
setAttributes
in interface TacticalSymbol
normalAttrs
- the normal attributes. May be null
, in which case default attributes are used.public void setDelegateOwner(java.lang.Object owner)
setDelegateOwner
in interface TacticalSymbol
owner
- the object to use as the pickable object returned during picking, or null to return the symbol.protected void setDepthOffset(java.lang.Double depthOffset)
public void setDragEnabled(boolean enabled)
Draggable
setDragEnabled
in interface Draggable
enabled
- true
if the object is enabled, else false
.public void setEnableBatchPicking(boolean enableBatchPicking)
public void setEnableBatchRendering(boolean enableBatchRendering)
protected void setGlyphAtlas(TextureAtlas atlas)
public void setHighlightAttributes(TacticalSymbolAttributes highlightAttrs)
setHighlightAttributes
in interface TacticalSymbol
highlightAttrs
- the highlight attributes. May be null
, in which case default highlight
attributes are used.public void setHighlighted(boolean highlighted)
setHighlighted
in interface Highlightable
highlighted
- true to highlight the shape, otherwise false.protected void setIconRetriever(IconRetriever retriever)
public void setLODSelector(TacticalSymbol.LODSelector LODSelector)
TacticalSymbol
setLODSelector
in interface TacticalSymbol
LODSelector
- the level of detail selector. May be null, the default, to indicate no level of detail
selector.public void setModifier(java.lang.String modifier, java.lang.Object value)
null
, the modifier is removed from this symbol.
If the specified modifier represents a graphic or text modifier, its display is suppressed if isShowGraphicModifiers or isShowTextModifiers, respectively, returns false.
setModifier
in interface TacticalSymbol
modifier
- the modifier key.value
- the modifier value. May be null
, indicating that the modifier should be removed from
this symbol.protected void setModifierRetriever(IconRetriever retriever)
public void setOffset(Offset offset)
setOffset(Offset.CENTER)
aligns the center of the symbol with the symbol point, and setOffset(Offset.BOTTOM_CENTER)
aligns the center of the bottom edge with the symbol point.offset
- the hot spot controlling the symbol's placement relative to the symbol point. May be null to
indicate default alignment.public void setPosition(Position position)
setPosition
in interface TacticalSymbol
position
- this symbol's new position.public void setShowGraphicModifiers(boolean showGraphicModifiers)
setShowGraphicModifiers
in interface TacticalSymbol
showGraphicModifiers
- true if this symbol should draw its graphic modifiers, otherwise false.public void setShowHostileIndicator(boolean show)
setShowHostileIndicator
in interface TacticalSymbol
show
- true if this symbol will display an indicator when this symbol represents a hostile entity and the
symbol specification supports such an indicator.public void setShowLocation(boolean show)
setShowLocation
in interface TacticalSymbol
show
- true if the symbol will display the location modifier. Note that not some symbols may not support
this modifier.public void setShowTextModifiers(boolean showTextModifiers)
setShowTextModifiers
in interface TacticalSymbol
showTextModifiers
- true if this symbol should draw its text modifiers, otherwise false.public void setUnitsFormat(UnitsFormat unitsFormat)
setUnitsFormat
in interface TacticalSymbol
unitsFormat
- Format used to format text modifiers.public void setVisible(boolean visible)
setVisible
in interface TacticalSymbol
visible
- true if this symbol should be drawn when in view, otherwise false.