artisynth.core.gui.navpanel
Class NavPanelNode

java.lang.Object
  extended by artisynth.core.gui.navpanel.NavPanelNode

public class NavPanelNode
extends java.lang.Object


Constructor Summary
NavPanelNode(ModelComponent c, NavPanelNode parent, NavPanelTreeModel model)
           
 
Method Summary
 java.lang.Object[] clearChildList()
           
 void deallocateChildList()
          Remove the children when a node is collapsed, but keep the myNumChildren cached because JTree may still want to know the number of "real" children after the node has been collapsed.
 java.lang.Object getChild(int idx)
           
 java.lang.Object getChild(ModelComponent comp)
           
 int getIndex(java.lang.Object child)
          Returns the index of the specified child in this nodes child array.
 int getIndexOfChild(java.lang.Object child)
           
 java.lang.String getName(ModelComponent comp)
           
static ModelComponent getNodeComponent(java.lang.Object obj)
           
 boolean insertChild(java.lang.Object child)
          Insert the specified child into this nodes list of children if the child list has been initialized.
static boolean isCanonicalPath(javax.swing.tree.TreePath path)
          Returns true if a TreePath corresponds to an actual path in the model component hierarchy.
 boolean isChildListExpanded()
           
 boolean isUnnamedVisible()
           
 void printExpandedNodes()
          Recursively print the expanded nodes which are descendants of this node.
 void removeChild(java.lang.Object child)
          Remove the specified child from the list of this nodes children.
 void setUnnamedVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavPanelNode

public NavPanelNode(ModelComponent c,
                    NavPanelNode parent,
                    NavPanelTreeModel model)
Method Detail

clearChildList

public java.lang.Object[] clearChildList()

deallocateChildList

public void deallocateChildList()
Remove the children when a node is collapsed, but keep the myNumChildren cached because JTree may still want to know the number of "real" children after the node has been collapsed.


removeChild

public void removeChild(java.lang.Object child)
Remove the specified child from the list of this nodes children. Set that nodes parent to null.

Parameters:
child - The node to remove.

insertChild

public boolean insertChild(java.lang.Object child)
Insert the specified child into this nodes list of children if the child list has been initialized. If it is a NavPanelNode set this node as its parent.

Parameters:
child - The node to insert.

getIndex

public int getIndex(java.lang.Object child)
Returns the index of the specified child in this nodes child array. If the specified node is not a child of this node, returns -1.

Parameters:
child - The node to get the index of.

isUnnamedVisible

public boolean isUnnamedVisible()

setUnnamedVisible

public void setUnnamedVisible(boolean visible)

getName

public java.lang.String getName(ModelComponent comp)

getIndexOfChild

public int getIndexOfChild(java.lang.Object child)

isChildListExpanded

public boolean isChildListExpanded()

getNodeComponent

public static ModelComponent getNodeComponent(java.lang.Object obj)

getChild

public java.lang.Object getChild(ModelComponent comp)

getChild

public java.lang.Object getChild(int idx)

isCanonicalPath

public static boolean isCanonicalPath(javax.swing.tree.TreePath path)
Returns true if a TreePath corresponds to an actual path in the model component hierarchy.


printExpandedNodes

public void printExpandedNodes()
Recursively print the expanded nodes which are descendants of this node.