public class SectorRangeFan extends AbstractMilStd2525TacticalGraphic implements PreRenderable
| Modifier and Type | Field and Description | 
|---|---|
protected Iterable<String> | 
altitudes
Altitudes of the range fans. 
 | 
protected Angle | 
arrowAngle
Length of the arrowhead from base to tip, as a fraction of the Center Of Sector line length. 
 | 
protected SurfacePolygon | 
arrowHead
Polygon to draw a filled arrow head on the Center Of Sector line. 
 | 
protected double | 
arrowLength
Angle of the arrowhead. 
 | 
protected static double | 
AZIMUTH_LABEL_OFFSET
Azimuth labels are placed to the side of the line that they label. 
 | 
protected NumberFormat | 
azimuthFormat
Number format used to create azimuth labels. 
 | 
protected Iterable<? extends Angle> | 
azimuths
Azimuths of the range fans. 
 | 
protected Angle | 
centerAzimuth
Azimuth of the Center Of Sector arrow. 
 | 
protected double | 
centerOfSectorLength
Length of the Center Of Sector line, as a fraction of the last range fan radius. 
 | 
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 Center Of Sector line length. 
 | 
static double | 
DEFAULT_CENTER_OF_SECTOR_LENGTH
Default length of the Center Of Sector line, as a fraction of the final range fan radius. 
 | 
static int | 
DEFAULT_NUM_INTERVALS
Default number of intervals used to draw each arcs. 
 | 
static NumberFormat | 
DEFAULT_NUMBER_FORMAT
Default number format used to create azimuth and radius labels. 
 | 
protected int | 
intervals
Number of intervals used to draw each arcs. 
 | 
protected double | 
maxRadius
Maximum radius in the range fan. 
 | 
protected List<Path> | 
paths
Rings that make up the range fan. 
 | 
protected Position | 
position
Position of the center of the range fan. 
 | 
protected Iterable<Double> | 
radii
Radii of the range fans, in meters. 
 | 
protected NumberFormat | 
radiusFormat
Number format used to create radius labels. 
 | 
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, symbolCodeactiveOverrides, 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 | 
|---|
SectorRangeFan(String sidc)
Create the range fan. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
applyDefaultAttributes(ShapeAttributes attributes)
Apply defaults to the active attributes bundle. 
 | 
protected void | 
applyDelegateOwner(Object owner)
Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic. 
 | 
protected List<Position> | 
computeArrowheadPositions(DrawContext dc,
                         Position base,
                         Position tip,
                         double arrowLength,
                         Angle arrowAngle)
Compute the positions of the arrow head for the sector center line. 
 | 
protected double | 
computeAzimuthLabelOffset(double radius,
                         double maxRadius)
Compute an angular offset to apply to a azimuth label. 
 | 
protected Angle | 
computeCenterSectorAngle(Angle finalLeftAzimuth,
                        Angle finalRightAzimuth)
Compute the angle of the Center Of Sector line. 
 | 
protected void | 
createArc(DrawContext dc,
         double radius,
         Angle leftAzimuth,
         Angle rightAzimuth,
         List<Position> positions)
Create positions to draw an arc around the graphic's center position. 
 | 
protected void | 
createAzimuthLabels()
Create azimuth labels. 
 | 
protected String | 
createAzimuthLabelString(Angle azimuth)
Create text for an azimuth label. 
 | 
protected void | 
createCenterOfSectorArrow(DrawContext dc,
                         Angle centerAzimuth,
                         double finalRadius)
Create shapes to draw the Center Of Sector arrow. 
 | 
protected void | 
createLabels()
Create labels for the start and end of the path. 
 | 
protected Path | 
createPath(List<Position> positions)
Create and configure the Path used to render this graphic. 
 | 
protected SurfacePolygon | 
createPolygon()
Create and configure a SurfacePolygon to render the arrow head on the sector center line. 
 | 
protected String | 
createRangeLabelString(double radius,
                      String altitude)
Create text for a range label. 
 | 
protected void | 
createShapes(DrawContext dc)
Create the paths required to draw the graphic. 
 | 
protected void | 
determineActiveAttributes()
Determine active attributes for this frame. 
 | 
protected void | 
determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels. 
 | 
protected Position | 
determineRangeLabelPosition(Position center,
                           Angle centerAzimuth,
                           Angle leftAzimuth,
                           Angle rightAzimuth,
                           double radiusRadians)
Determine the position of a range label for a ring in the range fan. 
 | 
protected void | 
doRenderGraphic(DrawContext dc)
Render the polygon. 
 | 
protected void | 
doRenderGraphicModifiers(DrawContext dc)
Render the graphic modifiers. 
 | 
Iterable<String> | 
getAltitudes()
Indicates the altitudes of the rings that make up the range fan. 
 | 
