public abstract class AbstractTacticalGraphic extends AVListImpl implements TacticalGraphic, Renderable, Draggable
doRenderGraphic and applyDelegateOwner(Object).| Modifier and Type | Field and Description | 
|---|---|
| protected TacticalGraphicAttributes | activeOverridesOverride attributes for the current frame. | 
| protected ShapeAttributes | activeShapeAttributesShape attributes shared by all shapes that make up this graphic. | 
| protected static Material | DEFAULT_HIGHLIGHT_MATERIALThe default highlight color. | 
| protected static double | DEFAULT_LABEL_INTERIOR_OPACITYOpacity of label interiors. | 
| protected Object | delegateOwnerObject returned during picking to represent this graphic. | 
| protected boolean | dragEnabledIndicates whether this object can be dragged. | 
| protected DraggableSupport | draggableSupportProvides additional information for dragging regarding this particular object. | 
| protected long | frameTimestampCurrent frame timestamp. | 
| protected TacticalGraphicAttributes | highlightAttributesAttributes to apply when the graphic is highlighted. | 
| protected boolean | highlightedIndicates whether or not the graphic is highlighted. | 
| protected Offset | labelOffsetOffset applied to the graphic's main label. | 
| protected List<TacticalGraphicLabel> | labelsLabels to render with the graphic. | 
| protected AVList | modifiersMap of modifiers applied to this graphic. | 
| protected boolean | mustCreateLabelsFlag to indicate that labels must be recreated before the graphic is rendered. | 
| protected TacticalGraphicAttributes | normalAttributesAttributes to apply when the graphic is not highlighted. | 
| protected boolean | showGraphicModifiersIndicates whether or not to render graphic modifiers. | 
| protected boolean | showHostileIndicatorIndicates whether or not to render the hostile/enemy modifier. | 
| protected boolean | showLocationIndicates whether or not to render the location modifier. | 
| protected boolean | showTextModifiersIndicates whether or not to render text modifiers. | 
| protected String | textThe graphic's text string. | 
| protected UnitsFormat | unitsFormatUnit format used to format location and altitude for text modifiers. | 
| protected boolean | visibleIndicates whether or not to render the graphic. | 
| Constructor and Description | 
|---|
| AbstractTacticalGraphic() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected TacticalGraphicLabel | addLabel(String text) | 
| protected void | applyDefaultAttributes(ShapeAttributes attributes)Apply defaults to the active attributes bundle. | 
| protected abstract void | applyDelegateOwner(Object owner)Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic. | 
| protected void | applyLabelAttributes()Apply the active attributes to the graphic's labels. | 
| protected void | applyOverrideAttributes(TacticalGraphicAttributes graphicAttributes,
                       ShapeAttributes shapeAttributes)Apply override attributes specified in a TacticalGraphicAttributes bundle to the active ShapeAttributes. | 
| protected void | computeGeometry(DrawContext dc) | 
| protected double | computeLabelInteriorOpacity(double textOpacity)Compute the opacity for the label interior. | 
| protected void | createLabels() | 
| protected void | determineActiveAttributes()Determine active attributes for this frame. | 
| protected void | determineDelegateOwner()Determine the delegate owner for the current frame, and apply the owner to all renderable objects used to draw
 the graphic. | 
