Package gov.nasa.worldwind.render
Interface Balloon
-
- All Superinterfaces:
AVList
,Highlightable
,Renderable
- All Known Subinterfaces:
GlobeBalloon
,ScreenBalloon
- All Known Implementing Classes:
AbstractAnnotationBalloon
,AbstractBalloon
,GlobeAnnotationBalloon
,KMLAbstractBalloon
,KMLGlobeBalloonImpl
,KMLScreenBalloonImpl
,ScreenAnnotationBalloon
public interface Balloon extends Renderable, Highlightable, AVList
A text label that can be attached to a point on the screen, or a point on the globe.- See Also:
BalloonAttributes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BalloonAttributes
getAttributes()
Get the "normal" balloon attributes.java.awt.Rectangle
getBounds(DrawContext dc)
Get the balloon boundingRectangle
using OGL coordinates - bottom-left corner x and y relative to theWorldWindow
bottom-left corner, and the balloon callout width and height.java.lang.Object
getDelegateOwner()
Returns the delegate owner of the balloon.BalloonAttributes
getHighlightAttributes()
Get the highlight attributes.double
getMaxActiveAltitude()
Returns the maximum eye altitude, in meters, for which the balloon is displayed.double
getMinActiveAltitude()
Returns the minimum eye altitude, in meters, for which the balloon is displayed.java.lang.String
getText()
Get the balloon text.TextDecoder
getTextDecoder()
Get the text decoder that will process the balloon text.boolean
isAlwaysOnTop()
Is the balloon always on top?boolean
isPickEnabled()
Is the balloon enabled for picking?boolean
isVisible()
Get whether the annotation is visible and should be rendered.void
setAlwaysOnTop(boolean alwaysOnTop)
Set the balloon to always on top or not.void
setAttributes(BalloonAttributes attrs)
Set the "normal" balloon attributes.void
setDelegateOwner(java.lang.Object owner)
Specifies the delegate owner of the balloon.void
setHighlightAttributes(BalloonAttributes attrs)
Set the highlight attributes.void
setMaxActiveAltitude(double maxActiveAltitude)
Specifies the maximum eye altitude, in meters, for which the balloon is displayed.void
setMinActiveAltitude(double minActiveAltitude)
Specifies the minimum eye altitude, in meters, for which the balloon is displayed.void
setPickEnabled(boolean enable)
Set the balloon to be pick enabled or not.void
setText(java.lang.String text)
Set the balloon text.void
setTextDecoder(TextDecoder decoder)
Set a text decoder to process the balloon text.void
setVisible(boolean visible)
Set whether the balloon is visible and should be rendered.-
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.Highlightable
isHighlighted, setHighlighted
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
-
-
-
Method Detail
-
isAlwaysOnTop
boolean isAlwaysOnTop()
Is the balloon always on top?- Returns:
- True if the balloon will always render above other items.
-
setAlwaysOnTop
void setAlwaysOnTop(boolean alwaysOnTop)
Set the balloon to always on top or not.- Parameters:
alwaysOnTop
- True if the balloon should always render above other objects.
-
isPickEnabled
boolean isPickEnabled()
Is the balloon enabled for picking?- Returns:
- True if the balloon can be picked, false if not.
-
setPickEnabled
void setPickEnabled(boolean enable)
Set the balloon to be pick enabled or not.- Parameters:
enable
- True if the balloon can be picked, false if not.
-
getText
java.lang.String getText()
Get the balloon text. The method returns the raw text, before decoding.- Returns:
- The balloon text.
- See Also:
getTextDecoder()
,setTextDecoder(gov.nasa.worldwind.util.TextDecoder)
-
setText
void setText(java.lang.String text)
Set the balloon text.- Parameters:
text
- New balloon text.
-
getAttributes
BalloonAttributes getAttributes()
Get the "normal" balloon attributes.- Returns:
- Balloon attributes.
-
setAttributes
void setAttributes(BalloonAttributes attrs)
Set the "normal" balloon attributes.- Parameters:
attrs
- New attributes
-
getHighlightAttributes
BalloonAttributes getHighlightAttributes()
Get the highlight attributes.- Returns:
- Balloon's highlight attributes.
-
setHighlightAttributes
void setHighlightAttributes(BalloonAttributes attrs)
Set the highlight attributes.- Parameters:
attrs
- Attributes to use when the balloon is highlighted.
-
getTextDecoder
TextDecoder getTextDecoder()
Get the text decoder that will process the balloon text.- Returns:
- Active text decoder.
-
setTextDecoder
void setTextDecoder(TextDecoder decoder)
Set a text decoder to process the balloon text.- Parameters:
decoder
- New decoder.
-
getDelegateOwner
java.lang.Object getDelegateOwner()
Returns the delegate owner of the balloon. If non-null, the returned object replaces the balloon as the pickable object returned during picking. If null, the balloon itself is the pickable object returned during picking.- Returns:
- the object used as the pickable object returned during picking, or null to indicate the the balloon is returned during picking.
-
setDelegateOwner
void setDelegateOwner(java.lang.Object owner)
Specifies the delegate owner of the balloon. If non-null, the delegate owner replaces the balloon as the pickable object returned during picking. If null, the balloon itself is the pickable object returned during picking.- Parameters:
owner
- the object to use as the pickable object returned during picking, or null to return the balloon.
-
isVisible
boolean isVisible()
Get whether the annotation is visible and should be rendered.- Returns:
- true if the annotation is visible and should be rendered.
-
setVisible
void setVisible(boolean visible)
Set whether the balloon is visible and should be rendered.- Parameters:
visible
- true if the balloon is visible and should be rendered.
-
getBounds
java.awt.Rectangle getBounds(DrawContext dc)
Get the balloon boundingRectangle
using OGL coordinates - bottom-left corner x and y relative to theWorldWindow
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.
- Parameters:
dc
- the current DrawContext.- Returns:
- the balloon bounding
Rectangle
using OGL viewport coordinates. - Throws:
java.lang.IllegalArgumentException
- ifdc
is null.
-
getMinActiveAltitude
double getMinActiveAltitude()
Returns the minimum eye altitude, in meters, for which the balloon is displayed.- Returns:
- the minimum altitude, in meters, for which the balloon is displayed.
- See Also:
setMinActiveAltitude(double)
,getMaxActiveAltitude()
-
setMinActiveAltitude
void setMinActiveAltitude(double minActiveAltitude)
Specifies the minimum eye altitude, in meters, for which the balloon is displayed.- Parameters:
minActiveAltitude
- the minimum altitude, in meters, for which the balloon is displayed.- See Also:
getMinActiveAltitude()
,setMaxActiveAltitude(double)
-
getMaxActiveAltitude
double getMaxActiveAltitude()
Returns the maximum eye altitude, in meters, for which the balloon is displayed.- Returns:
- the maximum altitude, in meters, for which the balloon is displayed.
- See Also:
setMaxActiveAltitude(double)
,getMinActiveAltitude()
-
setMaxActiveAltitude
void setMaxActiveAltitude(double maxActiveAltitude)
Specifies the maximum eye altitude, in meters, for which the balloon is displayed.- Parameters:
maxActiveAltitude
- the maximum altitude, in meters, for which the balloon is displayed.- See Also:
getMaxActiveAltitude()
,setMinActiveAltitude(double)
-
-