NASA World Wind

gov.nasa.worldwind.render
Class GlobeAnnotationBalloon

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.render.AbstractBalloon
              extended by gov.nasa.worldwind.render.AbstractAnnotationBalloon
                  extended by gov.nasa.worldwind.render.GlobeAnnotationBalloon
All Implemented Interfaces:
AVList, MessageListener, Balloon, GlobeBalloon, Highlightable, Renderable, WWObject, PropertyChangeListener, EventListener

public class GlobeAnnotationBalloon
extends AbstractAnnotationBalloon
implements GlobeBalloon

An AnnotationBalloon that is attached to a position on the globe.


Field Summary
protected  int altitudeMode
           
protected  GlobeAnnotation annotation
          Annotation used to render the balloon.
protected  Position position
           
 
Fields inherited from class gov.nasa.worldwind.render.AbstractBalloon
activeAttributes, alwaysOnTop, attributes, defaultAttributes, delegateOwner, highlightAttributes, highlighted, maxActiveAltitude, minActiveAltitude, pickEnabled, text, textDecoder, visible
 
Constructor Summary
GlobeAnnotationBalloon(String text, Position position)
          Create the balloon.
 
Method Summary
protected  void computePosition(DrawContext dc)
          Compute the annotation position, and set it in the annotation.
protected  GlobeAnnotation createAnnotation()
          Create an annotation to render the balloon.
 int getAltitudeMode()
          Returns the balloon's altitude mode.
protected  GlobeAnnotation getAnnotation()
          Get the annotation used to render the balloon.
 Position getPosition()
          Get the position of the balloon.
 void setAltitudeMode(int altitudeMode)
          Specifies the balloon's altitude mode.
 void setPosition(Position position)
          Set the balloon to a position on the globe.
 
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotationBalloon
applyAttributesToAnnotation, computeOffsets, getBounds, render
 
Methods inherited from class gov.nasa.worldwind.render.AbstractBalloon
determineActiveAttributes, getActiveAttributes, getAttributes, getDecodedText, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isHighlighted, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setHighlighted, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoder, setVisible
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.render.Balloon
getAttributes, getBounds, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoder, setVisible
 
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
 
Methods inherited from interface gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
 
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
 

Field Detail

altitudeMode

protected int altitudeMode

annotation

protected GlobeAnnotation annotation
Annotation used to render the balloon.


position

protected Position position
Constructor Detail

GlobeAnnotationBalloon

public GlobeAnnotationBalloon(String text,
                              Position position)
Create the balloon.

Parameters:
text - Text to display in the balloon. May not be null.
position - The balloon's initial position. May not be null.
Method Detail

computePosition

protected void computePosition(DrawContext dc)
Compute the annotation position, and set it in the annotation.

Specified by:
computePosition in class AbstractAnnotationBalloon
Parameters:
dc - Draw context.

createAnnotation

protected GlobeAnnotation createAnnotation()
Create an annotation to render the balloon.

Specified by:
createAnnotation in class AbstractAnnotationBalloon
Returns:
The new annotation.

getAltitudeMode

public int getAltitudeMode()
Returns the balloon's altitude mode. See GlobeBalloon.setAltitudeMode(int) for a description of the modes.

Specified by:
getAltitudeMode in interface GlobeBalloon
Returns:
the balloon's altitude mode.

getAnnotation

protected GlobeAnnotation getAnnotation()
Get the annotation used to render the balloon.

Specified by:
getAnnotation in class AbstractAnnotationBalloon
Returns:
The annotation that renders this balloon.

getPosition

public Position getPosition()
Get the position of the balloon.

Specified by:
getPosition in interface GlobeBalloon
Returns:
The position of the balloon.

setAltitudeMode

public void setAltitudeMode(int altitudeMode)
Specifies the balloon's altitude mode. Recognized modes are:

Specified by:
setAltitudeMode in interface GlobeBalloon
Parameters:
altitudeMode - the altitude mode

setPosition

public void setPosition(Position position)
Set the balloon to a position on the globe.

Specified by:
setPosition in interface GlobeBalloon
Parameters:
position - New position for the balloon.

NASA World Wind