org.oddjob.arooa.design.designer
Class DesignTreeNode
java.lang.Object
org.oddjob.arooa.design.designer.DesignTreeNode
- All Implemented Interfaces:
- TreeNode
public class DesignTreeNode
- extends Object
- implements TreeNode
This class wraps a DesignComponent allowing it to
act as a TreeNode.
- Author:
- Rob Gordon
DesignTreeNode
public DesignTreeNode(DesignTreeModel model,
DesignTreeNode parent,
DesignComponent node)
- Constructor.
- Parameters:
model - The tree model this node belongs to.parent - The parent node.node - The structure node this is modelling.
build
public void build()
- Build the tree. This recursive method tracks the component tree
structure. It creates and remove child tree nodes as the
are added and removed to the component.
getDesignComponent
public DesignComponent getDesignComponent()
children
public Enumeration<DesignTreeNode> children()
- Specified by:
children in interface TreeNode
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren in interface TreeNode
getChildAt
public DesignTreeNode getChildAt(int index)
- Specified by:
getChildAt in interface TreeNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount in interface TreeNode
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf in interface TreeNode
getIndex
public int getIndex(TreeNode child)
- Specified by:
getIndex in interface TreeNode
getParent
public DesignTreeNode getParent()
- Specified by:
getParent in interface TreeNode
toString
public String toString()
- Overrides:
toString in class Object
destroy
public void destroy()
getDetailView
public Component getDetailView()
- Returns:
- Returns the detailView.