Angle | 
getArrowAngle()
Indicates the angle of the arrowhead. 
 | 
double | 
getArrowLength()
Indicates the length of the arrowhead. 
 | 
NumberFormat | 
getAzimuthFormat()
Indicates the number format applied to azimuth values to create the azimuth labels. 
 | 
Iterable<? extends Angle> | 
getAzimuths()
Indicates the left and right azimuths of the fans in this graphic. 
 | 
double | 
getCenterOfSectorLength()
Indicates the length of the Center Of Sector line. 
 | 
int | 
getIntervals()
Indicates the number of intervals used to draw the arc in this graphic. 
 | 
Object | 
getModifier(String modifier)
Indicates the current value of a text or graphic modifier. 
 | 
Position | 
getPosition()
Indicates the center position of the range ran. 
 | 
Iterable<? extends Position> | 
getPositions()
Indicates the positions of the control points that place and orient the graphic. 
 | 
Iterable<Double> | 
getRadii()
Indicates the radii of the rings that make up the range fan. 
 | 
NumberFormat | 
getRadiusFormat()
Indicates the number format applied to radius values to create the radius labels. 
 | 
Position | 
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. 
 | 
static List<String> | 
getSupportedGraphics()
Indicates the graphics supported by this class. 
 | 
String | 
getSymbol()
Indicates a symbol drawn at the center of the range fan. 
 | 
protected Angle | 
normalizeAzimuth(Angle azimuth)
Normalize an azimuth angle to the range [-180:180] degrees. 
 | 
void | 
preRender(DrawContext dc) | 
protected void | 
reset()
Regenerate the graphics positions on the next frame. 
 | 
void | 
setAltitudes(Iterable<String> altitudes)
Specifies the altitudes of the rings that make up the range fan. 
 | 
void | 
setArrowAngle(Angle arrowAngle)
Specifies the angle of the arrowhead in the graphic. 
 | 
void | 
setArrowLength(double arrowLength)
Specifies the length of the arrowhead. 
 | 
void | 
setAzimuthFormat(NumberFormat azimuthFormat)
Specifies the number format applied to azimuth values to create the azimuth labels. 
 | 
void | 
setAzimuths(Iterable<? extends Angle> azimuths)
Specifies the left and right azimuths of the range fans in this graphic. 
 | 
void | 
setCenterOfSector(double centerOfSectorLength)
Specifies the length of the Center Of Sector line. 
 | 
void | 
setIntervals(int intervals)
Specifies the number of intervals used to draw the arc in this graphic. 
 | 
void | 
setModifier(String modifier,
           Object value)
Specifies the value of a text or graphic modifier. 
 | 
void | 
setPosition(Position position)
Specifies the center position of the range ran. 
 | 
