Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

vrml.node
Class Script  view Script download Script.java

java.lang.Object
  extended byvrml.BaseNode
      extended byvrml.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.


Field Summary
 
Fields inherited from class vrml.BaseNode
 
Constructor Summary
protected Script()
           
  Script(vrml.Browser browser, vrml.external.Node node)
           
 
Method Summary
 void eventsProcessed()
          eventsProcessed() is called after every invocation of processEvents().
protected  vrml.Field getEventIn(java.lang.String eventInName)
          Get an EventIn by name.
protected  vrml.Field getEventOut(java.lang.String eventOutName)
          Get an EventOut by name.
protected  vrml.Field getField(java.lang.String fieldName)
          Get a Field by name.
 void initialize()
          This method is called before any event is generated
 void processEvent(vrml.Event event)
          processEvent() is called automatically when the script receives an event.
 void processEvents(int count, vrml.Event[] events)
          processEvents() is called automatically when the script receives some set of events.
 void shutdown()
          shutdown() is called when this Script node is deleted.
 
Methods inherited from class vrml.BaseNode
getBrowser, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Script

protected Script()

Script

public Script(vrml.Browser browser,
              vrml.external.Node node)
Method Detail

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.