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.AbstractBrowserBalloonAbstractBrowserBalloon.BrowserControl, AbstractBrowserBalloon.FrameGeometryInfo| Modifier and Type | Field and Description |
|---|---|
protected int |
altitudeMode
Indicates how this balloon's altitude is interpreted.
|
protected Vec4 |
placePoint
The model-coordinate point corresponding to this balloon's position.
|
protected Position |
position
Indicates this balloon's geographic position.
|
protected Vec4 |
screenPlacePoint
The projection of this balloon's
placePoint in the viewport (on the screen). |
browserControls, DEFAULT_NATIVE_SIZE, DEFAULT_OUTLINE_PICK_WIDTH, DEFAULT_WEB_VIEW_FACTORY, drawBrowserControls, drawResizeControl, drawTitleBar, eyeDistance, FRAME_GEOMETRY_ELLIPSE_SLICES, FRAME_GEOMETRY_RECTANGLE_CORNER_SLICES, frameInfo, frameTimeStamp, geomTimeStamp, lastPickPoint, osh, outlinePickWidth, pickLayer, pickSupport, resourceResolver, screenExtent, screenOffset, screenPickExtent, screenRect, textUpdateTime, visibilityAction, webView, webViewContentSize, webViewCreationFailed, webViewRect, webViewTimeStampactiveAttributes, alwaysOnTop, attributes, defaultAttributes, delegateOwner, highlightAttributes, highlighted, maxActiveAltitude, minActiveAltitude, pickEnabled, text, textDecoder, visible| Constructor and Description |
|---|
GlobeBrowserBalloon(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)
Computes and stores this balloon's model and screen coordinates.
|
protected PickedObject |
createPickedObject(DrawContext dc,
Color pickColor)
Overridden to use this balloon's position as the picked object's position.
|
int |
getAltitudeMode()
Returns the balloon's altitude mode.
|
Position |
getPosition()
Get the position of the balloon.
|
protected boolean |
intersectsFrustum(DrawContext dc)
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) |
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, getDistanceFromEye, 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, updateWebViewdetermineActiveAttributes, getActiveAttributes, getAttributes, getDecodedText, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isHighlighted, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setHighlighted, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoderonMessageaddPropertyChangeListener, 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, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttributes, getBounds, getDelegateOwner, getHighlightAttributes, getMaxActiveAltitude, getMinActiveAltitude, getText, getTextDecoder, isAlwaysOnTop, isPickEnabled, isVisible, setAlwaysOnTop, setAttributes, setDelegateOwner, setHighlightAttributes, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setText, setTextDecoder, setVisiblerenderisHighlighted, setHighlightedaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected 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 Vec4 placePoint
null.protected Position position
altitudeMode. Initialized to a non-null value at construction.protected Vec4 screenPlacePoint
placePoint in the viewport (on the screen). May be
null.public GlobeBrowserBalloon(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.IllegalArgumentException - if either text or position are null.protected void computeBalloonPoints(DrawContext dc)
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 AbstractBrowserBalloondc - the current draw context.protected PickedObject createPickedObject(DrawContext dc, Color pickColor)
createPickedObject in class AbstractBrowserBalloonpublic int getAltitudeMode()
GlobeBalloon.setAltitudeMode(int) for a description of the modes.getAltitudeMode in interface GlobeBalloonpublic Position getPosition()
getPosition in interface GlobeBalloonprotected boolean intersectsFrustum(DrawContext dc)
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 AbstractBrowserBalloondc - the current draw context.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 GlobeBalloonaltitudeMode - the altitude modepublic void setPosition(Position position)
setPosition in interface GlobeBalloonposition - New position for the balloon.protected void setupDepthTest(DrawContext dc)
setupDepthTest in class AbstractBrowserBalloon