public class KMLStyleMap extends KMLAbstractStyleSelector
Modifier and Type | Field and Description |
---|---|
protected List<KMLPair> |
pairs |
MSG_BOX_CHANGED, MSG_GEOMETRY_CHANGED, MSG_LINK_CHANGED, MSG_STYLE_CHANGED, MSG_TIME_CHANGED, MSG_VIEW_CHANGED
CHARACTERS_CONTENT, fields, namespaceURI, parent
Constructor and Description |
---|
KMLStyleMap(String namespaceURI)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPair(KMLPair pair) |
void |
applyChange(KMLAbstractObject sourceValues) |
protected void |
doAddEventContent(Object o,
XMLEventParserContext ctx,
XMLEvent event,
Object... args) |
List<KMLPair> |
getPairs() |
KMLAbstractStyleSelector |
getStyleFromMap(String styleState)
Returns a specified style from the style map.
|
KMLStyleUrl |
getStyleUrlFromMap(String styleState)
Returns a specified style URL from the style map.
|
protected void |
mergePairs(KMLStyleMap sourceMap)
Merge a list of incoming pairs with the current list.
|
KMLAbstractSubStyle |
mergeSubStyles(KMLAbstractSubStyle subStyle,
String styleState)
Obtains the map's effective style for a specified style type (IconStyle, ListStyle, etc.) and state
(normal or highlight).
|
markUnresolved, mergeSubStyles, mergeSubStyles
getId, getRoot, getTargetId, onChange, onMessage
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
public KMLStyleMap(String namespaceURI)
namespaceURI
- the qualifying namespace URI. May be null to indicate no namespace qualification.protected void addPair(KMLPair pair)
public void applyChange(KMLAbstractObject sourceValues)
applyChange
in class KMLAbstractObject
protected void doAddEventContent(Object o, XMLEventParserContext ctx, XMLEvent event, Object... args) throws XMLStreamException
doAddEventContent
in class AbstractXMLEventParser
XMLStreamException
public KMLAbstractStyleSelector getStyleFromMap(String styleState)
styleState
- the style key, either KMLConstants.NORMAL
or KMLConstants.HIGHLIGHT
. If null,
KMLConstants.NORMAL
is used.public KMLStyleUrl getStyleUrlFromMap(String styleState)
styleState
- the style key, either KMLConstants.NORMAL
or KMLConstants.HIGHLIGHT
. If null,
KMLConstants.NORMAL
is used.protected void mergePairs(KMLStyleMap sourceMap)
sourceMap
- the incoming pairs.public KMLAbstractSubStyle mergeSubStyles(KMLAbstractSubStyle subStyle, String styleState)
AVKey.UNRESOLVED
.styleState
- the style mode, either \"normal\" or \"highlight\".subStyle
- an instance of the KMLAbstractSubStyle
class desired, such
as KMLIconStyle
. The effective style values are accumulated
and merged into this instance. The instance should not be one from within the KML document
because its values may be overridden and augmented. The instance specified is the return value
of this method.subStyle
argument.