Class SFNode
java.lang.Object
org.web3d.x3d.jsail.fields.X3DConcreteField
org.web3d.x3d.jsail.fields.SFNode
This utility class provides a concrete implementation corresponding to SFNode X3D field type.
Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI). SFNode specifies an X3D node; the default empty value of an uninitialized SFNode field is sometimes described as NULL.
Related field object:
Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI). SFNode specifies an X3D node; the default empty value of an uninitialized SFNode field is sometimes described as NULL.
Related field object:
MFNode- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final X3DNodeDefault value for this field type is a null node.static final StringDefault string value for this field type is "".static final StringString constant NAME provides name of this field type: SFNodestatic final intDefault tuple size for this field type is 1 (i.e. number of component values making up a single-field SF object).Fields inherited from class X3DConcreteField
validationResult -
Constructor Summary
ConstructorsConstructorDescriptionSFNode()Constructor for SFNode performs value initialization.Constructor to copy an SFNode value as initial value for this new field object.Constructor for SFNode using a corresponding Java primitive org.web3d.x3d.sai.Core.X3DNode as new initial value. -
Method Summary
Modifier and TypeMethodDescriptionUtility method to clear all contained children including nodes, statements and comments (if any).Provides current value of the field as a Java primitive type.getValue()Get the current value.final voidInitialization for SFNode applies default initial value.static final booleanisArray()Whether or not this field type is an array (false)booleanDetermine whether current value matches DEFAULT_VALUEApply an SFNode value to this field.voidAssign a new value to this field.toString()Provides current value as a String.static StringStatic utility method to provide String representation of a correctly typed input value.Methods inherited from class X3DConcreteField
addX3DEventListener, getDefinition, getTupleSize, getValidationResult, isReadable, isWritable, removeX3DEventListener, setReadable, setWritableModifier and TypeMethodDescriptionvoidaddX3DEventListener(X3DFieldEventListener newListener) WARNING not testedWARNING not implementedstatic intgetTupleSize(String fieldType) Compute tuple size for given type (for example, SFVec3f and MFVec3f have tupleSize of 3).Get output of results from prior validation, if anybooleanCheck whether field is readable, default /true/booleanCheck whether field is writable, default /true/voidremoveX3DEventListener(X3DFieldEventListener oldListener) WARNING not testedvoidsetReadable(boolean newValue) Set whether field is readablevoidsetWritable(boolean newValue) Set whether field is writable
-
Field Details
-
NAME
String constant NAME provides name of this field type: SFNode- See Also:
-
DEFAULT_VALUE
Default value for this field type is a null node.- See Also:
-
DEFAULT_VALUE_STRING
Default string value for this field type is "".- See Also:
-
TUPLE_SIZE
public static final int TUPLE_SIZEDefault tuple size for this field type is 1 (i.e. number of component values making up a single-field SF object).- See Also:
-
-
Constructor Details
-
SFNode
public SFNode()Constructor for SFNode performs value initialization. -
SFNode
Constructor to copy an SFNode value as initial value for this new field object.- Parameters:
newValue- The newValue to apply
-
SFNode
Constructor for SFNode using a corresponding Java primitive org.web3d.x3d.sai.Core.X3DNode as new initial value.- Parameters:
newValue- is new value to assign setContainerFieldOverride(containerFieldName); // apply checksConcreteField#getTupleSize(String)
-
-
Method Details
-
isArray
public static final boolean isArray()Whether or not this field type is an array (false)- Returns:
- true if array type
-
initialize
public final void initialize()Initialization for SFNode applies default initial value.- Specified by:
initializein classX3DConcreteField- See Also:
-
toString
-
getValue
-
getPrimitiveValue
Provides current value of the field as a Java primitive type.- Returns:
- current value
-
toString
-
setValue
-
setValue
-
clearChildren
-
isDefaultValue
public boolean isDefaultValue()Determine whether current value matches DEFAULT_VALUE- Returns:
- whether current value matches DEFAULT_VALUE
- See Also:
-