public class SoNodeKitListPart extends SoNode
SoGroup
with the exception that it specifies restrictions on the type of children that it allows. It is used by nodekits to restrict child types within list parts (see the reference page for SoBaseKit
).
By default, any kind of child may be added. Methods of this class allow you to restrict the type of allowable children, and to lock down the types so that this type list may no longer be altered.
Inside the SoNodeKitListPart
is a container node, which in turn contains the children . The container node is a hidden child, and the type of node used may be set with setContainerType()
. In this way, you can make the nodekitlist behave like a group, a separator, or any other subclass of group. The container is not accessible so that the nodekitlist may retain control over what kinds of children are added.
File format/default:
NodeKitListPart {
containerTypeName | "Group" |
childTypeNames | "" |
containerNode | NULL |
See also:
SoBaseKit
, SoNodeKit, SoNodeKitDetail
, SoNodeKitPath, SoNodekitCatalog
, SoSceneKit
, SoSeparatorKit
, SoShapeKit
, SoWrapperKit
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoNodeKitListPart()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(SoNode child)
Adds child as last one in nodekit.
|
void |
addChildClass(java.lang.Class<? extends Inventor> typeToAdd)
Permits the node type typeToAdd as a child.
|
void |
containerSet(java.lang.String fieldDataString)
Sends a string to the
set() method on the container node. |
int |
findChild(SoNode child)
Finds index of given child within nodekit.
|
SoNode |
getChild(int index)
Returns the child node with the given index.
|
java.lang.Class<? extends Inventor> |
getContainerClass()
Gets the type of node used as the container .
|
int |
getNumChildren()
Returns the number of children in the nodekit.
|
void |
insertChild(SoNode child,
int childIndex)
Adds a child so that it becomes the one with the given index.
|
boolean |
isChildPermitted(SoNode child)
Returns whether the node child may be added to this list.
|
boolean |
isTypeLocked()
Returns whether the permitted child types and the container type are locked (i.e.
|
boolean |
isTypePermitted(java.lang.Class<? extends Inventor> typeToCheck)
Returns whether a node of type typeToCheck may be added as a child.
|
void |
lockTypes()
This function permanently locks the permitted child types and the container type permanently.
|
void |
removeChild(int index)
Removes child with given index from the nodekit.
|
void |
removeChild(SoNode child)
Removes first instance of given child from nodekit.
|
void |
replaceChild(int index,
SoNode newChild)
Replaces child with given index with new child.
|
void |
replaceChild(SoNode oldChild,
SoNode newChild)
Replaces first instance of given child with new child.
|
void |
setContainerClass(java.lang.Class<? extends Inventor> newContainerType)
Sets the type of node used as the container .
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public boolean isChildPermitted(SoNode child)
public void addChild(SoNode child)
public void addChildClass(java.lang.Class<? extends Inventor> typeToAdd)
addChildType()
method is called, the default of SoNode
is overridden and only the new typeToAdd is permitted. In subsequent calls to addChildType()
, the typeToAdd is added to the existing types.public SoNode getChild(int index)
public void insertChild(SoNode child, int childIndex)
public boolean isTypePermitted(java.lang.Class<? extends Inventor> typeToCheck)
public void containerSet(java.lang.String fieldDataString)
public boolean isTypeLocked()
lockTypes()
public void lockTypes()
setContainerType()
and addChildType()
will have no effect after this function is called.public void setContainerClass(java.lang.Class<? extends Inventor> newContainerType)
public void removeChild(SoNode child)
public void replaceChild(int index, SoNode newChild)
public int getNumChildren()
public int findChild(SoNode child)
public void removeChild(int index)
public java.lang.Class<? extends Inventor> getContainerClass()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com