public class NavPanelTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel
Constructor and Description |
---|
NavPanelTreeModel() |
NavPanelTreeModel(RootModel root,
javax.swing.tree.TreeSelectionModel selectionModel) |
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
javax.swing.tree.TreePath |
getComponentTreePath(ModelComponent comp) |
boolean |
getHideEmptyComponents() |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
NavPanelNode |
getRoot() |
javax.swing.tree.TreePath |
getRootPath() |
boolean |
insertChildAtPathEnd(java.lang.Object child,
javax.swing.tree.TreePath parentPath)
Insert a child object to the node at the end of the specified path, if the
path does not end with a leaf node
|
boolean |
isLeaf(java.lang.Object node) |
boolean |
nodeShouldBeHidden(ModelComponent c) |
void |
nodeStructureChanged(NavPanelNode node) |
void |
nodesWereInserted(NavPanelNode node,
int[] childIndices,
java.lang.Object[] children) |
void |
nodesWereRemoved(NavPanelNode node,
int[] childIndices,
java.lang.Object[] children) |
void |
removeChildAtPathEnd(javax.swing.tree.TreePath path)
Remove the node at the end of the specified path.
|
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l) |
void |
setHideEmptyComponents(boolean enable) |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue) |
public NavPanelTreeModel(RootModel root, javax.swing.tree.TreeSelectionModel selectionModel)
public NavPanelTreeModel()
public void setHideEmptyComponents(boolean enable)
public boolean getHideEmptyComponents()
public boolean nodeShouldBeHidden(ModelComponent c)
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
in interface javax.swing.tree.TreeModel
public int getChildCount(java.lang.Object parent)
getChildCount
in interface javax.swing.tree.TreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
in interface javax.swing.tree.TreeModel
public NavPanelNode getRoot()
getRoot
in interface javax.swing.tree.TreeModel
public javax.swing.tree.TreePath getRootPath()
public boolean isLeaf(java.lang.Object node)
isLeaf
in interface javax.swing.tree.TreeModel
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
in interface javax.swing.tree.TreeModel
public void removeChildAtPathEnd(javax.swing.tree.TreePath path)
path
- path from which node should be removedpublic boolean insertChildAtPathEnd(java.lang.Object child, javax.swing.tree.TreePath parentPath)
child
- The child object to insertparentPath
- The path to the parentpublic void nodesWereRemoved(NavPanelNode node, int[] childIndices, java.lang.Object[] children)
public void nodesWereInserted(NavPanelNode node, int[] childIndices, java.lang.Object[] children)
public void nodeStructureChanged(NavPanelNode node)
public javax.swing.tree.TreePath getComponentTreePath(ModelComponent comp)