Class WWOMeasureDisplay
- java.lang.Object
-
- gov.nasa.worldwindx.applications.worldwindow.util.measuretool.WWOMeasureDisplay
-
- All Implemented Interfaces:
WWOMeasureTool.MeasureDisplay
public class WWOMeasureDisplay extends java.lang.Object implements WWOMeasureTool.MeasureDisplay
-
-
Field Summary
Fields Modifier and Type Field Description protected ScreenAnnotation
annotation
protected AnnotationAttributes
annotationAttributes
protected AVListImpl
avList
protected WWOMeasureTool
measureTool
protected UnitsFormat
unitsFormat
-
Fields inherited from interface gov.nasa.worldwindx.applications.worldwindow.util.measuretool.WWOMeasureTool.MeasureDisplay
ACCUMULATED_LABEL, ANGLE_LABEL, AREA_LABEL, CENTER_LATITUDE_LABEL, CENTER_LONGITUDE_LABEL, HEADING_LABEL, HEIGHT_LABEL, LATITUDE_LABEL, LENGTH_LABEL, LONGITUDE_LABEL, MAJOR_AXIS_LABEL, MINOR_AXIS_LABEL, PERIMETER_LABEL, RADIUS_LABEL, WIDTH_LABEL
-
-
Constructor Summary
Constructors Constructor Description WWOMeasureDisplay(WWOMeasureTool measureTool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToLayer(RenderableLayer layer)
protected boolean
areLocationsRedundant(LatLon locA, LatLon locB, UnitsFormat units)
protected java.lang.Double
computeAccumulatedLength(LatLon pos, WWOMeasureTool mt)
protected Angle
computeAngleBetween(LatLon a, LatLon b, LatLon c)
protected Vec4
computeAnnotationPosition(Position pos, WWOMeasureTool mt)
protected double
computePathLength(WWOMeasureTool mt)
protected java.lang.String
formatCircleMeasurements(Position pos, WWOMeasureTool mt)
protected void
formatControlPoints(Position pos, WWOMeasureTool mt, java.lang.StringBuilder sb)
protected java.lang.String
formatEllipseMeasurements(Position pos, WWOMeasureTool mt)
protected java.lang.String
formatLineMeasurements(Position pos, WWOMeasureTool mt)
protected java.lang.String
formatPolygonMeasurements(Position pos, WWOMeasureTool mt)
protected java.lang.String
formatQuadMeasurements(Position pos, WWOMeasureTool mt)
protected java.lang.String
formatSquareMeasurements(Position pos, WWOMeasureTool mt)
protected java.lang.String
getDisplayString(Position pos, WWOMeasureTool mt)
java.lang.String
getLabel(java.lang.String labelName)
boolean
isAnnotation(java.lang.Object o)
protected boolean
lengthsEssentiallyEqual(double l1, double l2)
void
removeFromLayer(RenderableLayer layer)
protected void
setInitialLabels()
void
setLabel(java.lang.String labelName, java.lang.String label)
void
updateMeasureDisplay(Position position)
-
-
-
Field Detail
-
measureTool
protected WWOMeasureTool measureTool
-
annotation
protected ScreenAnnotation annotation
-
annotationAttributes
protected AnnotationAttributes annotationAttributes
-
avList
protected AVListImpl avList
-
unitsFormat
protected UnitsFormat unitsFormat
-
-
Constructor Detail
-
WWOMeasureDisplay
public WWOMeasureDisplay(WWOMeasureTool measureTool)
-
-
Method Detail
-
setInitialLabels
protected void setInitialLabels()
-
addToLayer
public void addToLayer(RenderableLayer layer)
- Specified by:
addToLayer
in interfaceWWOMeasureTool.MeasureDisplay
-
removeFromLayer
public void removeFromLayer(RenderableLayer layer)
- Specified by:
removeFromLayer
in interfaceWWOMeasureTool.MeasureDisplay
-
setLabel
public void setLabel(java.lang.String labelName, java.lang.String label)
- Specified by:
setLabel
in interfaceWWOMeasureTool.MeasureDisplay
-
getLabel
public java.lang.String getLabel(java.lang.String labelName)
- Specified by:
getLabel
in interfaceWWOMeasureTool.MeasureDisplay
-
isAnnotation
public boolean isAnnotation(java.lang.Object o)
- Specified by:
isAnnotation
in interfaceWWOMeasureTool.MeasureDisplay
-
updateMeasureDisplay
public void updateMeasureDisplay(Position position)
- Specified by:
updateMeasureDisplay
in interfaceWWOMeasureTool.MeasureDisplay
-
getDisplayString
protected java.lang.String getDisplayString(Position pos, WWOMeasureTool mt)
-
computeAnnotationPosition
protected Vec4 computeAnnotationPosition(Position pos, WWOMeasureTool mt)
-
formatCircleMeasurements
protected java.lang.String formatCircleMeasurements(Position pos, WWOMeasureTool mt)
-
formatEllipseMeasurements
protected java.lang.String formatEllipseMeasurements(Position pos, WWOMeasureTool mt)
-
formatSquareMeasurements
protected java.lang.String formatSquareMeasurements(Position pos, WWOMeasureTool mt)
-
formatQuadMeasurements
protected java.lang.String formatQuadMeasurements(Position pos, WWOMeasureTool mt)
-
formatPolygonMeasurements
protected java.lang.String formatPolygonMeasurements(Position pos, WWOMeasureTool mt)
-
formatLineMeasurements
protected java.lang.String formatLineMeasurements(Position pos, WWOMeasureTool mt)
-
formatControlPoints
protected void formatControlPoints(Position pos, WWOMeasureTool mt, java.lang.StringBuilder sb)
-
computeAccumulatedLength
protected java.lang.Double computeAccumulatedLength(LatLon pos, WWOMeasureTool mt)
-
computePathLength
protected double computePathLength(WWOMeasureTool mt)
-
lengthsEssentiallyEqual
protected boolean lengthsEssentiallyEqual(double l1, double l2)
-
areLocationsRedundant
protected boolean areLocationsRedundant(LatLon locA, LatLon locB, UnitsFormat units)
-
-