Class symantec.itools.db.beans.dbnav.model.TreeNodeComponent
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.db.beans.dbnav.model.TreeNodeComponent
Object
|
+----symantec.itools.db.beans.dbnav.model.TreeNodeComponent
- public abstract class TreeNodeComponent
- extends Object
- implements TreeNode
This class represents the Component from the Composite design pattern.
The default implementation is for a Leaf.
The other participants in Composite pattern are:
TreeNodeLeaf - the Leaf
TreeNodeComposite - the Composite
TreeNodeBuilder - the Client
- Version:
- 1.0 06/13/98
- Author:
- Hristo Tonev
-
symantec.itools.db.beans.dbnav.model.TreeNodeComponent()
- Default constructor
-
symantec.itools.db.beans.dbnav.model.TreeNodeComponent(DataItem)
-
-
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.
-
getDataItem()
-
-
getIndex(TreeNode)
- Returns the index of
node
in the receivers children.
-
getParent()
- Returns the parent
TreeNode
of the receiver.
-
isLeaf()
- Returns true if the receiver is a leaf.
-
removeChild(TreeNodeComponent)
- This method makes sence only for the composite object.
-
setDataItem(DataItem)
-
-
setParent(TreeNodeComponent)
-
-
toString()
- Overriding
toString()
method here is very important
TreeNodeComponent
public TreeNodeComponent()
- Default constructor
TreeNodeComponent
public TreeNodeComponent(DataItem dataItem)
addChild
public void addChild(TreeNodeComponent child)
- This method makes sence only for the composite object.
The default implementation does nothing.
children
public java.util.Enumeration children()
- Returns the children of the reciever as an Enumeration.
getAllowsChildren
public boolean getAllowsChildren()
- Returns true if the receiver allows children.
getChildAt
public com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)
- Returns the child
TreeNode
at index
childIndex
.
getChildCount
public int getChildCount()
- Returns the number of children
TreeNode
s the receiver
contains.
getDataItem
public symantec.itools.db.beans.dbnav.model.DataItem getDataItem()
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.
getParent
public com.sun.java.swing.tree.TreeNode getParent()
- Returns the parent
TreeNode
of the receiver.
isLeaf
public boolean isLeaf()
- Returns true if the receiver is a leaf.
removeChild
public void removeChild(TreeNodeComponent child)
- This method makes sence only for the composite object.
The default implementation does nothing.
setDataItem
public void setDataItem(DataItem dataItem)
setParent
public void setParent(TreeNodeComponent parent)
toString
public java.lang.String toString()
- Overriding
toString()
method here is very important
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index