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, java.beans.PropertyChangeListener, java.util.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  java.lang.String altDisplay
           
protected  int coordDecimalPlaces
           
protected  java.lang.String elevDisplay
           
protected  WorldWindow eventSource
           
protected  java.lang.String latDisplay
           
protected  java.lang.String lonDisplay
           
protected  Position previousPos
           
static java.lang.String UNIT_IMPERIAL
           
static java.lang.String UNIT_METRIC
           
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
StatusLayer()
           
 
Method Summary
 void doPick(DrawContext dc, java.awt.Point pickPoint)
           
 void doRender(DrawContext dc)
           
 void draw(DrawContext dc)
           
 java.awt.Color getBackColor()
           
 int getCoordSigDigits()
           
 java.awt.Font getDefaultFont()
           
protected  WorldWindow getEventSource()
           
protected  java.lang.String makeAngleDescription(java.lang.String label, Angle angle, int places)
           
protected  java.lang.String makeCursorElevationDescription(double metersElevation)
           
protected  java.lang.String makeEyeAltitudeDescription(double metersAltitude)
           
 void moved(PositionEvent event)
           
 void setBackColor(java.awt.Color backColor)
           
 void setCoordDecimalPlaces(int coordDecimalPlaces)
           
 void setDefaultFont(java.awt.Font font)
           
 void setElevationUnits(java.lang.String units)
           
 void setEventSource(WorldWindow newEventSource)
           
 void stageChanged(RenderingEvent event)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer
dispose, doPreRender, getDataFileStore, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, 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 java.lang.String altDisplay

coordDecimalPlaces

protected int coordDecimalPlaces

elevDisplay

protected java.lang.String elevDisplay

eventSource

protected WorldWindow eventSource

latDisplay

protected java.lang.String latDisplay

lonDisplay

protected java.lang.String lonDisplay

previousPos

protected Position previousPos

UNIT_IMPERIAL

public static final java.lang.String UNIT_IMPERIAL
See Also:
Constant Field Values

UNIT_METRIC

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

StatusLayer

public StatusLayer()
Method Detail

doPick

public void doPick(DrawContext dc,
                   java.awt.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 java.awt.Color getBackColor()

getCoordSigDigits

public int getCoordSigDigits()

getDefaultFont

public java.awt.Font getDefaultFont()

getEventSource

protected WorldWindow getEventSource()

makeAngleDescription

protected java.lang.String makeAngleDescription(java.lang.String label,
                                                Angle angle,
                                                int places)

makeCursorElevationDescription

protected java.lang.String makeCursorElevationDescription(double metersElevation)

makeEyeAltitudeDescription

protected java.lang.String makeEyeAltitudeDescription(double metersAltitude)

moved

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

setBackColor

public void setBackColor(java.awt.Color backColor)

setCoordDecimalPlaces

public void setCoordDecimalPlaces(int coordDecimalPlaces)

setDefaultFont

public void setDefaultFont(java.awt.Font font)

setElevationUnits

public void setElevationUnits(java.lang.String units)

setEventSource

public void setEventSource(WorldWindow newEventSource)

stageChanged

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

toString

public java.lang.String toString()
Overrides:
toString in class AbstractLayer

NASA World Wind