|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.joglutils.msg.nodes.Node
net.java.joglutils.msg.nodes.Group
public class Group
A node which manages other Node instances.
| Constructor Summary | |
|---|---|
Group()
|
|
| Method Summary | |
|---|---|
void |
addChild(Node child)
Append a child node to the list of children nodes this group node is managing. |
void |
doAction(Action action)
Performs the "typical" operation for this node when an action is applied to it. |
int |
findChild(Node node)
Finds the index of given child within the group. |
Node |
getChild(int index)
Returns the child node with the given index. |
int |
getNumChildren()
Returns number of children. |
void |
insertChild(int index,
Node child)
Adds a child so that it becomes the one with the given index. |
Iterator<Node> |
iterator()
Returns an Iterator over the nodes this Group contains. |
void |
removeAllChildren()
Removes all children from this Group node. |
void |
removeChild(int index)
Removes the child with given index from the group. |
void |
removeChild(Node node)
Removes the given child from the group. |
void |
replaceChild(int index,
Node newChild)
Replaces the child at the given index with the new child. |
void |
replaceChild(Node oldChild,
Node newChild)
Replaces the old child with the new child. |
| Methods inherited from class net.java.joglutils.msg.nodes.Node |
|---|
rayPick, render |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Group()
| Method Detail |
|---|
public void addChild(Node child)
public void insertChild(int index,
Node child)
public Node getChild(int index)
public int findChild(Node node)
public int getNumChildren()
public void removeChild(int index)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - if the index is less than 0 or
greater than the number of childrenpublic void removeChild(Node node)
findChild and,
if the node is found, passing the index to removeChild.
public void removeAllChildren()
public void replaceChild(int index,
Node newChild)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - if the index is less than 0 or
greater than the number of children
public void replaceChild(Node oldChild,
Node newChild)
findChild with
oldChild as argument, and call replaceChild(int, SoNode*) if the
child is found.
public Iterator<Node> iterator()
iterator in interface Iterable<Node>public void doAction(Action action)
Node
doAction in class Node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||