Class SoNodekitCatalog


  • public class SoNodekitCatalog
    extends Inventor
    Nodekit catalog class. This class describes the parts and structure of a nodekit. Each class of nodekit has one 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:
    SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit SoNodeKit, SoNodeKitDetail, SoNodeKitListPart SoNodeKitPath, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<? extends Inventor> getClass​(int thePartNumber)
      Returns the type of the specified part.
      java.lang.Class<? extends Inventor> getClass​(java.lang.String theName)
      Returns the type of the specified part.
      java.lang.Class<? extends Inventor> getDefaultClass​(int thePartNumber)
      Returns the default type of the specified part.
      java.lang.Class<? extends Inventor> getDefaultClass​(java.lang.String theName)
      Returns the default type of the specified part.
      java.lang.Class<? extends Inventor> getListContainerClass​(int thePartNumber)
      Returns the list container type of the specified part.
      java.lang.Class<? extends Inventor> getListContainerClass​(java.lang.String theName)
      Returns the list container type of the specified part.
      java.lang.String getName​(int thePartNumber)
      Given the part number of a part, returns its name in the catalog.
      int getNumEntries()
      Returns the number of entries in the catalog.
      java.lang.String getParentName​(int thePartNumber)
      Returns the parent of the specified part.
      java.lang.String getParentName​(java.lang.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​(java.lang.String theName)
      Returns the part number of the parent of the specified part.
      int getPartNumber​(java.lang.String theName)
      Given the name of a part, returns its part number in the catalog.
      java.lang.String getRightSiblingName​(int thePartNumber)
      Returns the name of the right sibling of the specified part.
      java.lang.String getRightSiblingName​(java.lang.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​(java.lang.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 isLeaf​(java.lang.String theName)
      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 isList​(java.lang.String theName)
      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​(java.lang.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 isPublic​(java.lang.String theName)
      Returns true if the specified part is public.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDefaultClass

        public java.lang.Class<? extends Inventor> getDefaultClass​(int thePartNumber)
        Returns the default type of the specified part.
      • isPublic

        public boolean isPublic​(java.lang.String theName)
        Returns true if the specified part is public.
      • getClass

        public java.lang.Class<? extends Inventor> getClass​(int thePartNumber)
        Returns the type of the specified part.
      • getName

        public java.lang.String getName​(int thePartNumber)
        Given the part number of a part, returns its name in the catalog.
      • getPartNumber

        public int getPartNumber​(java.lang.String theName)
        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

        public java.lang.String getRightSiblingName​(java.lang.String theName)
        Returns the name of the right sibling of the specified part.
      • getClass

        public java.lang.Class<? extends Inventor> getClass​(java.lang.String theName)
        Returns the type of the specified part.
      • getParentName

        public java.lang.String getParentName​(java.lang.String theName)
        Returns the parent of the specified part.
      • isList

        public boolean isList​(int thePartNumber)
        Returns true if the specified part is a parts list.
      • getParentName

        public java.lang.String getParentName​(int thePartNumber)
        Returns the parent of the specified part.
      • isList

        public boolean isList​(java.lang.String theName)
        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

        public java.lang.String getRightSiblingName​(int thePartNumber)
        Returns the name of the right sibling of the specified part.
      • getRightSiblingPartNumber

        public int getRightSiblingPartNumber​(java.lang.String theName)
        Returns the part number of the right sibling of the specified part.
      • getParentPartNumber

        public int getParentPartNumber​(java.lang.String theName)
        Returns the part number of the parent of the specified part.
      • getListContainerClass

        public java.lang.Class<? extends Inventor> getListContainerClass​(int thePartNumber)
        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

        public java.lang.Class<? extends Inventor> getDefaultClass​(java.lang.String theName)
        Returns the default type of the specified part.
      • isPublic

        public boolean isPublic​(int thePartNumber)
        Returns true if the specified part is public.
      • isNullByDefault

        public boolean isNullByDefault​(java.lang.String theName)
        Returns true if the specified part is null by default.
      • getListContainerClass

        public java.lang.Class<? extends Inventor> getListContainerClass​(java.lang.String theName)
        Returns the list container type of the specified part.
      • isLeaf

        public boolean isLeaf​(java.lang.String theName)
        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.