Package gov.nasa.worldwind.ogc.kml.impl
Class KMLSurfaceImageImpl
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.render.SurfaceImage
-
- gov.nasa.worldwind.ogc.kml.impl.KMLSurfaceImageImpl
-
- All Implemented Interfaces:
AVList
,Disposable
,Draggable
,MessageListener
,Exportable
,Movable
,KMLRenderable
,OrderedRenderable
,PreRenderable
,Renderable
,SurfaceTile
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class KMLSurfaceImageImpl extends SurfaceImage implements KMLRenderable
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
attributesResolved
protected long
iconRetrievalTime
Indicates the time at which the image source was specified.protected boolean
mustApplyRotation
Flag to indicate the rotation must be applied to the SurfaceImage.protected KMLGroundOverlay
parent
protected boolean
textureResolved
Indicates that the source texture has been resolved and loaded.-
Fields inherited from class gov.nasa.worldwind.render.SurfaceImage
alwaysOnTop, corners, dragEnabled, draggableSupport, generatedTexture, generatedTextureExpired, imageSource, pickLayer, pickSupport, previousGeneratedTexture, previousSourceTexture, sourceTexture, thisList
-
Fields inherited from interface gov.nasa.worldwind.Exportable
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
-
-
Constructor Summary
Constructors Constructor Description KMLSurfaceImageImpl(KMLTraversalContext tc, KMLGroundOverlay overlay)
Create an screen image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyRotation(DrawContext dc)
Apply a rotation to the corner points of the overlay.protected boolean
mustResolveHref()
Indicates whether or not the image source needs to be resolved.void
preRender(KMLTraversalContext tc, DrawContext dc)
Pre-render this element.void
render(KMLTraversalContext tc, DrawContext dc)
Render this element.protected java.lang.String
resolveHref()
Resolve the HREF in this overlay's Icon element against the KML root.-
Methods inherited from class gov.nasa.worldwind.render.SurfaceImage
applyInternalTransform, bind, dispose, doDrag, drag, draw, equals, export, exportAsKML, exportKMLLatLonBox, exportKMLLatLonQuad, getCorners, getDistanceFromEye, getExtent, getImageSource, getOpacity, getReferencePosition, getSector, hashCode, initializeGeneratedTexture, initializeGeometry, initializeSourceTexture, isAlwaysOnTop, isDragEnabled, isExportFormatSupported, isPickEnabled, move, moveTo, pick, preRender, render, setAlwaysOnTop, setCorners, setDragEnabled, setImageSource, setImageSource, setOpacity, setPickEnabled, setReferencePosition
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
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
-
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
-
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.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
parent
protected KMLGroundOverlay parent
-
attributesResolved
protected boolean attributesResolved
-
textureResolved
protected boolean textureResolved
Indicates that the source texture has been resolved and loaded.
-
iconRetrievalTime
protected long iconRetrievalTime
Indicates the time at which the image source was specified.
-
mustApplyRotation
protected boolean mustApplyRotation
Flag to indicate the rotation must be applied to the SurfaceImage. Rotation is applied the first time that the image is rendered.
-
-
Constructor Detail
-
KMLSurfaceImageImpl
public KMLSurfaceImageImpl(KMLTraversalContext tc, KMLGroundOverlay overlay)
Create an screen image.- Parameters:
tc
- the currentKMLTraversalContext
.overlay
- the Overlay element containing.- Throws:
java.lang.NullPointerException
- if the traversal context is null.java.lang.IllegalArgumentException
- if the parent overlay or the traversal context is null.
-
-
Method Detail
-
preRender
public void preRender(KMLTraversalContext tc, DrawContext dc)
Description copied from interface:KMLRenderable
Pre-render this element.- Specified by:
preRender
in interfaceKMLRenderable
- Parameters:
tc
- the current KML traversal context.dc
- the current draw context.
-
mustResolveHref
protected boolean mustResolveHref()
Indicates whether or not the image source needs to be resolved. The source needs to be resolved when the KMLIcon is updated.- Returns:
- True if the image source must be resolved.
-
resolveHref
protected java.lang.String resolveHref()
Resolve the HREF in this overlay's Icon element against the KML root.- Returns:
- The resolved path to the image source.
-
render
public void render(KMLTraversalContext tc, DrawContext dc)
Render this element.- Specified by:
render
in interfaceKMLRenderable
- Parameters:
tc
- the current KML traversal context.dc
- the current draw context.
-
applyRotation
protected void applyRotation(DrawContext dc)
Apply a rotation to the corner points of the overlay.- Parameters:
dc
- Current draw context.
-
-