java.lang.Object
vrml.BaseNode
vrml.node.Script
- public class Script
- extends vrml.BaseNode
This is the general Script class, to be subclassed by all scripts.
Note that the provided methods allow the script author to explicitly
throw tailored exceptions in case something goes wrong in the
script.
| Fields inherited from class vrml.BaseNode |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Script
protected Script()
Script
public Script(vrml.Browser browser,
vrml.external.Node node)
initialize
public void initialize()
- This method is called before any event is generated
getField
protected final vrml.Field getField(java.lang.String fieldName)
- Get a Field by name.
Throws an InvalidFieldException if fieldName isn't a valid
field name for a node of this type.
getEventOut
protected final vrml.Field getEventOut(java.lang.String eventOutName)
- Get an EventOut by name.
Throws an InvalidEventOutException if eventOutName isn't a valid
eventOut name for a node of this type.
getEventIn
protected final vrml.Field getEventIn(java.lang.String eventInName)
- Get an EventIn by name.
Throws an InvalidEventInException if eventInName isn't a valid
eventIn name for a node of this type.
processEvents
public void processEvents(int count,
vrml.Event[] events)
- processEvents() is called automatically when the script receives
some set of events. It shall not be called directly except by its subclass.
count indicates the number of events delivered.
processEvent
public void processEvent(vrml.Event event)
- processEvent() is called automatically when the script receives
an event.
eventsProcessed
public void eventsProcessed()
- eventsProcessed() is called after every invocation of processEvents().
shutdown
public void shutdown()
- shutdown() is called when this Script node is deleted.