NASA World Wind

gov.nasa.worldwindx.applications.worldwindow.features.swinglayermanager
Class LayerTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by gov.nasa.worldwindx.applications.worldwindow.features.swinglayermanager.LayerTreeModel
All Implemented Interfaces:
Serializable, TreeModel

public class LayerTreeModel
extends DefaultTreeModel

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
LayerTreeModel()
           
LayerTreeModel(LayerList layerList)
           
 
Method Summary
 LayerTreeNode find(LayerNode layerNodeRequested)
           
 LayerTreeNode findByTitle(String title)
           
 LayerTreeNode findByTitle(String title, LayerTreeNode groupNode)
           
 LayerTreeNode findByTitle(String layerTitle, String groupTitle)
           
 LayerTreeNode findChild(String childName, LayerTreeNode parent)
           
 LayerTreeNode findLayer(Layer layer, LayerTreeGroupNode groupNode)
           
 List<LayerTreeNode> findLayerInstances(Layer layer, LayerTreeGroupNode groupNode)
           
 LayerTreeGroupNode getDefaultGroupNode()
           
 LayerTreeNode getLastNode(LayerPath path)
           
 LayerTreeGroupNode getRootNode()
           
 boolean isIncludeInternalLayers()
           
static boolean isInternalLayer(Layer layer)
           
protected  LayerTreeGroupNode makeGroup(LayerList layerList)
           
 void refresh(LayerList layerList)
          Synchronize the layer tree with the state of the specified layer list.
 void removeNode(Object o)
           
 void selectLayer(Layer layer, boolean tf)
           
 void setIncludeInternalLayers(boolean includeInternalLayers)
           
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerTreeModel

public LayerTreeModel()

LayerTreeModel

public LayerTreeModel(LayerList layerList)
Method Detail

find

public LayerTreeNode find(LayerNode layerNodeRequested)

findByTitle

public LayerTreeNode findByTitle(String title)

findByTitle

public LayerTreeNode findByTitle(String title,
                                 LayerTreeNode groupNode)

findByTitle

public LayerTreeNode findByTitle(String layerTitle,
                                 String groupTitle)

findChild

public LayerTreeNode findChild(String childName,
                               LayerTreeNode parent)

findLayer

public LayerTreeNode findLayer(Layer layer,
                               LayerTreeGroupNode groupNode)

findLayerInstances

public List<LayerTreeNode> findLayerInstances(Layer layer,
                                              LayerTreeGroupNode groupNode)

getDefaultGroupNode

public LayerTreeGroupNode getDefaultGroupNode()

getLastNode

public LayerTreeNode getLastNode(LayerPath path)

getRootNode

public LayerTreeGroupNode getRootNode()

isIncludeInternalLayers

public boolean isIncludeInternalLayers()

isInternalLayer

public static boolean isInternalLayer(Layer layer)

makeGroup

protected LayerTreeGroupNode makeGroup(LayerList layerList)

refresh

public void refresh(LayerList layerList)
Synchronize the layer tree with the state of the specified layer list. This method adds layers from the list that aren't already in the tree, and removes layers from the tree if they are labeled internal. It does not remove other layers in the model but missing from the specified layer list. Use removeNode(Object) for that.

Parameters:
layerList - the layerlist to synchronize with, typically the active layer list of the World Window.

removeNode

public void removeNode(Object o)

selectLayer

public void selectLayer(Layer layer,
                        boolean tf)

setIncludeInternalLayers

public void setIncludeInternalLayers(boolean includeInternalLayers)

NASA World Wind