Illustrates how to use a WorldWind
Balloon
to display on-screen information to the user in the
form of a screen-aligned text balloon. There are two abstract balloon types:
ScreenBalloon
which
displays a balloon at a point on the screen, and
GlobeBalloon
which displays a balloon attached
to a position on the Globe. For each abstract balloon type, there are two concrete types: AnnotationBalloon which
provides support for simple text content with an optional image, and BrowserBalloon which provides support for
complex HTML, JavaScript, and Flash content.
Balloon Content
A Balloon's content is specified by calling Balloon.setText(String)
, and its visual attributes are specified by calling Balloon.setAttributes(gov.nasa.worldwind.render.BalloonAttributes)
with an instance of BalloonAttributes
.
ScreenBalloon
ScreenBalloons display a screen-aligned balloon at a point on the screen. There are two concrete ScreenBalloon types:
ScreenAnnotationBalloon
- a screen-attached balloon with support for multi-line text, a
background image, simple HTML text markup, and simple text styling attributes.
ScreenBrowserBalloon
- a screen-attached balloon with support for HTML, JavaScript, and
Flash content.
GlobeBalloon
GlobeBalloons display a screen-aligned balloon attached to a position on the Globe.
GlobeAnnotationBalloon
- a Globe-attached balloon with support for multi-line text, a
background image, simple HTML text markup, and simple text styling attributes.
GlobeBrowserBalloon
- a Globe-attached balloon with support for HTML, JavaScript, and Flash
content.