public class GlobeBrowserBalloon extends AbstractBrowserBalloon implements GlobeBalloon
GlobeBalloon
that displays HTML, JavaScript, and Flash content using
the system's native browser, and who's origin is located at a position on the Globe
.AbstractBrowserBalloon
Modifier and Type | Class and Description |
---|---|
protected class |
GlobeBrowserBalloon.OrderedGlobeBrowserBalloon |
AbstractBrowserBalloon.BrowserControl, AbstractBrowserBalloon.FrameGeometryInfo, AbstractBrowserBalloon.OrderedBrowserBalloon
Modifier and Type | Field and Description |
---|---|
protected int |
altitudeMode
Indicates how this balloon's altitude is interpreted.
|
protected Position |
position
Indicates this balloon's geographic position.
|
browserControls, DEFAULT_NATIVE_SIZE, DEFAULT_OUTLINE_PICK_WIDTH, DEFAULT_WEB_VIEW_FACTORY, drawBrowserControls, drawResizeControl, drawTitleBar, FRAME_GEOMETRY_ELLIPSE_SLICES, FRAME_GEOMETRY_RECTANGLE_CORNER_SLICES, lastPickPoint, orderedRenderables, osh, outlinePickWidth, pickLayer, pickSupport, resourceResolver, screenBalloonPickFrame, screenBalloonRenderFrame, screenOffset, textUpdateTime, visibilityAction, webView, webViewContentSize, webViewCreationFailed, webViewTimeStamp
activeAttributes, alwaysOnTop, attributes, defaultAttributes, delegateOwner, highlightAttributes, highlighted, maxActiveAltitude, minActiveAltitude, pickEnabled, text, textDecoder, visible
Constructor and Description |
---|
GlobeBrowserBalloon(java.lang.String text,
Position position)
Constructs a new
GlobeBrowserBalloon with the specified text content and position. |
Modifier and Type | Method and Description |
---|---|
protected void |
computeBalloonPoints(DrawContext dc,
AbstractBrowserBalloon.OrderedBrowserBalloon obb)
Computes and stores this balloon's model and screen coordinates.
|
protected AbstractBrowserBalloon.OrderedBrowserBalloon |
createOrderedRenderable() |
protected PickedObject |
createPickedObject(DrawContext dc,
java.awt.Color pickColor) |
int |
getAltitudeMode()
Returns the balloon's altitude mode.
|
Position |
getPosition()
Get the position of the balloon.
|
protected boolean |
intersectsFrustum(DrawContext dc,
AbstractBrowserBalloon.OrderedBrowserBalloon obb)
Determines whether the balloon intersects the view frustum.
|
void |
setAltitudeMode(int altitudeMode)
Specifies the balloon's altitude mode.
|
void |
setPosition(Position position)
Set the balloon to a position on the globe.
|
protected void |
setupDepthTest(DrawContext dc,
AbstractBrowserBalloon.OrderedBrowserBalloon obb) |
addAllBrowserControls, addBrowserControl, addBrowserControl, addBrowserControl, beginDrawing, bindWebViewTexture, computeFramePickRect, computeFrameRectForWebViewRect, computeGeometry, computeOffset, computeOutlinePickWidth, computeSize, computeWebViewRectForFrameRect, convertToWebView, createDefaultBrowserControls, createFrameVertices, createLinkPickedObject, determineWebViewContentSize, dispose, disposeWebView, doDrawOrderedRenderable, drawBrowserControl, drawBrowserControls, drawFrame, drawFrameInterior, drawFrameOutline, drawLinks, drawOrderedRenderable, drawResizeControl, drawTitleBar, drawWebViewLinks, endDrawing, getBounds, getBrowserControls, getCursor, getOutlinePickWidth, getResourceResolver, getVisibilityAction, goBack, goForward, handleKeyEvent, handleMouseEvent, handleSelectEvent, isActive, isDrawBrowserControls, isDrawBrowserControls, isDrawInterior, isDrawLinks, isDrawOutline, isDrawResizeControl, isDrawResizeControl, isDrawTitleBar, isDrawTitleBar, keyPressed, keyReleased, keyTyped, makeDefaultFrameVertices, makeEllipseFrameVertices, makeOrderedRenderable, makeRectangleFrameVertices, makeWebView, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, mustRegenerateGeometry, pick, prepareToDrawInterior, prepareToDrawOutline, propertyChange, removeAllBrowserControls, removeBrowserControl, render, selected, setActive, setDrawBrowserControls, setDrawResizeControl, setDrawTitleBar, setOutlinePickWidth, setResourceResolver, setVisibilityAction, setVisible, setWebViewContent, updateRenderState, updateRenderStateIfNeeded, updateWebView
determineActiveAttributes, getActiveAttributes, getAttributes, getDecodedText, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isHighlighted, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setHighlighted, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoder
onMessage
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
getAttributes, getBounds, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoder, setVisible
render
isHighlighted, setHighlighted
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected int altitudeMode
WorldWind.ABSOLUTE
,
WorldWind.RELATIVE_TO_GROUND
, or WorldWind.CLAMP_TO_GROUND
. If the altitude mode is 0
or an unrecognized code, this balloon assumes an altitude mode of WorldWind.ABSOLUTE
. Initially 0.protected Position position
altitudeMode
. Initialized to a non-null
value at construction.public GlobeBrowserBalloon(java.lang.String text, Position position)
GlobeBrowserBalloon
with the specified text content and position.text
- the balloon's initial text content.position
- the balloon's initial position.java.lang.IllegalArgumentException
- if either text
or position
are null
.protected void computeBalloonPoints(DrawContext dc, AbstractBrowserBalloon.OrderedBrowserBalloon obb)
placePoint
- this balloon's model-coordinate point, according to its altitude mode.screenPlacePoint
- screen-space projection of the placePoint
.screenOffset
- the balloon frame's screen-coordinate offset from this balloon's
screenPlacePoint
.screenRect
- the balloon frame's screen-coordinate rectangle.screenExtent
- this balloon's screen-coordinate bounding rectangle.screenPickExtent
- this balloon's screen-coordinate bounding rectangle, including area covered
by the balloon's pickable outline.webViewRect
- the WebView's screen-coordinate content frame.eyeDistance
- always 0.computeBalloonPoints
in class AbstractBrowserBalloon
dc
- the current draw context.obb
- the ordered browser balloon.protected AbstractBrowserBalloon.OrderedBrowserBalloon createOrderedRenderable()
createOrderedRenderable
in class AbstractBrowserBalloon
protected PickedObject createPickedObject(DrawContext dc, java.awt.Color pickColor)
Overridden to use this balloon's position as the picked object's position.
createPickedObject
in class AbstractBrowserBalloon
public int getAltitudeMode()
GlobeBalloon.setAltitudeMode(int)
for a description of the modes.getAltitudeMode
in interface GlobeBalloon
public Position getPosition()
getPosition
in interface GlobeBalloon
protected boolean intersectsFrustum(DrawContext dc, AbstractBrowserBalloon.OrderedBrowserBalloon obb)
Overridden to return false
if the balloon's position is either behind the View's
near
clipping plane or in front of the View's
far clipping plane. Otherwise this delegates to the super
class' behavior.
intersectsFrustum
in class AbstractBrowserBalloon
dc
- the current draw context.obb
- the ordered browser balloon.true
If the balloon intersects the frustum, otherwise false
.public void setAltitudeMode(int altitudeMode)
WorldWind.ABSOLUTE
-- the balloon is placed at its specified position. setAltitudeMode
in interface GlobeBalloon
altitudeMode
- the altitude modepublic void setPosition(Position position)
setPosition
in interface GlobeBalloon
position
- New position for the balloon.protected void setupDepthTest(DrawContext dc, AbstractBrowserBalloon.OrderedBrowserBalloon obb)
setupDepthTest
in class AbstractBrowserBalloon