All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vlc.vrml.generic.geometry.Script

java.lang.Object
   |
   +----vlc.vrml.generic.geometry.VrmlObject
           |
           +----vlc.vrml.generic.geometry.ChildrenNode
                   |
                   +----vlc.vrml.generic.geometry.Script

public class Script
extends ChildrenNode
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

For definition of the Script node please see the VRML 97 Script specification

The extra fields are handled by the user passing in an array of FieldDefinitions. If the list happens to include any exposedFields then those fields are silently dropped by the class. Kf you should try to access them at a later time you will generate a NoSuchFieldException as any request for a non-existent field would.

Author:
Justin Couch justin@vlc.com.au

Constructor Index

 o Script(boolean, boolean, FieldDefinition[])
Default Constructor

Method Index

 o cleanup()
Call when about to remove the node from the scenegraph.
 o clone()
Make a clone of this object
 o get_directOutput()
Get the value of the directOutput field
 o get_MFfield(String)
Get the value of the MF field that the name represents.
 o get_mustEvaluate()
Get the value of the mustEvaluate field
 o get_SFfield(String)
Get the value of the SF field that the name represents.
 o get_url()
Get the list of URLs that this node is currently using
 o set_MFField(String, Object[])
Set the value of a MF field.
 o set_SFField(String, Object)
Set the value of a SF field.
 o set_url(String[])
Set the list of URLs for the source of the sound
 o writeToStream(int)
Prints the formatted contents of this node to the given stream.

Constructors

 o Script
 public Script(boolean directOutput,
               boolean mustEvaluate,
               FieldDefinition fields[])
Default Constructor

Parameters:
directOutput - sets the directOutput field value
mustEvaluate - set the mustEvaluate field value
fields - The list of fields that this script is to have.

Methods

 o cleanup
 public void cleanup()
Call when about to remove the node from the scenegraph.

Overrides:
cleanup in class VrmlObject
 o writeToStream
 public void writeToStream(int indent)
Prints the formatted contents of this node to the given stream.

Parameters:
indent - The number of spaces to indent this node in the string
Overrides:
writeToStream in class VrmlObject
 o set_url
 public void set_url(String url[])
Set the list of URLs for the source of the sound

Parameters:
The - list of URLs in decending order of preference
 o get_url
 public String[] get_url()
Get the list of URLs that this node is currently using

Returns:
The lsit of URLs in decending order of preference
 o get_directOutput
 public boolean get_directOutput()
Get the value of the directOutput field

Returns:
True if directOutput is enabled, false if not
 o get_mustEvaluate
 public boolean get_mustEvaluate()
Get the value of the mustEvaluate field

Returns:
True if mustEvaluate is enabled, false if not
 o get_SFfield
 public Object get_SFfield(String name) throws NoSuchFieldException
Get the value of the SF field that the name represents. If you ask for a field that represents a multi-value field, only the first value is returned. In order to get all the values in an MF field use the get_MFfield method

Returns:
The value this SF field represents
Throws: NoSuchFieldException
Thrown when cannot find the field to get.
 o set_SFField
 public void set_SFField(String name,
                         Object value) throws IllegalArgumentException, NoSuchFieldException
Set the value of a SF field. If you ask for a field that represents a multivalued field then an IllegalArgumentException is thrown

If you put in the wrong value for the field then an IllegalArgumentException is thrown. If the name does not exist at all then a NoSuchFieldException is thrown.

Parameters:
name - The name of the field to set
value - The value to use
Throws: IllegalArgumentException
Thrown if either an MF field or incorrect field type is sent in for the nominated field type
Throws: NoSuchFieldException
Thrown if the named field does not exist or if the access type is of type FIELD
 o get_MFfield
 public Object[] get_MFfield(String name) throws NoSuchFieldException
Get the value of the MF field that the name represents. If you ask for a field that represents a single value field, it returns an array of length 1 with that field values

Returns:
The array of values this MF field represents
Throws: NoSuchFieldException
Thrown when cannot find the field to get.
 o set_MFField
 public void set_MFField(String name,
                         Object value[]) throws IllegalArgumentException, NoSuchFieldException
Set the value of a MF field. If you ask for a field that represents a multivalued field then an IllegalArgumentException is thrown

If you put in the wrong value for the field then an IllegalArgumentException is thrown. If the name does not exist at all then a NoSuchFieldException is thrown.

Parameters:
name - The name of the field to set
value - The value to use
Throws: IllegalArgumentException
Thrown if either an MF field or incorrect field type is sent in for the nominated field type
Throws: NoSuchFieldException
Thrown if the named field does not exist or if the access type is of type FIELD
 o clone
 public Object clone()
Make a clone of this object

Returns:
A deep clone copy of this object
Overrides:
clone in class VrmlObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index