Class Node
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.columnCategories.Node
-
- All Implemented Interfaces:
Serializable
public class Node extends Object implements Serializable
Represents a node of the Tree class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.Type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
addChild(Node child)
Adds a child to the list of children for this Node.Node
addChildCategory(String categoryName)
void
addChildColumnIndexes(int... columnIndexes)
List<Node>
getChildren()
Return the children of Node.String
getData()
int
getNumberOfChildren()
Returns the number of immediate children of this Node.Node
getParent()
Node.Type
getType()
void
insertChildAt(int index, Node child)
Inserts a Node at the specified position in the child list.void
removeChildAt(int index)
Remove the Node element at index index of the List<Node>.void
setData(String data)
void
setParent(Node parent)
void
setType(Node.Type type)
String
toString()
-
-
-
Method Detail
-
getParent
public Node getParent()
-
setParent
public void setParent(Node parent)
-
setType
public void setType(Node.Type type)
-
getType
public Node.Type getType()
-
getChildren
public List<Node> getChildren()
Return the children of Node. The Tree is represented by a single root Node whose children are represented by a List<Node>. Each of these Node elements in the List can have children. The getChildren() method will return the children of a Node.- Returns:
- the children of Node
-
getNumberOfChildren
public int getNumberOfChildren()
Returns the number of immediate children of this Node.- Returns:
- the number of immediate children.
-
addChild
public Node addChild(Node child)
Adds a child to the list of children for this Node. The addition of the first child will create a new List<Node>.- Parameters:
child
- a Node object to set.- Returns:
- Child node just added
-
addChildColumnIndexes
public void addChildColumnIndexes(int... columnIndexes)
-
insertChildAt
public void insertChildAt(int index, Node child)
Inserts a Node at the specified position in the child list. Will throw an ArrayIndexOutOfBoundsException if the index does not exist.- Parameters:
index
- the position to insert at.child
- the Node object to insert.
-
removeChildAt
public void removeChildAt(int index)
Remove the Node element at index index of the List<Node>.- Parameters:
index
- the index of the element to delete.
-
getData
public String getData()
-
setData
public void setData(String data)
-
-