Class LayerTreeNode

  • All Implemented Interfaces:
    AVList, MessageListener, TreeNode, WWObject, java.beans.PropertyChangeListener, java.util.EventListener
    Direct Known Subclasses:
    KMLLayerTreeNode

    public class LayerTreeNode
    extends BasicTreeNode
    A TreeNode that represents a Layer.

    The node's selection state is synchronized with its Layer's enabled state. isSelected() returns whether the node's Layer is enabled. Calling setSelected(boolean) specifies both the the node's selection state, and whether its Layer should be enabled for rendering and selection.

    • 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 the Layer this node represents. Initialized to a non-null value during construction.
    • Constructor Detail

      • LayerTreeNode

        public LayerTreeNode​(Layer layer)
        Creates a new LayerTreeNode from the specified layer. The node's name is set to the layer's name.
        Parameters:
        layer - the Layer this node represents.
        Throws:
        java.lang.IllegalArgumentException - if the layer is null.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes this node's image source.
      • setSelected

        public void setSelected​(boolean selected)
        Specifies whether this node's Layer is enabled for rendering and selection. This sets both the node's selection state and its Layer's enabled state.
        Specified by:
        setSelected in interface TreeNode
        Overrides:
        setSelected in class BasicTreeNode
        Parameters:
        selected - true to enable the Layer, otherwise false.
        See Also:
        TreeNode.isSelected()