Class symantec.itools.db.beans.dbnav.model.TreeNodeComposite
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.db.beans.dbnav.model.TreeNodeComposite
Object
|
+----TreeNodeComponent
|
+----symantec.itools.db.beans.dbnav.model.TreeNodeComposite
- public class TreeNodeComposite
- extends TreeNodeComponent
This class represents the Composite from the Composite design pattern
The other participants in Composite pattern are:
TreeNodeComponent - the Component
TreeNodeLeaf - the Leaf
TreeNodeBuilder - the Client
- Version:
- 1.0 06/13/98
- Author:
- Hristo Tonev
-
symantec.itools.db.beans.dbnav.model.TreeNodeComposite()
- Default constructor
-
symantec.itools.db.beans.dbnav.model.TreeNodeComposite(DataItem)
- Constructor to be used ONLY for the root node
-
addChild(TreeNodeComponent)
- This method makes sence only for the composite object
-
children()
- Returns the children of the reciever as an Enumeration.
-
getAllowsChildren()
- Returns true if the receiver allows children.
-
getChildAt(int)
- Returns the child
TreeNode
at index
childIndex
.
-
getChildCount()
- Returns the number of children
TreeNode
s the receiver
contains.
-
getIndex(TreeNode)
- Returns the index of
node
in the receivers children.
-
isLeaf()
- Returns true if the receiver is a leaf.
-
removeChild(TreeNodeComponent)
- This method makes sence only for the composite object
TreeNodeComposite
public TreeNodeComposite()
- Default constructor
TreeNodeComposite
public TreeNodeComposite(DataItem dataItem)
- Constructor to be used ONLY for the root node
addChild
public void addChild(TreeNodeComponent child)
- This method makes sence only for the composite object
- Overrides:
- addChild in class TreeNodeComponent
children
public java.util.Enumeration children()
- Returns the children of the reciever as an Enumeration.
- Overrides:
- children in class TreeNodeComponent
getAllowsChildren
public boolean getAllowsChildren()
- Returns true if the receiver allows children.
- Overrides:
- getAllowsChildren in class TreeNodeComponent
getChildAt
public com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)
- Returns the child
TreeNode
at index
childIndex
.
- Overrides:
- getChildAt in class TreeNodeComponent
getChildCount
public int getChildCount()
- Returns the number of children
TreeNode
s the receiver
contains.
- Overrides:
- getChildCount in class TreeNodeComponent
getIndex
public int getIndex(TreeNode node)
- Returns the index of
node
in the receivers children.
If the receiver does not contain node
, -1 will be
returned.
- Overrides:
- getIndex in class TreeNodeComponent
isLeaf
public boolean isLeaf()
- Returns true if the receiver is a leaf.
- Overrides:
- isLeaf in class TreeNodeComponent
removeChild
public void removeChild(TreeNodeComponent child)
- This method makes sence only for the composite object
- Overrides:
- removeChild in class TreeNodeComponent
All Packages Class Hierarchy This Package Previous Next Index