NASA World Wind

gov.nasa.worldwind.ogc.kml
Class KMLStyle

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.KMLAbstractStyleSelector
              extended by gov.nasa.worldwind.ogc.kml.KMLStyle
All Implemented Interfaces:
MessageListener, XMLEventParser

public class KMLStyle
extends KMLAbstractStyleSelector

Represents the KML Style element and provides access to its contents.


Field Summary
 
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
KMLStyle(String namespaceURI)
          Construct an instance.
 
Method Summary
 void applyChange(KMLAbstractObject sourceValues)
           
 KMLBalloonStyle getBaloonStyle()
           
 KMLIconStyle getIconStyle()
           
 KMLLabelStyle getLabelStyle()
           
 KMLLineStyle getLineStyle()
           
 KMLListStyle getListStyle()
           
 KMLPolyStyle getPolyStyle()
           
 KMLAbstractSubStyle mergeSubStyle(KMLAbstractSubStyle subStyle)
          Adds the sub-style fields of a specified sub-style to this one's fields if they don't already exist.
 void setField(String keyName, Object value)
           Overridden to handle deprecated labelColor field.
 
Methods inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractStyleSelector
markUnresolved, mergeSubStyles, mergeSubStyles
 
Methods inherited from class gov.nasa.worldwind.ogc.kml.KMLAbstractObject
getId, getRoot, getTargetId, onChange, onMessage
 
Methods inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
allocate, doAddCharacters, doAddEventAttribute, doAddEventContent, doParseEventAttributes, doParseEventContent, freeResources, getAConstructor, getCharacters, getField, getField, getFields, getNamespaceURI, getParent, hasField, hasField, hasFields, mergeFields, newInstance, overrideFields, parse, parseCharacterContent, removeField, setField, setFields, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMLStyle

public KMLStyle(String namespaceURI)
Construct an instance.

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

applyChange

public void applyChange(KMLAbstractObject sourceValues)
Overrides:
applyChange in class KMLAbstractObject

getBaloonStyle

public KMLBalloonStyle getBaloonStyle()

getIconStyle

public KMLIconStyle getIconStyle()

getLabelStyle

public KMLLabelStyle getLabelStyle()

getLineStyle

public KMLLineStyle getLineStyle()

getListStyle

public KMLListStyle getListStyle()

getPolyStyle

public KMLPolyStyle getPolyStyle()

mergeSubStyle

public KMLAbstractSubStyle mergeSubStyle(KMLAbstractSubStyle subStyle)
Adds the sub-style fields of a specified sub-style to this one's fields if they don't already exist.

Parameters:
subStyle - the sub-style to merge with this one.
Returns:
the substyle passed in as the parameter.
Throws:
IllegalArgumentException - if the sub-style parameter is null.

setField

public void setField(String keyName,
                     Object value)
Overridden to handle deprecated labelColor field. The labelColor field is deprecated, and has been replaced by LabelStyle. If labelColor is set this method will apply the color to the LabelStyle, creating a new LabelStyle if necessary.

Overrides:
setField in class AbstractXMLEventParser

NASA World Wind