public abstract class AbstractAnnotationBalloon extends AbstractBalloon
Annotation
.activeAttributes, alwaysOnTop, attributes, defaultAttributes, delegateOwner, highlightAttributes, highlighted, maxActiveAltitude, minActiveAltitude, pickEnabled, text, textDecoder, visible
Constructor and Description |
---|
AbstractAnnotationBalloon(java.lang.String text)
Create a new annotation balloon.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyAttributesToAnnotation()
Apply the balloon attributes to the annotation.
|
protected void |
computeOffsets(DrawContext dc)
Compute the position and offsets, and set in them in the annotation.
|
protected abstract void |
computePosition(DrawContext dc)
Compute the annotation position, and set it in the annotation.
|
protected abstract Annotation |
createAnnotation()
Create an annotation to render the balloon.
|
protected abstract Annotation |
getAnnotation()
Get the annotation used to render the balloon.
|
java.awt.Rectangle |
getBounds(DrawContext dc)
Get the balloon bounding
Rectangle using OGL coordinates - bottom-left corner x and y relative
to the WorldWindow bottom-left corner, and the balloon callout width and height. |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
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
onMessage, propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
public AbstractAnnotationBalloon(java.lang.String text)
text
- Balloon text. May not be null.protected void applyAttributesToAnnotation()
protected void computeOffsets(DrawContext dc)
dc
- DrawContext in which the balloon is being rendered.protected abstract void computePosition(DrawContext dc)
dc
- Draw context.protected abstract Annotation createAnnotation()
protected abstract Annotation getAnnotation()
public java.awt.Rectangle getBounds(DrawContext dc)
Rectangle
using OGL coordinates - bottom-left corner x and y relative
to the WorldWindow
bottom-left corner, and the balloon callout width and height.
The balloon offset from it's reference point is factored in such that the callout leader shape and reference
point are included in the bounding rectangle.dc
- the current DrawContext.Rectangle
using OGL viewport coordinates.public void render(DrawContext dc)
Renderable
to render itself using the provided draw context.dc
- the DrawContext
to be usedDrawContext