Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLGroupingNodeType

All Superinterfaces:
FrameStateListener, VRMLBoundedNodeType, VRMLChildNodeType, VRMLNode, VRMLNodeType
All Known Implementing Classes:
BaseGroupingNode

public interface VRMLGroupingNodeType
extends VRMLBoundedNodeType

A node which can contain other nodes.

Version:
$Revision: 1.10 $
Author:
Alan Hudson

Method Summary
 void addChild(VRMLNodeType newChild)
          Append a new child node to the existing collection.
 boolean containsBindableNodes()
          A check to see if this grouping node contains any bindable nodes.
 VRMLNodeType[] getChildren()
          Get the children, provides a live reference not a copy
 int getChildrenSize()
          Returns the number of children.
 boolean isShared()
          Check to see if this node has been used more than once.
 void setChildren(VRMLNodeType newChild)
          Accessor method to set the children field.
 void setChildren(VRMLNodeType[] newChildren)
          Accesor method to set the children field.
 void setShared(boolean used)
          Adjust the sharing count up or down one increment depending on the flag.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLBoundedNodeType
getBboxCenter, getBboxSize
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 

Method Detail

getChildren

public VRMLNodeType[] getChildren()
Get the children, provides a live reference not a copy

Returns:
An array of VRMLNodeTypes

setChildren

public void setChildren(VRMLNodeType[] newChildren)
Accesor method to set the children field. If passed null this method will act like removeChildren

Parameters:
newChildren - Array of new children

setChildren

public void setChildren(VRMLNodeType newChild)
Accessor method to set the children field. Creates an array containing only newChild. If passed null this method will act like removeChildren.

Parameters:
newChild - The new child

addChild

public void addChild(VRMLNodeType newChild)
Append a new child node to the existing collection. Should be used sparingly. It is really only provided for Proto handling purposes.

Parameters:
newChild - The new child

getChildrenSize

public int getChildrenSize()
Returns the number of children.

Returns:
The number of children

containsBindableNodes

public boolean containsBindableNodes()
A check to see if this grouping node contains any bindable nodes. Bindables do not allow the reuse of a shared node and will effect how the DEF/USE handling is implemented.

Returns:
true if this or any of its children contain bindable nodes

isShared

public boolean isShared()
Check to see if this node has been used more than once. If it has then return true.

Returns:
true if this node is shared

setShared

public void setShared(boolean used)
Adjust the sharing count up or down one increment depending on the flag.

Parameters:
used - true if this is about to have another reference added

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium