Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.vrml.fields
Class Field  view Field download Field.java

java.lang.Object
  extended bycom.trapezium.vrml.VrmlElement
      extended bycom.trapezium.vrml.SingleTokenElement
          extended bycom.trapezium.vrml.MultipleTokenElement
              extended bycom.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.
 
Field Summary
(package private)  java.lang.String fieldId
           
(package private)  int fieldType
          Get a string identifying the type of this field.
(package private)  FieldValue fieldValue
           
(package private)  Field.GetFloatOptimizer getFloatOptimizer
           
(package private)  boolean inUse
          used only for indicating if PROTO field declarations are used by IS
 
Fields inherited from class com.trapezium.vrml.MultipleTokenElement
 
Fields inherited from class com.trapezium.vrml.SingleTokenElement
 
Fields inherited from class com.trapezium.vrml.VrmlElement
baseProfile, createCount, disableBaseProfile, errorString, noUnusedDEFwarning, nowarning
 
Constructor Summary
Field(int tokenOffset)
          base constructor
 
Method Summary
protected  void cloneFieldValue(Field result, com.trapezium.vrml.VrmlElement protoInstance)
          Clone a field value into a new Field
 void fieldValueTraverse(com.trapezium.pattern.Visitor v)
          template method, Field objects override this to traverse their field value.
 java.lang.String getFieldId()
          Get the name identifying this field
 int getFieldType()
           
 FieldValue getFieldValue()
          Get a FieldValue for this field
 float getFloat(com.trapezium.parse.TokenEnumerator dataSource, int offset)
           
 int getInterfaceType()
          Template, get the interface type
 com.trapezium.vrml.node.Node getNode()
          Get the Node that is the field value, returning DEF/USE if present
 com.trapezium.vrml.node.Node getNodeParent()
          Get the Node that is the parent of this Field
 com.trapezium.vrml.node.Node getNodeValue()
          Get the Node that is the field value of this field, bypassing DEF/USE
 boolean isInUse()
           
 boolean isISfield()
          check if this field is an ISField
 void markInUse()
           
 void setFieldId(java.lang.String id)
          Set the name identifying this field
 void setFieldType(int ft)
           
 void setFieldType(java.lang.String fieldType)
           
 void setFieldValue(FieldValue fv)
           
 
Methods inherited from class com.trapezium.vrml.MultipleTokenElement
adjust, getLastTokenOffset, getText, isTraversable, setLastTokenOffset
 
Methods inherited from class com.trapezium.vrml.SingleTokenElement
getFirstTokenOffset, getName, setFirstTokenOffset
 
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
 

Field Detail

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
Constructor Detail

Field

public Field(int tokenOffset)
base constructor

Method Detail

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