|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvrml.BaseNode
vrml.node.Script
public abstract class Script
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.
Constructor Summary | |
---|---|
Script()
|
Method Summary | |
---|---|
protected void |
dispose()
Destroy the native peer instance. |
void |
eventsProcessed()
Called after every invocation of processEvents(). |
protected void |
finalize()
Finalize. |
protected Field |
getEventIn(java.lang.String eventInName)
Get an EventIn by name. |
protected Field |
getEventOut(java.lang.String eventOutName)
Get an EventOut by name. |
protected Field |
getField(java.lang.String fieldName)
Get a Field by name. |
void |
initialize()
This method is called before any event is generated. |
void |
processEvent(Event event)
Called automatically when the script receives an event. |
void |
processEvents(int count,
Event[] events)
Called automatically when the script receives some set of events. |
void |
shutdown()
Called when the Script node is deleted. |
Methods inherited from class vrml.BaseNode |
---|
getBrowser, getType, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Script()
Method Detail |
---|
protected void dispose()
finalize()
.
If it is called before finalization, only finalize()
can safely be called on the instance subsequently.
dispose
in class BaseNode
protected void finalize() throws java.lang.Throwable
finalize
in class BaseNode
java.lang.Throwable
public void initialize()
protected final Field getField(java.lang.String fieldName) throws InvalidFieldException
fieldName
- Name of field to retrieve.
InvalidFieldException
- Invalid field name specified.protected final Field getEventOut(java.lang.String eventOutName) throws InvalidEventOutException
eventOutName
- Name of eventOut to retrieve.
InvalidEventOutException
- Invalid eventOut name specified.protected final Field getEventIn(java.lang.String eventInName) throws InvalidEventInException
eventInName
- Name of eventIn to retrieve.
InvalidEventInException
- Invalid eventIn name specified.public void processEvents(int count, Event[] events)
count
- Number of events delivered.events
- Array of events to process.public void processEvent(Event event)
public void eventsProcessed()
public void shutdown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |