|
|
|||||
| Package com.dassault_systemes.catweb.base.util |
Class Node
|
| Class Hierarchy |
java.lang.Object
|
+-com.dassault_systemes.catweb.base.util.Leaf
|
+-com.dassault_systemes.catweb.base.util.Node
| Class Location |
| Class Description |
public class Node
Node of a tree extends Leaf because a node can also be considered as a leaf
All Implemented Interfaces: Transferable
| Field Summary |
| Constructor Summary |
| Node(Node father, String value, Leaf[] list)
Constructs a new Node with the specified father Node, label name and children Leaf |
| Node(Node father, String value, String iconName, int mode, Leaf[] list)
Constructs a new Node with the specified father Node, label name and children Leaf |
| Node(Node father, String val)
Constructs a new Node with the specified father Node, label name and no children Leaf |
| Node(Leaf[] list)
Constructs a new Node with no father Node, no label name but with children Leaf |
| Method Summary |
| public void | addChild(Leaf leaf)
Adds a new Leaf to the children Leaf of this Node. |
| public boolean | equals(Node node)
Compares recursively the equality of two nodes |
| public Leaf[] | getLeafList()
Returns the list of leaves under this node |
| public int | getNbElement(Node node)
Returns the number of elements under a given node. |
| public Leaf[] | getVisibleLeafList()
Returns the list of leaves that are visible under this node |
| public boolean | isOpen()
Determines whether this Node is open |
| public void | removeChild(Leaf leaf)
Removes a child Leaf. |
| public void | setLeafList(Leaf[] list)
Sets the cildren Leaf of this Node. |
| public void | setLeafVector(Vector vector)
Sets the cildren Leaf of this Node |
| public void | setOpen(boolean flag)
Closes or opens this Node depending on the value of parameter flag. |
| Field Detail |
| Constructor Detail |
Node(Node father, String value, Leaf[] list)
Constructs a new Node with the specified father Node, label name and children Leaf
fathervaluelist
Node(Node father, String value, String iconName, int mode, Leaf[] list)
Constructs a new Node with the specified father Node, label name and children Leaf
fathervalueiconNamemodelist
Node(Node father, String val)
Constructs a new Node with the specified father Node, label name and no children Leaf
fathervalue
Node(Leaf[] list)
Constructs a new Node with no father Node, no label name but with children Leaf
list| Method Detail |
public void addChild(Leaf leaf)
Adds a new Leaf to the children Leaf of this Node.
leaf
public boolean equals(Node node)
Compares recursively the equality of two nodes
node
public Leaf[] getLeafList()
Returns the list of leaves under this node
public int getNbElement(Node node)
Returns the number of elements under a given node. (recursive method)
node
public Leaf[] getVisibleLeafList()
Returns the list of leaves that are visible under this node
public boolean isOpen()
Determines whether this Node is open
public void removeChild(Leaf leaf)
Removes a child Leaf.
leaf
public void setLeafList(Leaf[] list)
Sets the cildren Leaf of this Node.
list
public void setLeafVector(Vector vector)
Sets the cildren Leaf of this Node
vector
public void setOpen(boolean flag)
Closes or opens this Node depending on the value of parameter flag.