Package com.openinventor.inventor.fields
Class SoSFEnum<EnumType extends java.lang.Enum<EnumType> & IntegerValuedEnum>
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.fields.SoField
-
- com.openinventor.inventor.fields.SoSField
-
- com.openinventor.inventor.fields.SoSFEnum<EnumType>
-
- Direct Known Subclasses:
SoSFBitMask
public class SoSFEnum<EnumType extends java.lang.Enum<EnumType> & IntegerValuedEnum> extends SoSField
Field containing an enumerated value. A single-value field that contains an enumerated type value, stored as an integer. Nodes that use this field class define mnemonic names for the values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.SoSFEnums are written to file as a mnemonic enumerated type name. The name differs among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names (e.g.
SoDrawStyle
).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.fields.SoField
SoField.FieldTypes
-
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
-
-
Constructor Summary
Constructors Constructor Description SoSFEnum(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, java.lang.Class<EnumType> enumClass, EnumType defaultValue)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getValue()
Returns this field's value.EnumType
getValue(java.lang.Class<EnumType> enumType)
void
setValue(int newValue)
Sets this field to newValue.void
setValue(EnumType newValue)
Sets this field to newValue.void
setValue(java.lang.String name)
Sets this field to contain the given mnemonic name, passed in as a name or string.-
Methods inherited from class com.openinventor.inventor.fields.SoField
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoSFEnum
public SoSFEnum(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, java.lang.Class<EnumType> enumClass, EnumType defaultValue)
Default constructor.
-
-
Method Detail
-
setValue
public void setValue(EnumType newValue)
Sets this field to newValue.
-
getValue
public int getValue()
Returns this field's value.
-
setValue
public void setValue(int newValue)
Sets this field to newValue.
-
setValue
public void setValue(java.lang.String name)
Sets this field to contain the given mnemonic name, passed in as a name or string.
-
-