public class DirectionOfAttackAviation extends DirectionOfAttack
Modifier and Type | Field and Description |
---|---|
protected double |
bowTieLength
Length of the bow tie part of the graphic, as a fraction of the graphic's total length.
|
protected double |
bowTieWidth
Width of the bow tie part of the graphic, as a fraction of the length of the bow tie.
|
protected Angle |
curvature
Angle that controls the curve of the line.
|
static double |
DEFAULT_BOW_TIE_LENGTH
Default length of the bow tie part of the graphic, as a fraction of the graphic's total length.
|
static double |
DEFAULT_BOW_TIE_WIDTH
Default width of the bow tie part of the graphic, as a fraction of the length of the bow tie.
|
static Angle |
DEFAULT_CURVATURE
Default angle that determines the curvature of the line.
|
static int |
DEFAULT_NUM_INTERVALS
Default number of intervals used to draw the curve.
|
protected int |
intervals
Number of intervals used to draw the curve.
|
arrowAngle, arrowLength, DEFAULT_ARROWHEAD_ANGLE, DEFAULT_ARROWHEAD_LENGTH, DEFAULT_ARROWHEAD_OUTLINE_WIDTH, endPosition, outlineWidth, paths, startPosition
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 |
---|
DirectionOfAttackAviation(java.lang.String sidc)
Create a new arrow graphic.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Position> |
createBowTie(DrawContext dc,
Position pos1,
Position pos2)
Create positions required to to draw the bow tie part of the graphic.
|
protected void |
createLabels() |
protected void |
createShapes(DrawContext dc)
Create the list of positions that describe the arrow.
|
protected void |
determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels.
|
double |
getBowTieLength()
Indicates the length of the bow tie part of the graphic, as a fraction of the graphic's total length.
|
double |
getBowTieWidth()
Indicates the width of the bow tie part of the graphic, as a fraction of the length of the bow tie.
|
Angle |
getCurvature()
Indicates the angle that determines the curvature of the line.
|
int |
getIntervals()
Indicates the number of intervals used to draw the curve in this graphic.
|
static java.util.List<java.lang.String> |
getSupportedGraphics()
Indicates the graphics supported by this class.
|
protected Vec4 |
hermiteCurve(Vec4 pt1,
Vec4 pt2,
Vec4 tangent1,
Vec4 tangent2,
double t)
Compute a point along a Hermite curve defined by two control point and tangent vectors at those points.
|
protected void |
onShapeChanged() |
void |
setBowTieLength(double bowTieLength)
Specifies the length of the bow tie part of the graphic, as a fraction of the graphic's total length.
|
void |
setBowTieWidth(double bowTieWidth)
Specifies the width of the bow tie part of the graphic, as a fraction of the length of the bow tie.
|
void |
setCurvature(Angle angle)
Specifies the angle that determines the curvature of the line.
|
void |
setIntervals(int intervals)
Specifies the number of intervals used to draw the curve in this graphic.
|
applyDelegateOwner, computeArrowheadPositions, computeGeometry, createPath, doRenderGraphic, getArrowAngle, getArrowLength, getOutlineWidth, getPositions, getReferencePosition, isDrawOutlined, setArrowAngle, setArrowLength, setOutlineWidth, setPositions
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier, setStatus
addLabel, applyLabelAttributes, applyOverrideAttributes, computeLabelInteriorOpacity, determineActiveAttributes, determineDelegateOwner, determinePerFrameAttributes, doDrag, doRenderGraphicModifiers, 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 double bowTieLength
protected double bowTieWidth
protected Angle curvature
public static final double DEFAULT_BOW_TIE_LENGTH
public static final double DEFAULT_BOW_TIE_WIDTH
public static final Angle DEFAULT_CURVATURE
public static final int DEFAULT_NUM_INTERVALS
protected int intervals
public DirectionOfAttackAviation(java.lang.String sidc)
sidc
- Symbol code the identifies the graphic.protected java.util.List<Position> createBowTie(DrawContext dc, Position pos1, Position pos2)
dc
- Current draw context.pos1
- Position at the center of one side of the bow tie.pos2
- Position at the center of the other side of the bow tie.protected void createLabels()
createLabels
in class AbstractTacticalGraphic
protected void createShapes(DrawContext dc)
createShapes
in class DirectionOfAttack
dc
- Current draw context.protected void determineLabelPositions(DrawContext dc)
AbstractTacticalGraphic
determineLabelPositions
in class AbstractTacticalGraphic
dc
- Current draw context.public double getBowTieLength()
public double getBowTieWidth()
public Angle getCurvature()
public int getIntervals()
public static java.util.List<java.lang.String> getSupportedGraphics()
protected Vec4 hermiteCurve(Vec4 pt1, Vec4 pt2, Vec4 tangent1, Vec4 tangent2, double t)
pt1
- First control point.pt2
- Second control point.tangent1
- Vector tangent to the curve at the first control point.tangent2
- Vector tangent to the curve at the second control point.t
- Interpolation parameter in the range [0..1].protected void onShapeChanged()
public void setBowTieLength(double bowTieLength)
bowTieLength
- Length of the bow tie as a fraction of the total length of the graphic.public void setBowTieWidth(double bowTieWidth)
bowTieWidth
- Width of the bow tie as a fraction of the length of the bow tie.public void setCurvature(Angle angle)
angle
- The angle that determines the curvature of the line.public void setIntervals(int intervals)
intervals
- Number of intervals for drawing the curve.