java.lang.Object
com.trapezium.vrml.VrmlElement
com.trapezium.vrml.SingleTokenElement
com.trapezium.vrml.MultipleTokenElement
com.trapezium.vrml.fields.Field
- All Implemented Interfaces:
- java.io.Serializable, com.trapezium.pattern.VisitorPattern
- Direct Known Subclasses:
- EventIn, EventOut, ExposedField, ISField, MFField, NotExposedField, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f
- public class Field
- extends com.trapezium.vrml.MultipleTokenElement
Base class for all field instances.
A Field is the range of tokens from the field id to the last token
in the field value..
- Since:
- 1.0
- Version:
- 1.1, 13 Jan 1998
|
Nested Class Summary |
(package private) class |
Field.GetFloatOptimizer
Get a float value at a particular offset in a list for this Field. |
|
Constructor Summary |
Field(int tokenOffset)
base constructor |
| Methods inherited from class com.trapezium.vrml.VrmlElement |
addChild, addWarning, contains, containsErrors, deregisterSelf, dump, dump, dumpUserDefined, getBaseName, getChildAt, getError, getLastChild, getParent, getRoot, getScene, getTokenEnumerator, isScene, numberChildren, removeChild, removeVrmlElement, setError, setParent, traverse, twoPassTraverse, vrmlClone |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inUse
boolean inUse
- used only for indicating if PROTO field declarations are used by IS
fieldValue
FieldValue fieldValue
fieldType
int fieldType
- Get a string identifying the type of this field.
fieldId
java.lang.String fieldId
getFloatOptimizer
transient Field.GetFloatOptimizer getFloatOptimizer
Field
public Field(int tokenOffset)
- base constructor
markInUse
public void markInUse()
isInUse
public boolean isInUse()
isISfield
public boolean isISfield()
- check if this field is an ISField
getFieldValue
public FieldValue getFieldValue()
- Get a FieldValue for this field
setFieldValue
public void setFieldValue(FieldValue fv)
fieldValueTraverse
public void fieldValueTraverse(com.trapezium.pattern.Visitor v)
- Description copied from class:
com.trapezium.vrml.VrmlElement
- template method, Field objects override this to traverse their
field value.
getFieldType
public int getFieldType()
setFieldType
public void setFieldType(java.lang.String fieldType)
setFieldType
public void setFieldType(int ft)
getInterfaceType
public int getInterfaceType()
- Template, get the interface type
getFieldId
public java.lang.String getFieldId()
- Get the name identifying this field
setFieldId
public void setFieldId(java.lang.String id)
- Set the name identifying this field
getNodeParent
public com.trapezium.vrml.node.Node getNodeParent()
- Get the Node that is the parent of this Field
getNodeValue
public com.trapezium.vrml.node.Node getNodeValue()
- Get the Node that is the field value of this field, bypassing DEF/USE
getNode
public com.trapezium.vrml.node.Node getNode()
- Get the Node that is the field value, returning DEF/USE if present
getFloat
public float getFloat(com.trapezium.parse.TokenEnumerator dataSource,
int offset)
throws java.lang.IndexOutOfBoundsException
cloneFieldValue
protected void cloneFieldValue(Field result,
com.trapezium.vrml.VrmlElement protoInstance)
- Clone a field value into a new Field