public abstract class AbstractWebView extends WWObjectImpl implements WebView, Disposable
WebView
implementations.Modifier and Type | Field and Description |
---|---|
protected boolean |
active
Indicates whether the WebView is active.
|
protected java.awt.Dimension |
frameSize
The size of the WebView frame in pixels.
|
protected WWTexture |
textureRep
The WebView's current texture representation.
|
Constructor and Description |
---|
AbstractWebView() |
Modifier and Type | Method and Description |
---|---|
protected abstract WWTexture |
createTextureRepresentation(DrawContext dc)
Create a texture representation of the WebView.
|
protected abstract void |
doSetFrameSize(java.awt.Dimension size) |
protected void |
finalize()
Overridden to ensure that the WebView's native resources are disposed when the WebView is reclaimed by the
garbage collector.
|
java.awt.Dimension |
getFrameSize()
Returns the size in pixels of this WebView's frame.
|
WWTexture |
getTextureRepresentation(DrawContext dc)
Returns a layed out and rendered representation of the WebView's content as a
WWTexture . |
boolean |
isActive()
Indicates whether or not this WebView is active.
|
void |
propertyChange(java.beans.PropertyChangeEvent event)
The property change listener for this instance.
|
void |
setActive(boolean active)
Called when this WebView is activated or deactivated.
|
void |
setFrameSize(java.awt.Dimension size)
Specifies the size in pixels of this WebView's frame.
|
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackgroundColor, getContentSize, getContentURL, getLinks, getMinContentSize, goBack, goForward, sendEvent, setBackgroundColor, setHTMLString, setHTMLString, setHTMLString, setMinContentSize
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
dispose
protected boolean active
protected java.awt.Dimension frameSize
protected WWTexture textureRep
getTextureRepresentation(gov.nasa.worldwind.render.DrawContext)
.protected abstract WWTexture createTextureRepresentation(DrawContext dc)
dc
- draw context.protected abstract void doSetFrameSize(java.awt.Dimension size)
protected void finalize() throws java.lang.Throwable
Disposable.dispose()
.finalize
in class java.lang.Object
java.lang.Throwable
public java.awt.Dimension getFrameSize()
null
if this WebView's frame size
is unspecified.getFrameSize
in interface WebView
null
if it's unspecified.WebView.setFrameSize(java.awt.Dimension)
public WWTexture getTextureRepresentation(DrawContext dc)
WWTexture
. The texture's image source is the WebView, and its dimensions are large
enough to capture the WebView's frame size (see WebView.setFrameSize(java.awt.Dimension)
.
On machines that support non-power-of-two sized textures, the texture's dimensions are always equal to the WebView's frame size. Otherwise, the texture's dimensions are the smallest power-of-two that captures the WebView's frame size.
getTextureRepresentation
in interface WebView
dc
- The draw context the WebView is associated with.WWTexture
.public boolean isActive()
public void propertyChange(java.beans.PropertyChangeEvent event)
WWObjectImpl
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class WWObjectImpl
event
- the eventpublic void setActive(boolean active)
setActive
in interface WebView
active
- true
if this WebView is being activated. false
if this WebView is being
deactivated.WebView.sendEvent(java.awt.event.InputEvent)
public void setFrameSize(java.awt.Dimension size)
setFrameSize
in interface WebView
size
- the size of this WebView's frame in pixels.