Class Info |
|---|
public class Node A node class that manages component operations and node relationships. |
Qualifier and Type | Method Name and Description |
|---|---|
public long | Obtains a node handle. |
public String | getName() Obtains a node name. |
<T extends Component> public T | addComponent(Component.Descriptor<T> descriptor) Adds a component of type T. |
<T extends Component> public T | getComponent(Component.Descriptor<T> descriptor) Obtains a component of type T. |
<T extends Component> public Node | removeComponent(Component.Descriptor<T> descriptor) Removes a component of type T. |
public Node | setActive(boolean isActive) Sets whether to activate a node. |
public boolean | isActive() Checks whether a node is activated. |
public Node | Obtains a parent node. |
public Node | Adds a child node. |
public List<Node> | Obtains all child nodes. |
public void | traverseChildren(Consumer<Node> consumer) Traverses all child nodes. |
public void | tarverseDescendants(Consumer<Node> consumer) Traverses all descendant nodes. |
public Box | Obtains the bounding box corresponding to a node. |
Method |
|---|
public long getHandle() Obtains a node handle. |
Returns
Type | Description |
|---|---|
long | Handle of a node. |
Method |
|---|
public String getName() Obtains a node name. |
Returns
Type | Description |
|---|---|
String | Name of a node. |
Method |
|---|
<T extends Component> public T addComponent(Component.Descriptor<T> descriptor) Adds a component of type T. |
Templates
Type | Description |
|---|---|
T extends Component | Component type. |
Parameters
Name | Description |
|---|---|
descriptor | Component descriptor. |
Returns
Type | Description |
|---|---|
T | Instance of a component of type T that is added. |
Method |
|---|
<T extends Component> public T getComponent(Component.Descriptor<T> descriptor) Obtains a component of type T. |
Templates
Type | Description |
|---|---|
T extends Component | Component type. |
Parameters
Name | Description |
|---|---|
descriptor | Component descriptor. |
Returns
Type | Description |
|---|---|
T | Instance of a component of type T. |
Method |
|---|
<T extends Component> public Node removeComponent(Component.Descriptor<T> descriptor) Removes a component of type T. |
Templates
Type | Description |
|---|---|
T extends Component | Component type. |
Parameters
Name | Description |
|---|---|
descriptor | Component descriptor. |
Returns
Type | Description |
|---|---|
Node | Instance of this class. |
Method |
|---|
public Node setActive(boolean isActive) Sets whether to activate a node. Only activated nodes are displayed. |
Parameters
Name | Description |
|---|---|
isActive | Indicates whether to activate a node.
|
Returns
Type | Description |
|---|---|
Node | Instance of this class. |
Method |
|---|
public boolean isActive() Checks whether a node is activated. |
Returns
Type | Description |
|---|---|
boolean | Whether a node is activated.
|
Method |
|---|
public Node getParent() Obtains a parent node. |
Returns
Type | Description |
|---|---|
Node | Parent node. |
Parameters
Name | Description |
|---|---|
child | Child node. |
Returns
Type | Description |
|---|---|
Node | Instance of this class. |
Method |
|---|
public List<Node> getChildren() Obtains all child nodes. |
Returns
Type | Description |
|---|---|
List<Node> | List of all child nodes. |
Method |
|---|
public void tarverseChildren(Consumer<Node> consumer) Traverses all child nodes. |
Parameters
Name | Description |
|---|---|
consumer | Consumer of all child nodes. |
Method |
|---|
public void tarverseDescendants(Consumer<Node> consumer) Traverses all descendant nodes. |
Parameters
Name | Description |
|---|---|
consumer | Consumer of all descendant nodes. |
Method |
|---|
public Box getBoundingBox() Obtains the bounding box corresponding to a node. |
Returns
Type | Description |
|---|---|
Box | Bounding box. |