|
Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.dialogs.plugins.ManagerModel
public class ManagerModel
Fairly similar to DefaultTreeModel but I wanted to add some extra functionality to removing/adding nodes and use my own node objects
Constructor Summary | |
---|---|
ManagerModel(TreeNode Root)
|
Method Summary | |
---|---|
void |
addNodeToParent(TreeNode parent,
TreeNode child)
Adds node to given parent, fires event |
void |
addTreeModelListener(TreeModelListener l)
Adds given listener |
Object |
getChild(Object parent,
int index)
Gets child TreeNode from given parent at given index. |
int |
getChildCount(Object parent)
Gets count of all children under given parent (not including leaves) |
int |
getIndexOfChild(Object parent,
Object child)
Gets the index of the given child node from the given parent node. |
TreeNode[] |
getPathToRoot(TreeNode node)
|
Object |
getRoot()
Gets root TreeNode |
TreeModelListener[] |
getTreeModelListeners()
|
boolean |
isLeaf(Object node)
Checks if given node is a leaf. |
void |
reload()
Reloads entire tree, fires event |
void |
reload(TreeNode node)
Reloads given node, fires event. |
void |
removeNodeFromParent(TreeNode child)
Removes given node from it's parent. |
void |
removeNodesFromParent(List<TreeNode> children)
|
void |
removeTreeModelListener(TreeModelListener l)
Removes given listener |
void |
valueForPathChanged(TreePath path,
Object newValue)
NOT IMPLEMENTED |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagerModel(TreeNode Root)
Method Detail |
---|
public void removeNodesFromParent(List<TreeNode> children)
public void removeNodeFromParent(TreeNode child)
child
- public void addNodeToParent(TreeNode parent, TreeNode child)
parent
- child
- public Object getChild(Object parent, int index)
getChild
in interface TreeModel
parent
- index
- public int getChildCount(Object parent)
getChildCount
in interface TreeModel
parent
- public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
parent
- child
- public Object getRoot()
getRoot
in interface TreeModel
public boolean isLeaf(Object node)
TreeNode.isLeaf()
return true;
isLeaf
in interface TreeModel
node
- public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
l
- public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
l
- public TreeModelListener[] getTreeModelListeners()
public TreeNode[] getPathToRoot(TreeNode node)
node
-
public void reload()
public void reload(TreeNode node)
node
- public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |