NASA World Wind

gov.nasa.worldwind.examples.util
Class StatusLayer

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.layers.AbstractLayer
              extended by gov.nasa.worldwind.examples.util.StatusLayer
All Implemented Interfaces:
AVList, Disposable, PositionListener, RenderingListener, Layer, Restorable, WWObject, PropertyChangeListener, EventListener
Direct Known Subclasses:
StatusLayer.StatusMGRSLayer, StatusLayer.StatusUTMLayer

public class StatusLayer
extends AbstractLayer
implements PositionListener, RenderingListener

Renders statusbar information as a layer. Used ScalebarLayer and StatusBar as template


Nested Class Summary
static class StatusLayer.StatusMGRSLayer
           
static class StatusLayer.StatusUTMLayer
           
 
Field Summary
protected  String altDisplay
           
protected  int coordDecimalPlaces
           
protected  String elevDisplay
           
protected  WorldWindow eventSource
           
protected  String latDisplay
           
protected  String lonDisplay
           
protected  Position previousPos
           
static String UNIT_IMPERIAL
           
static String UNIT_METRIC
           
 
Fields inherited from class gov.nasa.worldwind.layers.AbstractLayer
screenCredit
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
StatusLayer()
           
 
Method Summary
 void doPick(DrawContext dc, Point pickPoint)
           
 void doRender(DrawContext dc)
           
 void draw(DrawContext dc)
           
 Color getBackColor()
           
 int getCoordSigDigits()
           
 Font getDefaultFont()
           
protected  WorldWindow getEventSource()
           
protected  String makeAngleDescription(String label, Angle angle, int places)
           
protected  String makeCursorElevationDescription(double metersElevation)
           
protected  String makeEyeAltitudeDescription(double metersAltitude)
           
 void moved(PositionEvent event)
           
 void setBackColor(Color backColor)
           
 void setCoordDecimalPlaces(int coordDecimalPlaces)
           
 void setDefaultFont(Font font)
           
 void setElevationUnits(String units)
           
 void setEventSource(WorldWindow newEventSource)
           
 void stageChanged(RenderingEvent event)
           
 String toString()
           
 
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer
dispose, doPreRender, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Field Detail

altDisplay

protected String altDisplay

coordDecimalPlaces

protected int coordDecimalPlaces

elevDisplay

protected String elevDisplay

eventSource

protected WorldWindow eventSource

latDisplay

protected String latDisplay

lonDisplay

protected String lonDisplay

previousPos

protected Position previousPos

UNIT_IMPERIAL

public static final String UNIT_IMPERIAL
See Also:
Constant Field Values

UNIT_METRIC

public static final String UNIT_METRIC
See Also:
Constant Field Values
Constructor Detail

StatusLayer

public StatusLayer()
Method Detail

doPick

public void doPick(DrawContext dc,
                   Point pickPoint)
Overrides:
doPick in class AbstractLayer

doRender

public void doRender(DrawContext dc)
Specified by:
doRender in class AbstractLayer

draw

public void draw(DrawContext dc)

getBackColor

public Color getBackColor()

getCoordSigDigits

public int getCoordSigDigits()

getDefaultFont

public Font getDefaultFont()

getEventSource

protected WorldWindow getEventSource()

makeAngleDescription

protected String makeAngleDescription(String label,
                                      Angle angle,
                                      int places)

makeCursorElevationDescription

protected String makeCursorElevationDescription(double metersElevation)

makeEyeAltitudeDescription

protected String makeEyeAltitudeDescription(double metersAltitude)

moved

public void moved(PositionEvent event)
Specified by:
moved in interface PositionListener

setBackColor

public void setBackColor(Color backColor)

setCoordDecimalPlaces

public void setCoordDecimalPlaces(int coordDecimalPlaces)

setDefaultFont

public void setDefaultFont(Font font)

setElevationUnits

public void setElevationUnits(String units)

setEventSource

public void setEventSource(WorldWindow newEventSource)

stageChanged

public void stageChanged(RenderingEvent event)
Specified by:
stageChanged in interface RenderingListener

toString

public String toString()
Overrides:
toString in class AbstractLayer

NASA World Wind