Class SoNodekitCatalog
SoNodekitCatalog
(a static variable for the class). Internally, the catalog contains one entry for each "part" in the nodekit's structure. Users can query the catalog for information about each entry in the catalog. This information can be obtained either by part name (a string unique for the part within the catalog) or by part number (an index into an array of parts).
Note that, although the catalog for a nodekit class may contain many entries, each instance of that class is not initially created with all of these parts intact. Rather, each instance of the class has its own parts list which keeps track of which parts the user has created. The nodekit uses the catalog as a guide in creating new nodes as its descendants; the standard addChild(), removeChild() and other SoGroup
methods are protected, so that users must create descendants indirectly by asking the nodekit to get and/or set the different "parts" in the catalog.
The first entry in any SoNodekitCatalog
corresponds to the nodekit itself. Its partName is "this" and its partNumber is 0. All other parts in the catalog are described relative to "this."
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptiongetClass
(int thePartNumber) Returns the type of the specified part.Returns the type of the specified part.getDefaultClass
(int thePartNumber) Returns the default type of the specified part.getDefaultClass
(String theName) Returns the default type of the specified part.getListContainerClass
(int thePartNumber) Returns the list container type of the specified part.getListContainerClass
(String theName) Returns the list container type of the specified part.getName
(int thePartNumber) Given the part number of a part, returns its name in the catalog.int
Returns the number of entries in the catalog.getParentName
(int thePartNumber) Returns the parent of the specified part.getParentName
(String theName) Returns the parent of the specified part.int
getParentPartNumber
(int thePartNumber) Returns the part number of the parent of the specified part.int
getParentPartNumber
(String theName) Returns the part number of the parent of the specified part.int
getPartNumber
(String theName) Given the name of a part, returns its part number in the catalog.getRightSiblingName
(int thePartNumber) Returns the name of the right sibling of the specified part.getRightSiblingName
(String theName) Returns the name of the right sibling of the specified part.int
getRightSiblingPartNumber
(int thePartNumber) Returns the part number of the right sibling of the specified part.int
getRightSiblingPartNumber
(String theName) Returns the part number of the right sibling of the specified part.boolean
isLeaf
(int thePartNumber) Returns true if the specified part is a leaf node.boolean
Returns true if the specified part is a leaf node.boolean
isList
(int thePartNumber) Returns true if the specified part is a parts list.boolean
Returns true if the specified part is a parts list.boolean
isNullByDefault
(int thePartNumber) Returns true if the specified part is null by default.boolean
isNullByDefault
(String theName) Returns true if the specified part is null by default.boolean
isPublic
(int thePartNumber) Returns true if the specified part is public.boolean
Returns true if the specified part is public.Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
getDefaultClass
Returns the default type of the specified part. -
isPublic
Returns true if the specified part is public. -
getClass
Returns the type of the specified part. -
getName
Given the part number of a part, returns its name in the catalog. -
getPartNumber
Given the name of a part, returns its part number in the catalog. -
getNumEntries
public int getNumEntries()Returns the number of entries in the catalog. -
getRightSiblingName
Returns the name of the right sibling of the specified part. -
getClass
Returns the type of the specified part. -
getParentName
Returns the parent of the specified part. -
isList
public boolean isList(int thePartNumber) Returns true if the specified part is a parts list. -
getParentName
Returns the parent of the specified part. -
isList
Returns true if the specified part is a parts list. -
getParentPartNumber
public int getParentPartNumber(int thePartNumber) Returns the part number of the parent of the specified part. -
getRightSiblingPartNumber
public int getRightSiblingPartNumber(int thePartNumber) Returns the part number of the right sibling of the specified part. -
getRightSiblingName
Returns the name of the right sibling of the specified part. -
getRightSiblingPartNumber
Returns the part number of the right sibling of the specified part. -
getParentPartNumber
Returns the part number of the parent of the specified part. -
getListContainerClass
Returns the list container type of the specified part. -
isNullByDefault
public boolean isNullByDefault(int thePartNumber) Returns true if the specified part is null by default. -
getDefaultClass
Returns the default type of the specified part. -
isPublic
public boolean isPublic(int thePartNumber) Returns true if the specified part is public. -
isNullByDefault
Returns true if the specified part is null by default. -
getListContainerClass
Returns the list container type of the specified part. -
isLeaf
Returns true if the specified part is a leaf node. -
isLeaf
public boolean isLeaf(int thePartNumber) Returns true if the specified part is a leaf node.
-