Package gov.nasa.worldwind.render
Class GlobeAnnotationBalloon
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.render.AbstractBalloon
-
- gov.nasa.worldwind.render.AbstractAnnotationBalloon
-
- gov.nasa.worldwind.render.GlobeAnnotationBalloon
-
- All Implemented Interfaces:
AVList,MessageListener,Balloon,GlobeBalloon,Highlightable,Renderable,WWObject,java.beans.PropertyChangeListener,java.util.EventListener
public class GlobeAnnotationBalloon extends AbstractAnnotationBalloon implements GlobeBalloon
An AnnotationBalloon that is attached to a position on the globe.
-
-
Field Summary
Fields Modifier and Type Field Description protected intaltitudeModeprotected GlobeAnnotationannotationAnnotation used to render the balloon.protected Positionposition-
Fields inherited from class gov.nasa.worldwind.render.AbstractBalloon
activeAttributes, alwaysOnTop, attributes, defaultAttributes, delegateOwner, highlightAttributes, highlighted, maxActiveAltitude, minActiveAltitude, pickEnabled, text, textDecoder, visible
-
-
Constructor Summary
Constructors Constructor Description GlobeAnnotationBalloon(java.lang.String text, Position position)Create the balloon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputePosition(DrawContext dc)Compute the annotation position, and set it in the annotation.protected GlobeAnnotationcreateAnnotation()Create an annotation to render the balloon.intgetAltitudeMode()Returns the balloon's altitude mode.protected GlobeAnnotationgetAnnotation()Get the annotation used to render the balloon.PositiongetPosition()Get the position of the balloon.voidsetAltitudeMode(int altitudeMode)Specifies the balloon's altitude mode.voidsetPosition(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, getClass, hashCode, notify, notifyAll, toString, 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 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.Highlightable
isHighlighted, setHighlighted
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
-
-
-
Field Detail
-
position
protected Position position
-
altitudeMode
protected int altitudeMode
-
annotation
protected GlobeAnnotation annotation
Annotation used to render the balloon.
-
-
Constructor Detail
-
GlobeAnnotationBalloon
public GlobeAnnotationBalloon(java.lang.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
-
createAnnotation
protected GlobeAnnotation createAnnotation()
Create an annotation to render the balloon.- Specified by:
createAnnotationin classAbstractAnnotationBalloon- Returns:
- The new annotation.
-
getAnnotation
protected GlobeAnnotation getAnnotation()
Get the annotation used to render the balloon.- Specified by:
getAnnotationin classAbstractAnnotationBalloon- Returns:
- The annotation that renders this balloon.
-
computePosition
protected void computePosition(DrawContext dc)
Compute the annotation position, and set it in the annotation.- Specified by:
computePositionin classAbstractAnnotationBalloon- Parameters:
dc- Draw context.
-
setPosition
public void setPosition(Position position)
Set the balloon to a position on the globe.- Specified by:
setPositionin interfaceGlobeBalloon- Parameters:
position- New position for the balloon.
-
getPosition
public Position getPosition()
Get the position of the balloon.- Specified by:
getPositionin interfaceGlobeBalloon- Returns:
- The position of the balloon.
-
getAltitudeMode
public int getAltitudeMode()
Returns the balloon's altitude mode. SeeGlobeBalloon.setAltitudeMode(int)for a description of the modes.- Specified by:
getAltitudeModein interfaceGlobeBalloon- Returns:
- the balloon's altitude mode.
-
setAltitudeMode
public void setAltitudeMode(int altitudeMode)
Specifies the balloon's altitude mode. Recognized modes are:- @link WorldWind#CLAMP_TO_GROUND} -- the balloon is placed on the terrain at the latitude and longitude of its position.
- @link WorldWind#RELATIVE_TO_GROUND} -- the balloon is placed above the terrain at the latitude and longitude of its position and the distance specified by its elevation.
WorldWind.ABSOLUTE-- the balloon is placed at its specified position.
- Specified by:
setAltitudeModein interfaceGlobeBalloon- Parameters:
altitudeMode- the altitude mode
-
-