Class LayerTreeNode
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.util.tree.BasicTreeNode
-
- gov.nasa.worldwind.util.layertree.LayerTreeNode
-
- All Implemented Interfaces:
AVList,MessageListener,TreeNode,WWObject,java.beans.PropertyChangeListener,java.util.EventListener
- Direct Known Subclasses:
KMLLayerTreeNode
public class LayerTreeNode extends BasicTreeNode
ATreeNodethat represents a.LayerThe node's selection state is synchronized with its
Layer's enabled state.returns whether the node'sisSelected()Layeris enabled. Callingspecifies both the the node's selection state, and whether itssetSelected(boolean)Layershould be enabled for rendering and selection.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_IMAGEThe layer node's default icon path.protected LayerlayerIndicates theLayerthis node represents.-
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 LayerTreeNode(Layer layer)Creates a newLayerTreeNodefrom the specifiedlayer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitialize()Initializes this node's image source.booleanisSelected()Indicates whether this node'sLayeris enabled for rendering and selection.voidsetSelected(boolean selected)Specifies whether this node'sLayeris enabled for rendering and selection.-
Methods inherited from class gov.nasa.worldwind.util.tree.BasicTreeNode
addChild, addChild, computeTreeSelected, getChildren, getDescription, getImageSource, getParent, getPath, getText, 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
-
-
-
-
Field Detail
-
DEFAULT_IMAGE
protected static final java.lang.String DEFAULT_IMAGE
The layer node's default icon path.- See Also:
- Constant Field Values
-
layer
protected Layer layer
Indicates theLayerthis node represents. Initialized to a non-nullvalue during construction.
-
-
Constructor Detail
-
LayerTreeNode
public LayerTreeNode(Layer layer)
Creates a newLayerTreeNodefrom the specifiedlayer. The node's name is set to the layer's name.- Parameters:
layer- theLayerthis node represents.- Throws:
java.lang.IllegalArgumentException- if thelayerisnull.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes this node's image source.
-
isSelected
public boolean isSelected()
Indicates whether this node'sLayeris enabled for rendering and selection.- Specified by:
isSelectedin interfaceTreeNode- Overrides:
isSelectedin classBasicTreeNode- Returns:
trueif theLayeris enabled, otherwisefalse.- See Also:
TreeNode.setSelected(boolean),TreeNode.isTreeSelected()
-
setSelected
public void setSelected(boolean selected)
Specifies whether this node'sLayeris enabled for rendering and selection. This sets both the node's selection state and itsLayer's enabled state.- Specified by:
setSelectedin interfaceTreeNode- Overrides:
setSelectedin classBasicTreeNode- Parameters:
selected-trueto enable theLayer, otherwisefalse.- See Also:
TreeNode.isSelected()
-
-