NASA World Wind

gov.nasa.worldwindx.applications.worldwindow.util.measuretool
Class WWOMeasureDisplay

java.lang.Object
  extended by gov.nasa.worldwindx.applications.worldwindow.util.measuretool.WWOMeasureDisplay
All Implemented Interfaces:
WWOMeasureTool.MeasureDisplay

public class WWOMeasureDisplay
extends Object
implements WWOMeasureTool.MeasureDisplay


Field Summary
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
WWOMeasureDisplay(WWOMeasureTool measureTool)
           
 
Method Summary
 void addToLayer(RenderableLayer layer)
           
protected  boolean areLocationsRedundant(LatLon locA, LatLon locB, UnitsFormat units)
           
protected  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  String formatCircleMeasurements(Position pos, WWOMeasureTool mt)
           
protected  void formatControlPoints(Position pos, WWOMeasureTool mt, StringBuilder sb)
           
protected  String formatEllipseMeasurements(Position pos, WWOMeasureTool mt)
           
protected  String formatLineMeasurements(Position pos, WWOMeasureTool mt)
           
protected  String formatPolygonMeasurements(Position pos, WWOMeasureTool mt)
           
protected  String formatQuadMeasurements(Position pos, WWOMeasureTool mt)
           
protected  String formatSquareMeasurements(Position pos, WWOMeasureTool mt)
           
protected  String getDisplayString(Position pos, WWOMeasureTool mt)
           
 String getLabel(String labelName)
           
 boolean isAnnotation(Object o)
           
protected  boolean lengthsEssentiallyEqual(double l1, double l2)
           
 void removeFromLayer(RenderableLayer layer)
           
protected  void setInitialLabels()
           
 void setLabel(String labelName, String label)
           
 void updateMeasureDisplay(Position position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotation

protected ScreenAnnotation annotation

annotationAttributes

protected AnnotationAttributes annotationAttributes

avList

protected AVListImpl avList

measureTool

protected WWOMeasureTool measureTool

unitsFormat

protected UnitsFormat unitsFormat
Constructor Detail

WWOMeasureDisplay

public WWOMeasureDisplay(WWOMeasureTool measureTool)
Method Detail

addToLayer

public void addToLayer(RenderableLayer layer)
Specified by:
addToLayer in interface WWOMeasureTool.MeasureDisplay

areLocationsRedundant

protected boolean areLocationsRedundant(LatLon locA,
                                        LatLon locB,
                                        UnitsFormat units)

computeAccumulatedLength

protected Double computeAccumulatedLength(LatLon pos,
                                          WWOMeasureTool mt)

computeAngleBetween

protected Angle computeAngleBetween(LatLon a,
                                    LatLon b,
                                    LatLon c)

computeAnnotationPosition

protected Vec4 computeAnnotationPosition(Position pos,
                                         WWOMeasureTool mt)

computePathLength

protected double computePathLength(WWOMeasureTool mt)

formatCircleMeasurements

protected String formatCircleMeasurements(Position pos,
                                          WWOMeasureTool mt)

formatControlPoints

protected void formatControlPoints(Position pos,
                                   WWOMeasureTool mt,
                                   StringBuilder sb)

formatEllipseMeasurements

protected String formatEllipseMeasurements(Position pos,
                                           WWOMeasureTool mt)

formatLineMeasurements

protected String formatLineMeasurements(Position pos,
                                        WWOMeasureTool mt)

formatPolygonMeasurements

protected String formatPolygonMeasurements(Position pos,
                                           WWOMeasureTool mt)

formatQuadMeasurements

protected String formatQuadMeasurements(Position pos,
                                        WWOMeasureTool mt)

formatSquareMeasurements

protected String formatSquareMeasurements(Position pos,
                                          WWOMeasureTool mt)

getDisplayString

protected String getDisplayString(Position pos,
                                  WWOMeasureTool mt)

getLabel

public String getLabel(String labelName)
Specified by:
getLabel in interface WWOMeasureTool.MeasureDisplay

isAnnotation

public boolean isAnnotation(Object o)
Specified by:
isAnnotation in interface WWOMeasureTool.MeasureDisplay

lengthsEssentiallyEqual

protected boolean lengthsEssentiallyEqual(double l1,
                                          double l2)

removeFromLayer

public void removeFromLayer(RenderableLayer layer)
Specified by:
removeFromLayer in interface WWOMeasureTool.MeasureDisplay

setInitialLabels

protected void setInitialLabels()

setLabel

public void setLabel(String labelName,
                     String label)
Specified by:
setLabel in interface WWOMeasureTool.MeasureDisplay

updateMeasureDisplay

public void updateMeasureDisplay(Position position)
Specified by:
updateMeasureDisplay in interface WWOMeasureTool.MeasureDisplay

NASA World Wind