Synergy Home Page

au.edu.swin.synergy.plugin.workspace
Class BWorkspaceModelBranch

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.workspace.BWorkspaceModelBranch

public class BWorkspaceModelBranch
extends Object
implements BTreeNode

An expandable branch on a tree

Author:
Matthew Evans

Constructor Summary
BWorkspaceModelBranch(BWorkspaceTreeModel parent, String name)
          Creates the branch with a reference to the parent, as well as giving it a name
 
Method Summary
 void addNode(BTreeNode item)
          Add's a tree node to the list
 Object getChildAt(int index)
           
 int getChildCount()
           
 int getIndexOf(Object node)
           
 String getName()
           
 Object getParent()
           
 boolean isLeaf()
           
 void removeAllChildren()
           
 boolean removeNode(BTreeNode item)
          Removes the specified node from the branch
 void setName(String name)
           
 void setParent(Object parent)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BWorkspaceModelBranch

public BWorkspaceModelBranch(BWorkspaceTreeModel parent,
                             String name)
Creates the branch with a reference to the parent, as well as giving it a name
Parameters:
parent -  
name -  
Method Detail

addNode

public void addNode(BTreeNode item)
Add's a tree node to the list
Parameters:
item - the tree node to add to the branch

removeNode

public boolean removeNode(BTreeNode item)
Removes the specified node from the branch
Parameters:
item - the tree node to remove

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface BTreeNode

getChildAt

public Object getChildAt(int index)
Specified by:
getChildAt in interface BTreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface BTreeNode

getParent

public Object getParent()
Specified by:
getParent in interface BTreeNode

getIndexOf

public int getIndexOf(Object node)
Specified by:
getIndexOf in interface BTreeNode

setParent

public void setParent(Object parent)
Specified by:
setParent in interface BTreeNode

removeAllChildren

public void removeAllChildren()
Specified by:
removeAllChildren in interface BTreeNode

getName

public String getName()
Specified by:
getName in interface BTreeNode

setName

public void setName(String name)
Specified by:
setName in interface BTreeNode

toString

public String toString()
Overrides:
toString in class Object

Synergy Home Page