void | 
setPositions(Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic. 
 | 
void | 
setRadii(Iterable<Double> radii)
Specifies the radii of the rings that make up the range fan. 
 | 
void | 
setRadiusFormat(NumberFormat radiusFormat)
Specifies the number format applied to radius values to create the radius labels. 
 | 
void | 
setSymbol(String sidc)
Specifies a symbol to draw at the center of the range fan. 
 | 
createSymbol, getDefaultMaterial, getIdentifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setStatusaddLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineDelegateOwner, 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, setVisibleaddPropertyChangeListener, 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, waitgetAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisiblerenderisHighlighted, setHighlightedaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected Angle arrowAngle
protected SurfacePolygon arrowHead
protected double arrowLength
protected static final double AZIMUTH_LABEL_OFFSET
protected NumberFormat azimuthFormat
protected Iterable<? extends Angle> azimuths
protected Angle centerAzimuth
protected double centerOfSectorLength
public static final Angle DEFAULT_ARROWHEAD_ANGLE
public static final double DEFAULT_ARROWHEAD_LENGTH
public static final double DEFAULT_CENTER_OF_SECTOR_LENGTH
public static final int DEFAULT_NUM_INTERVALS
public static final NumberFormat DEFAULT_NUMBER_FORMAT
protected int intervals
protected double maxRadius
protected Position position
protected NumberFormat radiusFormat
protected TacticalSymbol symbol
protected TacticalSymbolAttributes symbolAttributes
public SectorRangeFan(String sidc)
sidc - Symbol code the identifies the graphic.protected void applyDefaultAttributes(ShapeAttributes attributes)
applyDefaultAttributes in class AbstractMilStd2525TacticalGraphicattributes - Attributes bundle to receive defaults.protected void applyDelegateOwner(Object owner)
applyDelegateOwner in class AbstractTacticalGraphicowner - Current delegate owner.protected 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 double computeAzimuthLabelOffset(double radius,
                                           double maxRadius)
radius - Radius at which the label will be placed.maxRadius - Maximum radius in the range fan.protected Angle computeCenterSectorAngle(Angle finalLeftAzimuth, Angle finalRightAzimuth)
finalLeftAzimuth - Left azimuth of the last range fan in the graphic.finalRightAzimuth - Right azimuth of the last range fan in the graphic.protected void createArc(DrawContext dc, double radius, Angle leftAzimuth, Angle rightAzimuth, List<Position> positions)
dc - Current draw context.radius - Radius of the circular segment, in meters.leftAzimuth - Azimuth (from North) of the left side of the arc.rightAzimuth - Azimuth (from North) of teh right side of the arc.positions - List to collect positions for the arc.protected void createAzimuthLabels()
protected String createAzimuthLabelString(Angle azimuth)
azimuth - Azimuth, measured clockwise from North.protected void createCenterOfSectorArrow(DrawContext dc, Angle centerAzimuth, double finalRadius)
dc - Current draw context.centerAzimuth - Azimuth of the Center Of Sector arrow.finalRadius - Radius, in meters, of the final range fan.protected void createLabels()
createLabels in class AbstractTacticalGraphicprotected Path createPath(List<Position> positions)
positions - Positions that define the path.protected SurfacePolygon createPolygon()
protected String createRangeLabelString(double radius, String altitude)
radius - Range of the ring, in meters.altitude - Altitude string.protected void createShapes(DrawContext dc)
dc - Current draw context.protected void determineActiveAttributes()
determineActiveAttributes in class AbstractTacticalGraphicprotected void determineLabelPositions(DrawContext dc)
determineLabelPositions in class AbstractTacticalGraphicdc - Current draw context.protected Position determineRangeLabelPosition(Position center, Angle centerAzimuth, Angle leftAzimuth, Angle rightAzimuth, double radiusRadians)
center - Center of the range fan.centerAzimuth - Azimuth of the Center Of Sector arrow.leftAzimuth - Left azimuth of this ring.rightAzimuth - Right azimuth of this ring.radiusRadians - Radius, in radians, at which to place the label.protected void doRenderGraphic(DrawContext dc)
doRenderGraphic in class AbstractTacticalGraphicdc - 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 AbstractTacticalGraphicdc - Current draw context.public Iterable<String> getAltitudes()
public Angle getArrowAngle()
public double getArrowLength()
public NumberFormat getAzimuthFormat()
public Iterable<? extends Angle> getAzimuths()
public double getCenterOfSectorLength()
public int getIntervals()
public Object getModifier(String modifier)
getModifier in interface TacticalGraphicgetModifier in class AbstractMilStd2525TacticalGraphicmodifier - Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.null if the modifier is not set.public Position getPosition()
public Iterable<? extends Position> getPositions()
getPositions in interface TacticalGraphicpublic Iterable<Double> getRadii()
public NumberFormat getRadiusFormat()
public Position getReferencePosition()
getReferencePosition in interface Movablepublic static List<String> getSupportedGraphics()
public String getSymbol()
protected Angle normalizeAzimuth(Angle azimuth)
azimuth - Azimuth to normalize.azimuth is null.public void preRender(DrawContext dc)
preRender in interface PreRenderableprotected void reset()
public void setAltitudes(Iterable<String> altitudes)
altitudes - List of altitude strings.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 setAzimuthFormat(NumberFormat azimuthFormat)
azimuthFormat - NumberFormat to create azimuth labels.public void setAzimuths(Iterable<? extends Angle> azimuths)
azimuths - Left and right azimuths, measured clockwise from North.public void setCenterOfSector(double centerOfSectorLength)
centerOfSectorLength - Length of the Center Of Sector arrow as a fraction of the final range fan radius.public void setIntervals(int intervals)
intervals - Number of intervals for drawing the arc.public void setModifier(String modifier, Object value)
setModifier in interface TacticalGraphicsetModifier in class AbstractMilStd2525TacticalGraphicmodifier - Key that identifies the modifier to set. The possible modifiers depends on the symbol set.value - New value for the modifier.public void setPosition(Position position)
position - The new center position.public void setPositions(Iterable<? extends Position> positions)
setPositions in interface TacticalGraphicpositions - Control points. This graphic uses only one control point, which determines the center of the
                  circle.public void setRadii(Iterable<Double> radii)
radii - List of radii, in meters. A circle will be created for each radius.public void setRadiusFormat(NumberFormat radiusFormat)
radiusFormat - NumberFormat to create radius labels.public void setSymbol(String sidc)
SymbologyConstants.SYMBOL_INDICATOR modifier. The symbol's position will be changed to match the range fan
 center position.sidc - The identifier of a MIL-STD-2525C tactical symbol to draw at the center of the range fan. May be null
             to indicate that no symbol is drawn.