Package gov.nasa.worldwind.ogc.kml
Class KMLScreenOverlay
- java.lang.Object
-
- gov.nasa.worldwind.util.xml.AbstractXMLEventParser
-
- gov.nasa.worldwind.ogc.kml.KMLAbstractObject
-
- gov.nasa.worldwind.ogc.kml.KMLAbstractFeature
-
- gov.nasa.worldwind.ogc.kml.KMLAbstractOverlay
-
- gov.nasa.worldwind.ogc.kml.KMLScreenOverlay
-
- All Implemented Interfaces:
MessageListener,KMLRenderable,XMLEventParser
public class KMLScreenOverlay extends KMLAbstractOverlay
Represents the KML ScreenOverlay element and provides access to its contents.
-
-
Field Summary
Fields Modifier and Type Field Description protected KMLRenderablerenderable-
Fields inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractFeature
balloon, region, styleSelectors, visibility
-
Fields inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractObject
MSG_BOX_CHANGED, MSG_GEOMETRY_CHANGED, MSG_LINK_CHANGED, MSG_STYLE_CHANGED, MSG_TIME_CHANGED, MSG_VIEW_CHANGED
-
Fields inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
CHARACTERS_CONTENT, fields, namespaceURI, parent
-
-
Constructor Summary
Constructors Constructor Description KMLScreenOverlay(java.lang.String namespaceURI)Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyChange(KMLAbstractObject sourceValues)protected voiddoPreRender(KMLTraversalContext tc, DrawContext dc)Pre-renders the screen overlay geometry represented by thisKMLScreenOverlay.protected voiddoRender(KMLTraversalContext tc, DrawContext dc)Renders the screen overlay geometry represented by thisKMLScreenOverlay.KMLVec2getOverlayXY()KMLRenderablegetRenderable()Get the renderable that represents the screen overlay.java.lang.DoublegetRotation()KMLVec2getRotationXY()KMLVec2getScreenXY()KMLVec2getSize()protected voidinitializeRenderable(KMLTraversalContext tc)Create the renderable that will represent the overlay.voidonChange(Message msg)-
Methods inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractOverlay
getColor, getDrawOrder, getIcon
-
Methods inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractFeature
addStyleSelector, doAddEventContent, getAddress, getAddressDetails, getAuthor, getBalloon, getDescription, getExtendedData, getLink, getName, getOpen, getPhoneNumber, getRegion, getSnippet, getSnippetText, getStyleSelectors, getStyleUrl, getSubStyle, getTimePrimitive, getView, getVisibility, hasStyle, hasStyleSelectors, isFeatureActive, mergeStyleSelectors, preRender, render, renderBalloon, setBalloon, setRegion, setTimePrimitive, setView, setVisibility
-
Methods inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractObject
getId, getRoot, getTargetId, onMessage
-
Methods inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
allocate, doAddCharacters, doAddEventAttribute, doParseEventAttributes, doParseEventContent, freeResources, getAConstructor, getCharacters, getField, getField, getFields, getNamespaceURI, getParent, hasField, hasField, hasFields, mergeFields, newInstance, overrideFields, parse, parseCharacterContent, removeField, setField, setField, setFields, setNamespaceURI, setParent
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
renderable
protected KMLRenderable renderable
-
-
Method Detail
-
getOverlayXY
public KMLVec2 getOverlayXY()
-
getScreenXY
public KMLVec2 getScreenXY()
-
getRotationXY
public KMLVec2 getRotationXY()
-
getSize
public KMLVec2 getSize()
-
getRotation
public java.lang.Double getRotation()
-
doPreRender
protected void doPreRender(KMLTraversalContext tc, DrawContext dc)
Pre-renders the screen overlay geometry represented by thisKMLScreenOverlay. This initializes the screen overlay geometry if necessary, prior to pre-rendering.- Overrides:
doPreRenderin classKMLAbstractFeature- Parameters:
tc- the current KML traversal context.dc- the current draw context.
-
doRender
protected void doRender(KMLTraversalContext tc, DrawContext dc)
Renders the screen overlay geometry represented by thisKMLScreenOverlay.- Overrides:
doRenderin classKMLAbstractFeature- Parameters:
tc- the current KML traversal context.dc- the current draw context.
-
initializeRenderable
protected void initializeRenderable(KMLTraversalContext tc)
Create the renderable that will represent the overlay.- Parameters:
tc- the current KML traversal context.
-
getRenderable
public KMLRenderable getRenderable()
Get the renderable that represents the screen overlay. The renderable is created the first time that the overlay is rendered. Until then, the method will return null.- Returns:
- The renderable, or null if the renderable has not been created yet.
-
applyChange
public void applyChange(KMLAbstractObject sourceValues)
- Overrides:
applyChangein classKMLAbstractFeature
-
onChange
public void onChange(Message msg)
- Overrides:
onChangein classKMLAbstractObject
-
-