|
Cytoscape 2.8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcytoscape.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
| Field Summary | |
|---|---|
protected EventListenerList |
listenerList
|
| 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 |
protected void |
fireTreeNodesAdded(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
|
protected void |
fireTreeNodesRemoved(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
|
protected void |
fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
|
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)
|
protected TreeNode[] |
getPathToRoot(TreeNode node,
int depth)
|
Object |
getRoot()
Gets root TreeNode |
TreeModelListener[] |
getTreeModelListeners()
|
boolean |
isLeaf(Object node)
Checks if given node is a leaf. |
protected void |
nodesAdded(TreeNode parent,
int[] childIndicies,
TreeNode[] addedChildren)
Fires necessary event, use addNodeToParent |
protected void |
nodesRemoved(TreeNode parent,
int[] childIndicies,
TreeNode[] removedChildren)
Fires necessary event, use removeNodeFromParent |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EventListenerList listenerList
| 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 -
protected void nodesAdded(TreeNode parent,
int[] childIndicies,
TreeNode[] addedChildren)
parent - childIndicies - addedChildren -
protected void nodesRemoved(TreeNode parent,
int[] childIndicies,
TreeNode[] removedChildren)
parent - childIndicies - removedChildren -
public Object getChild(Object parent,
int index)
getChild in interface TreeModelparent - index - public int getChildCount(Object parent)
getChildCount in interface TreeModelparent -
public int getIndexOfChild(Object parent,
Object child)
getIndexOfChild in interface TreeModelparent - child - public Object getRoot()
getRoot in interface TreeModelpublic boolean isLeaf(Object node)
TreeNode.isLeaf() return true;
isLeaf in interface TreeModelnode - public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModell - public void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModell - public TreeModelListener[] getTreeModelListeners()
protected void fireTreeNodesRemoved(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
protected void fireTreeNodesAdded(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
protected void fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndicies,
Object[] children)
public TreeNode[] getPathToRoot(TreeNode node)
node -
protected TreeNode[] getPathToRoot(TreeNode node,
int depth)
public void reload()
public void reload(TreeNode node)
node -
public void valueForPathChanged(TreePath path,
Object newValue)
valueForPathChanged in interface TreeModel
|
Cytoscape 2.8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||