home *** CD-ROM | disk | FTP | other *** search
Java Source | 2001-06-19 | 1.0 KB | 34 lines |
- package vrml;
-
- import vrml.Events;
- import vrml.Node;
- import vrml.Field;
- import vrml.fields.*;
- import vrml.exceptions.*;
-
- //
- // 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; thus, the exception codes for those exceptions are to be
- // determined by the script author.
- //
-
- public abstract class Script implements Node {
- public native void processEvents(Events [] events)
- throws Exception;
- public abstract void eventsProcessed()
- throws Exception; // Script:code is up to script author
-
- protected native Field getEventOut(String eventName)
- throws InvalidEventOutException;
- protected native Field getField(String fieldName)
- throws InvalidFieldException;
-
- public native ConstField getValue(String fieldName)
- throws InvalidFieldException;
- public native void postEventIn(String eventName, Field eventValue)
- throws InvalidEventInException;
-
- }
-