| protected void | determineLabelPositions(DrawContext dc)Determine positions for the start and end labels. | 
| protected void | determinePerFrameAttributes(DrawContext dc)Determine geometry and attributes for this frame. | 
| protected void | doDrag(DragContext dragContext) | 
| protected abstract void | doRenderGraphic(DrawContext dc)Render this graphic, without modifiers. | 
| protected void | doRenderGraphicModifiers(DrawContext dc)Render the graphic modifiers. | 
| protected void | doRenderTextModifiers(DrawContext dc)Render the text modifiers. | 
| void | drag(DragContext dragContext)Drag the object given the provided  DragContext. | 
| protected Object | getActiveDelegateOwner()Indicates the object attached to the pick list to represent this graphic. | 
| protected TacticalGraphicAttributes | getActiveOverrideAttributes()Get the override attributes that are active for this frame. | 
| protected ShapeAttributes | getActiveShapeAttributes()Get the active shape attributes for this frame. | 
| TacticalGraphicAttributes | getAttributes()Indicates this graphic's attributes when it is in the normal (as opposed to highlighted) state. | 
| protected Offset | getDefaultLabelOffset()Indicates the default offset applied to the graphic's main label. | 
| Object | getDelegateOwner()Returns the delegate owner of the graphic. | 
| TacticalGraphicAttributes | getHighlightAttributes()Indicate this graphic's attributes when it is in the highlighted state. | 
| protected Material | getLabelMaterial()Get the Material that should be used to draw labels. | 
| Offset | getLabelOffset()Indicates an offset used to position the graphic's main label relative to the label's geographic position. | 
| Object | getModifier(String modifier)Indicates the current value of a text or graphic modifier. | 
| String | getText()Convenience method to access the text modifier of the graphic. | 
| UnitsFormat | getUnitsFormat()Indicates the unit format used to format values in text modifiers. | 
| boolean | isDragEnabled()Indicates whether the object is enabled for dragging. | 
| boolean | isHighlighted()Indicates whether to highlight the shape. | 
| boolean | isShowGraphicModifiers()Indicates whether this graphic draws its supplemental graphic modifiers. | 
| boolean | isShowHostileIndicator()Indicates whether or not this graphic will display a text indicator when the graphic represents a hostile entity. | 
| boolean | isShowLocation()Indicates whether or not the graphic should display its location as a text modifier. | 
| boolean | isShowTextModifiers()Indicates whether this graphic draws its supplemental text modifiers. | 
| boolean | isVisible()Indicates whether this graphic is drawn when in view. | 
| 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 void | onModifierChanged()Invoked when a modifier is changed. | 
| void | render(DrawContext dc)Causes this  Renderableto render itself using the provided draw context. | 
| void | setAttributes(TacticalGraphicAttributes attributes)Specifies attributes for this graphic in the normal (as opposed to highlighted) state. | 
| void | setDelegateOwner(Object owner)Specifies the delegate owner of the graphic. | 
| void | setDragEnabled(boolean enabled)Controls whether the object is enabled for dragging. | 
| void | setHighlightAttributes(TacticalGraphicAttributes attributes)Specifies attributes for this graphic in the highlighted state. | 
| void | setHighlighted(boolean highlighted)Specifies whether to highlight the shape. | 
| void | setLabelOffset(Offset labelOffset)Specifies an offset used to position this graphic's main label relative to the label's geographic position. | 
| void | setModifier(String modifier,
           Object value)Specifies the value of a text or graphic modifier. | 
| void | setShowGraphicModifiers(boolean showModifiers)Specifies whether to draw this graphic's supplemental graphic modifiers. | 
| void | setShowHostileIndicator(boolean showHostileIndicator)Specifies whether or not to display a text indicator when the symbol or graphic represents a hostile entity. | 
| void | setShowLocation(boolean showLocation)Specifies whether or not the graphic should display its location as a text modifier. | 
| void | setShowTextModifiers(boolean showModifiers)Specifies whether to draw this graphic's supplemental text modifiers. | 
| void | setText(String text)Convenience method to specify a text modifier for the graphic. | 
| void | setUnitsFormat(UnitsFormat unitsFormat)Specifies the unit format used to format values in text modifiers. | 
| void | setVisible(boolean visible)Specifies whether this graphic is drawn when in view. | 
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, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdentifier, getPositions, setPositionsgetReferencePositionaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected TacticalGraphicAttributes activeOverrides
protected ShapeAttributes activeShapeAttributes
protected static final Material DEFAULT_HIGHLIGHT_MATERIAL
protected static final double DEFAULT_LABEL_INTERIOR_OPACITY
protected Object delegateOwner
protected boolean dragEnabled
protected DraggableSupport draggableSupport
protected long frameTimestamp
protected TacticalGraphicAttributes highlightAttributes
protected boolean highlighted
protected Offset labelOffset
protected List<TacticalGraphicLabel> labels
protected AVList modifiers
protected boolean mustCreateLabels
protected TacticalGraphicAttributes normalAttributes
protected boolean showGraphicModifiers
protected boolean showHostileIndicator
protected boolean showLocation
protected boolean showTextModifiers
protected String text
SymbologyConstants.UNIQUE_DESIGNATION modifier.
 Note that this field is not used if an Iterable is specified as the unique designation.protected UnitsFormat unitsFormat
