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
-
Script(boolean, boolean, FieldDefinition[])
- Default Constructor
-
cleanup()
- Call when about to remove the node from the scenegraph.
-
clone()
- Make a clone of this object
-
get_directOutput()
- Get the value of the directOutput field
-
get_MFfield(String)
- Get the value of the MF field that the name represents.
-
get_mustEvaluate()
- Get the value of the mustEvaluate field
-
get_SFfield(String)
- Get the value of the SF field that the name represents.
-
get_url()
- Get the list of URLs that this node is currently using
-
set_MFField(String, Object[])
- Set the value of a MF field.
-
set_SFField(String, Object)
- Set the value of a SF field.
-
set_url(String[])
- Set the list of URLs for the source of the sound
-
writeToStream(int)
- Prints the formatted contents of this node to the given stream.
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.
cleanup
public void cleanup()
- Call when about to remove the node from the scenegraph.
- Overrides:
- cleanup in class VrmlObject
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
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
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
get_directOutput
public boolean get_directOutput()
- Get the value of the directOutput field
- Returns:
- True if directOutput is enabled, false if not
get_mustEvaluate
public boolean get_mustEvaluate()
- Get the value of the mustEvaluate field
- Returns:
- True if mustEvaluate is enabled, false if not
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.
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
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.
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
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