Package gov.nasa.worldwind.render
Class ScreenAnnotationBalloon
- 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.ScreenAnnotationBalloon
-
- All Implemented Interfaces:
AVList
,MessageListener
,Balloon
,Highlightable
,Renderable
,ScreenBalloon
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class ScreenAnnotationBalloon extends AbstractAnnotationBalloon implements ScreenBalloon
An AnnotationBalloon that is attached to a point on the screen.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScreenAnnotation
annotation
Annotation used to render the balloon.protected java.awt.Point
screenPoint
-
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 ScreenAnnotationBalloon(java.lang.String text, java.awt.Point point)
Create the balloon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
computePosition(DrawContext dc)
Compute the annotation position, and set it in the annotation.protected ScreenAnnotation
createAnnotation()
Create an annotation to render the balloon.protected ScreenAnnotation
getAnnotation()
Get the annotation used to render the balloon.java.awt.Point
getScreenLocation()
Get the position of the balloon on the screen.void
setScreenLocation(java.awt.Point point)
Set the screen position of the balloon.-
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
-
screenPoint
protected java.awt.Point screenPoint
-
annotation
protected ScreenAnnotation annotation
Annotation used to render the balloon.
-
-
Constructor Detail
-
ScreenAnnotationBalloon
public ScreenAnnotationBalloon(java.lang.String text, java.awt.Point point)
Create the balloon.- Parameters:
text
- Text to display in the balloon. May not be null.point
- The balloon's screen point. This point is interpreted in a coordinate system with the origin at the upper left corner of the screen.
-
-
Method Detail
-
createAnnotation
protected ScreenAnnotation createAnnotation()
Create an annotation to render the balloon.- Specified by:
createAnnotation
in classAbstractAnnotationBalloon
- Returns:
- The new annotation.
-
getAnnotation
protected ScreenAnnotation getAnnotation()
Get the annotation used to render the balloon.- Specified by:
getAnnotation
in 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:
computePosition
in classAbstractAnnotationBalloon
- Parameters:
dc
- Draw context.
-
setScreenLocation
public void setScreenLocation(java.awt.Point point)
Set the screen position of the balloon. This point is interpreted in a coordinate system with the origin at the upper left corner of the screen.- Specified by:
setScreenLocation
in interfaceScreenBalloon
- Parameters:
point
- Point in screen coordinates, with origin at upper left corner.
-
getScreenLocation
public java.awt.Point getScreenLocation()
Get the position of the balloon on the screen.- Specified by:
getScreenLocation
in interfaceScreenBalloon
- Returns:
- The screen location of the balloon.
-
-