protected boolean visible
protected TacticalGraphicLabel addLabel(String text)
protected void applyDefaultAttributes(ShapeAttributes attributes)
attributes - Attributes bundle to receive defaults.protected abstract void applyDelegateOwner(Object owner)
owner - Current delegate owner.protected void applyLabelAttributes()
protected void applyOverrideAttributes(TacticalGraphicAttributes graphicAttributes, ShapeAttributes shapeAttributes)
graphicAttributes will be applied to shapeAttributes.graphicAttributes - Override attributes.shapeAttributes - Shape attributes to receive overrides.protected void computeGeometry(DrawContext dc)
protected double computeLabelInteriorOpacity(double textOpacity)
textOpacity - Opacity of the label text.protected void createLabels()
protected void determineActiveAttributes()
protected void determineDelegateOwner()
protected void determineLabelPositions(DrawContext dc)
dc - Current draw context.protected void determinePerFrameAttributes(DrawContext dc)
dc - Current draw context.protected void doDrag(DragContext dragContext)
protected abstract void doRenderGraphic(DrawContext dc)
dc - Current draw context.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext), 
doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)protected void doRenderGraphicModifiers(DrawContext dc)
dc - Current draw context.protected void doRenderTextModifiers(DrawContext dc)
dc - Current draw context.public void drag(DragContext dragContext)
DraggableDragContext.drag in interface DraggabledragContext - the DragContext of this dragging event.protected Object getActiveDelegateOwner()
this if an owner is not specified.protected TacticalGraphicAttributes getActiveOverrideAttributes()
protected ShapeAttributes getActiveShapeAttributes()
public TacticalGraphicAttributes getAttributes()
getAttributes in interface TacticalGraphicprotected Offset getDefaultLabelOffset()
public Object getDelegateOwner()
getDelegateOwner in interface TacticalGraphicpublic TacticalGraphicAttributes getHighlightAttributes()
getHighlightAttributes in interface TacticalGraphicprotected Material getLabelMaterial()
public Offset getLabelOffset()
setLabelOffset for more information.getLabelOffset in interface TacticalGraphicpublic Object getModifier(String modifier)
getModifier in interface TacticalGraphicmodifier - Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.null if the modifier is not set.public String getText()
getModifier(SymbologyConstants.UNIQUE_DESIGNATION).getText in interface TacticalGraphicTacticalGraphic.getModifier(String)public UnitsFormat getUnitsFormat()
getUnitsFormat in interface TacticalGraphicpublic boolean isDragEnabled()
DraggableisDragEnabled in interface Draggablepublic boolean isHighlighted()
isHighlighted in interface Highlightablepublic boolean isShowGraphicModifiers()
isShowGraphicModifiers in interface TacticalGraphicpublic boolean isShowHostileIndicator()
setShowHostileIndicator for more information.isShowHostileIndicator in interface TacticalGraphicpublic boolean isShowLocation()
isShowLocation in interface TacticalGraphicpublic boolean isShowTextModifiers()
isShowTextModifiers in interface TacticalGraphicpublic boolean isVisible()
isVisible in interface TacticalGraphicpublic void move(Position delta)
public void moveTo(Position position)
protected void onModifierChanged()
public void render(DrawContext dc)
Renderable to render itself using the provided draw context.render in interface Renderabledc - the DrawContext to be usedDrawContextpublic void setAttributes(TacticalGraphicAttributes attributes)
setAttributes in interface TacticalGraphicattributes - new attributes. May be null, in which case default attributes are used.public void setDelegateOwner(Object owner)
setDelegateOwner in interface TacticalGraphicowner - the object to use as the pickable object returned during picking, or null to return the graphic.public void setDragEnabled(boolean enabled)
DraggablesetDragEnabled in interface Draggableenabled - true if the object is enabled, else false.public void setHighlightAttributes(TacticalGraphicAttributes attributes)
setAttributes for more information on how the attributes are
 interpreted.setHighlightAttributes in interface TacticalGraphicattributes - 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 Highlightablehighlighted - true to highlight the shape, otherwise false.public void setLabelOffset(Offset labelOffset)
setLabelOffset in interface TacticalGraphiclabelOffset - The offset that determines how the graphic's label is placed relative to the graphic.public void setModifier(String modifier, Object value)
setModifier in interface TacticalGraphicmodifier - Key that identifies the modifier to set. The possible modifiers depends on the symbol set.value - New value for the modifier.public void setShowGraphicModifiers(boolean showModifiers)
setShowGraphicModifiers in interface TacticalGraphicshowModifiers - true if this graphic should draw its graphic modifiers, otherwise false.public void setShowHostileIndicator(boolean showHostileIndicator)
setShowHostileIndicator in interface TacticalGraphicshowHostileIndicator - true if this graphic should display an indicator when this graphic represents a hostile entity and
             the graphic implementation supports such an indicator. Note that some graphics may not display an
             indicator, even when representing a hostile entity.public void setShowLocation(boolean showLocation)
setShowLocation in interface TacticalGraphicshowLocation - true if the graphic will display the location modifier. Note that not all graphics support this
             modifier.public void setShowTextModifiers(boolean showModifiers)
setShowTextModifiers in interface TacticalGraphicshowModifiers - true if this graphic should draw its text modifiers, otherwise false.public void setText(String text)
setModifier(SymbologyConstants.UNIQUE_DESIGNATION, text).setText in interface TacticalGraphictext - New text modifier. May be null.TacticalGraphic.setModifier(String, Object)public void setUnitsFormat(UnitsFormat unitsFormat)
setUnitsFormat in interface TacticalGraphicunitsFormat - Format used to format text modifiers.public void setVisible(boolean visible)
setVisible in interface TacticalGraphicvisible - true if this graphic should be drawn when in view, otherwise false.