All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vlc.vrml.common.FieldDefinition

java.lang.Object
   |
   +----vlc.vrml.common.FieldDefinition

public class FieldDefinition
extends Object
implements Cloneable
JVerge

Version:
0.8 (beta 4) Copyright 1997 The Virtual Light Company under the GNU LGPL

The latest information and bugs in JVerge can be found at http://www.vlc.com.au/JVerge

The field definition class. This is used to construct and retrieve fields in the PROTO/EXTERNPROTO and Script nodes. For definition of PROTO nodes please see the VRML 97 PROTO definition section 4.9

A toString method is provided to print out the string representation of this field. This works correctly for all field types except SF/MFNode. The class will print the first 3 parts of the class if it is a field or exposedField and the caller is expected to make sure that the node contents are printed out. The reason for this is that it makes sure that the indent of the field is correct and that the correct PrintStream is used for output.

Author:
Justin Couch justin@vlc.com.au

Variable Index

 o accessType
The type of access that this node has.
 o EVENTIN
 o EVENTOUT
 o EXPOSEDFIELD
 o FIELD
 o indent_string
The indent of each field in the line.
 o MFColor
 o MFFloat
 o MFInt32
 o MFNode
 o MFRotation
 o MFString
 o MFTime
 o MFVec2f
 o MFVec3f
 o mValue
The value of the field if this is an MF Field.
 o name
The name of the field
 o SFBool
 o SFColor
 o SFFloat
 o SFImage
 o SFInt32
 o SFNode
 o SFRotation
 o SFString
 o SFTime
 o SFVec2f
 o SFVec3f
 o type
The field type that this class represents.
 o value
The value of the field if the type is an SF field; This and the mValue field are mutally exclusive.
 o wrapLevel
The number of items after which wrapping occurs.

Constructor Index

 o FieldDefinition()

Method Index

 o clone()
Make a replica of this node
 o toString()
Produces a string representation of this field.
 o writeMFColor(StringBuffer, float[][])
Write out an MFColor field.
 o writeMFFloat(StringBuffer, Float[])
Write out an MFFloat field.
 o writeMFInt32(StringBuffer, Integer[])
Write out an MFInt32 field.
 o writeMFNode(StringBuffer)
Write out an MFNode field.
 o writeMFRotation(StringBuffer, float[][])
Write out an MFRotation field.
 o writeMFString(StringBuffer, String[])
Write out an MFString field.
 o writeMFVec2f(StringBuffer, float[][])
Write out an MFVec2f field.
 o writeMFVec3f(StringBuffer, float[][])
Write out an MFVec3f field.

Variables

 o FIELD
 public static final int FIELD
 o EVENTIN
 public static final int EVENTIN
 o EVENTOUT
 public static final int EVENTOUT
 o EXPOSEDFIELD
 public static final int EXPOSEDFIELD
 o SFBool
 public static final int SFBool
 o SFColor
 public static final int SFColor
 o SFFloat
 public static final int SFFloat
 o SFImage
 public static final int SFImage
 o SFInt32
 public static final int SFInt32
 o SFNode
 public static final int SFNode
 o SFRotation
 public static final int SFRotation
 o SFString
 public static final int SFString
 o SFTime
 public static final int SFTime
 o SFVec2f
 public static final int SFVec2f
 o SFVec3f
 public static final int SFVec3f
 o MFColor
 public static final int MFColor
 o MFFloat
 public static final int MFFloat
 o MFInt32
 public static final int MFInt32
 o MFNode
 public static final int MFNode
 o MFRotation
 public static final int MFRotation
 o MFString
 public static final int MFString
 o MFTime
 public static final int MFTime
 o MFVec2f
 public static final int MFVec2f
 o MFVec3f
 public static final int MFVec3f
 o accessType
 public int accessType
The type of access that this node has. Can have only one of the values defined as FIELD | EVENTIN | EVENTOUT | EXPOSEDFIELD

 o type
 public int type
The field type that this class represents. Can be any of the SF/MF values defined above

 o name
 public String name
The name of the field

 o value
 public Object value
The value of the field if the type is an SF field; This and the mValue field are mutally exclusive. Although no checking is done only one can be used at any one time.

 o mValue
 public Object mValue[]
The value of the field if this is an MF Field.

 o wrapLevel
 public static int wrapLevel
The number of items after which wrapping occurs. This should not be set by the ordinary user. If is used internally by JVerge for text formating when printing out a field.

 o indent_string
 public static String indent_string
The indent of each field in the line. This should not be set by the ordinary user. If is used internally by JVerge for text formating when printing out a field.

Constructors

 o FieldDefinition
 public FieldDefinition()

Methods

 o toString
 public String toString()
Produces a string representation of this field. The layout is identical to that required to write the field into a VRML file. It formats it nicely as well if the node is an MFField (even MFNodes)

Overrides:
toString in class Object
 o writeMFColor
 protected void writeMFColor(StringBuffer str,
                             float values[][])
Write out an MFColor field. This does not check for default values or any errors. It assumes that the indent is correct and the PrintStream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFFloat
 protected void writeMFFloat(StringBuffer str,
                             Float values[])
Write out an MFFloat field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFInt32
 protected void writeMFInt32(StringBuffer str,
                             Integer values[])
Write out an MFInt32 field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFNode
 protected void writeMFNode(StringBuffer str)
Write out an MFNode field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

 o writeMFRotation
 protected void writeMFRotation(StringBuffer str,
                                float values[][])
Write out an MFRotation field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFString
 protected void writeMFString(StringBuffer str,
                              String values[])
Write out an MFString field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFVec2f
 protected void writeMFVec2f(StringBuffer str,
                             float values[][])
Write out an MFVec2f field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o writeMFVec3f
 protected void writeMFVec3f(StringBuffer str,
                             float values[][])
Write out an MFVec3f field. This does not check for default values or any errors. It assumes that the indent is correct and the appendstream is correctly specified. The indent_string assumes you have the correct amount of indent for this field relative to the parent.

Parameters:
values - The values to be appended out.
 o clone
 public Object clone()
Make a replica of this node

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index