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
-
accessType
- The type of access that this node has.
-
EVENTIN
-
-
EVENTOUT
-
-
EXPOSEDFIELD
-
-
FIELD
-
-
indent_string
- The indent of each field in the line.
-
MFColor
-
-
MFFloat
-
-
MFInt32
-
-
MFNode
-
-
MFRotation
-
-
MFString
-
-
MFTime
-
-
MFVec2f
-
-
MFVec3f
-
-
mValue
- The value of the field if this is an MF Field.
-
name
- The name of the field
-
SFBool
-
-
SFColor
-
-
SFFloat
-
-
SFImage
-
-
SFInt32
-
-
SFNode
-
-
SFRotation
-
-
SFString
-
-
SFTime
-
-
SFVec2f
-
-
SFVec3f
-
-
type
- The field type that this class represents.
-
value
- The value of the field if the type is an SF field; This and the
mValue field are mutally exclusive.
-
wrapLevel
- The number of items after which wrapping occurs.
-
FieldDefinition()
-
-
clone()
- Make a replica of this node
-
toString()
- Produces a string representation of this field.
-
writeMFColor(StringBuffer, float[][])
- Write out an MFColor field.
-
writeMFFloat(StringBuffer, Float[])
- Write out an MFFloat field.
-
writeMFInt32(StringBuffer, Integer[])
- Write out an MFInt32 field.
-
writeMFNode(StringBuffer)
- Write out an MFNode field.
-
writeMFRotation(StringBuffer, float[][])
- Write out an MFRotation field.
-
writeMFString(StringBuffer, String[])
- Write out an MFString field.
-
writeMFVec2f(StringBuffer, float[][])
- Write out an MFVec2f field.
-
writeMFVec3f(StringBuffer, float[][])
- Write out an MFVec3f field.
FIELD
public static final int FIELD
EVENTIN
public static final int EVENTIN
EVENTOUT
public static final int EVENTOUT
EXPOSEDFIELD
public static final int EXPOSEDFIELD
SFBool
public static final int SFBool
SFColor
public static final int SFColor
SFFloat
public static final int SFFloat
SFImage
public static final int SFImage
SFInt32
public static final int SFInt32
SFNode
public static final int SFNode
SFRotation
public static final int SFRotation
SFString
public static final int SFString
SFTime
public static final int SFTime
SFVec2f
public static final int SFVec2f
SFVec3f
public static final int SFVec3f
MFColor
public static final int MFColor
MFFloat
public static final int MFFloat
MFInt32
public static final int MFInt32
MFNode
public static final int MFNode
MFRotation
public static final int MFRotation
MFString
public static final int MFString
MFTime
public static final int MFTime
MFVec2f
public static final int MFVec2f
MFVec3f
public static final int MFVec3f
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
type
public int type
- The field type that this class represents. Can be any of the SF/MF
values defined above
name
public String name
- The name of the field
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.
mValue
public Object mValue[]
- The value of the field if this is an MF Field.
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.
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.
FieldDefinition
public FieldDefinition()
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
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.
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.
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.
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.
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.
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.
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.
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.
clone
public Object clone()
- Make a replica of this node
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index