Class KMLNetworkLinkTreeNode
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.util.tree.BasicTreeNode
-
- gov.nasa.worldwind.util.layertree.KMLFeatureTreeNode
-
- gov.nasa.worldwind.util.layertree.KMLContainerTreeNode
-
- gov.nasa.worldwind.util.layertree.KMLNetworkLinkTreeNode
-
- All Implemented Interfaces:
AVList
,MessageListener
,TreeNode
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class KMLNetworkLinkTreeNode extends KMLContainerTreeNode
AKMLFeatureTreeNode
that represents a KML network link defined by a
.KMLNetworkLink
KMLNetworkLinkTreeNode
automatically repopulates its hierarchy when itsKMLNetworkLink
is refreshed, and notifies its listeners when this happens.
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.util.layertree.KMLFeatureTreeNode
feature
-
Fields inherited from class gov.nasa.worldwind.util.tree.BasicTreeNode
children, description, enabled, imageSource, parent, selected, text, texture, treeSelected, visible
-
Fields inherited from interface gov.nasa.worldwind.util.tree.TreeNode
NOT_SELECTED, PARTIALLY_SELECTED, SELECTED
-
-
Constructor Summary
Constructors Constructor Description KMLNetworkLinkTreeNode(KMLNetworkLink networkLink)
Creates a newKMLNetworkLinkTreeNode
from the specifiednetworkLink
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KMLNetworkLink
getFeature()
Indicates the KML network link this node represents.protected void
initialize()
Places the KML feature in the node'sAVKey.CONTEXT
field.protected void
refresh()
Called when this node'sKMLNetworkLink
refreshes.-
Methods inherited from class gov.nasa.worldwind.util.layertree.KMLContainerTreeNode
addFeatureNode
-
Methods inherited from class gov.nasa.worldwind.util.layertree.KMLFeatureTreeNode
expandOpenContainers, fromKMLFeature, getDescription, getText, isSelected, makeFeatureDescription, mustExpandNode, setSelected, stripHtmlTags
-
Methods inherited from class gov.nasa.worldwind.util.tree.BasicTreeNode
addChild, addChild, computeTreeSelected, getChildren, getImageSource, getParent, getPath, getTexture, hasImage, initializeTexture, isEnabled, isLeaf, isTreeSelected, isVisible, propertyChange, removeAllChildren, removeChild, setDescription, setEnabled, setImageSource, setParent, setVisible
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage
-
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, equals, getClass, hashCode, 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
-
-
-
-
Constructor Detail
-
KMLNetworkLinkTreeNode
public KMLNetworkLinkTreeNode(KMLNetworkLink networkLink)
Creates a newKMLNetworkLinkTreeNode
from the specifiednetworkLink
. The node's name is set to the network link's name, and the node's hierarchy is populated from the network link's KML features.- Parameters:
networkLink
- the KML network link this node represents.- Throws:
java.lang.IllegalArgumentException
- if thenetworkLink
isnull
.
-
-
Method Detail
-
getFeature
public KMLNetworkLink getFeature()
Indicates the KML network link this node represents.- Overrides:
getFeature
in classKMLContainerTreeNode
- Returns:
- this node's KML network link.
-
initialize
protected void initialize()
Places the KML feature in the node'sAVKey.CONTEXT
field.Additionally, this node's hierarchy is populated from the KML features in its
KMLNetworkLink
, and this registers aRETRIEVAL_STATE_SUCCESSFUL
property change listener on theKMLNetworkLink
.- Overrides:
initialize
in classKMLContainerTreeNode
-
refresh
protected void refresh()
Called when this node'sKMLNetworkLink
refreshes. Clears this node's hierarchy by removing its children, then adds a newKMLFeatureTreeNode
to this node for each KML feature in theKMLNetworkLink
.If the
KMLNetworkLink
's top level feature is aKMLDocument
, this method ignores the document and adds its children directly to this node. Creating a node for the document adds an extra level to the tree node that doesn't provide any meaningful grouping.- Overrides:
refresh
in classKMLContainerTreeNode
-
-