|
|
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) |
Node(Node father, String value, String iconName, int mode, Leaf[] list) |
Node(Node father, String val) |
Node(Leaf[] list) |
Method Summary |
void | setLeafList(Leaf[] list) |
void | addChild(Leaf leaf) |
void | removeChild(Leaf leaf) |
void | setLeafVector(Vector vector) |
Leaf[] | getLeafList() |
Leaf[] | getVisibleLeafList() |
int | getNbElement(Node node) |
boolean | isOpen() |
void | setOpen(boolean flag) |
boolean | equals(Node node) |
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
father
value
list
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
father
value
iconName
mode
list
Node(Node father, String val)Constructs a new Node with the specified father Node, label name and no children Leaf
father
value
Node(Leaf[] list)Constructs a new Node with no father Node, no label name but with children Leaf
list
Method Detail |
void setLeafList(Leaf[] list)Sets the cildren Leaf of this Node.
list
void addChild(Leaf leaf)Adds a new Leaf to the children Leaf of this Node.
leaf
void removeChild(Leaf leaf)Removes a child Leaf.
leaf
void setLeafVector(Vector vector)Sets the cildren Leaf of this Node
vector
Leaf[] getLeafList()Returns the list of leaves under this node
Leaf[] getVisibleLeafList()Returns the list of leaves that are visible under this node
int getNbElement(Node node)Returns the number of elements under a given node. (recursive method)
node
boolean isOpen()Determines whether this Node is open
void setOpen(boolean flag)Closes or opens this Node depending on the value of parameter flag.
boolean equals(Node node)Compares recursively the equality of two nodes
node