NASA World Wind

gov.nasa.worldwind.ogc.kml
Class KMLScreenOverlay

java.lang.Object
  extended by gov.nasa.worldwind.util.xml.AbstractXMLEventParser
      extended by gov.nasa.worldwind.ogc.kml.KMLAbstractObject
          extended by gov.nasa.worldwind.ogc.kml.KMLAbstractFeature
              extended by gov.nasa.worldwind.ogc.kml.KMLAbstractOverlay
                  extended by 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
protected  KMLRenderable renderable
           
 
Fields inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractFeature
balloon, region, styleSelectors, visibility
 
Fields inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
CHARACTERS_CONTENT, fields, namespaceURI, parent
 
Constructor Summary
KMLScreenOverlay(String namespaceURI)
          Construct an instance.
 
Method Summary
protected  void doPreRender(KMLTraversalContext tc, DrawContext dc)
          Pre-renders the screen overlay geometry represented by this KMLScreenOverlay.
protected  void doRender(KMLTraversalContext tc, DrawContext dc)
          Renders the screen overlay geometry represented by this KMLScreenOverlay.
 KMLVec2 getOverlayXY()
           
 KMLRenderable getRenderable()
          Get the renderable that represents the screen overlay.
 Double getRotation()
           
 KMLVec2 getRotationXY()
           
 KMLVec2 getScreenXY()
           
 KMLVec2 getSize()
           
protected  void initializeRenderable(KMLTraversalContext tc)
          Create the renderable that will represent the overlay.
 
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, isFeatureActive, 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, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderable

protected KMLRenderable renderable
Constructor Detail

KMLScreenOverlay

public KMLScreenOverlay(String namespaceURI)
Construct an instance.

Parameters:
namespaceURI - the qualifying namespace URI. May be null to indicate no namespace qualification.
Method Detail

doPreRender

protected void doPreRender(KMLTraversalContext tc,
                           DrawContext dc)
Pre-renders the screen overlay geometry represented by this KMLScreenOverlay. This initializes the screen overlay geometry if necessary, prior to pre-rendering.

Overrides:
doPreRender in class KMLAbstractFeature
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 this KMLScreenOverlay.

Overrides:
doRender in class KMLAbstractFeature
Parameters:
tc - the current KML traversal context.
dc - the current draw context.

getOverlayXY

public KMLVec2 getOverlayXY()

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.

getRotation

public Double getRotation()

getRotationXY

public KMLVec2 getRotationXY()

getScreenXY

public KMLVec2 getScreenXY()

getSize

public KMLVec2 getSize()

initializeRenderable

protected void initializeRenderable(KMLTraversalContext tc)
Create the renderable that will represent the overlay.

Parameters:
tc - the current KML traversal context.

NASA World Wind