Xj3D 2.0 VRML/X3D Code API

org.web3d.x3d.sai
Interface X3DScriptImplementation

All Known Subinterfaces:
X3DPerFrameObserverScript

public interface X3DScriptImplementation

Marker interface to say that the implementing class is allowed to be executed as a script within the X3D scene graph.

Version:
$Revision: 1.7 $
Author:
Justin Couch

Method Summary
 void eventsProcessed()
          Notification that all the events in the current cascade have finished processing.
 void initialize()
          Notificatoin that the script has completed the setup and should go about its own internal initialisation.
 void setBrowser(Browser browser)
          Set the browser instance to be used by this script implementation.
 void setFields(X3DScriptNode externalView, java.util.Map fields)
          Set the listing of fields that have been declared in the file for this node.
 void shutdown()
          Notification that this script instance is no longer in use by the scene graph and should now release all resources.
 

Method Detail

setBrowser

void setBrowser(Browser browser)
Set the browser instance to be used by this script implementation. This shall be called by the browser code to give the script a handle to the browser's interface. It shall be only called once in the lifetime of a script implementation before the initialize() method is called.

Parameters:
browser - The browser reference to keep

setFields

void setFields(X3DScriptNode externalView,
               java.util.Map fields)
Set the listing of fields that have been declared in the file for this node. The map contains field name string to field object instances. If no fields are available, then this method shall still be called, but with an empty map.

Parameters:
externalView - The external view of ourselves, so you can add routes to yourself using the standard API calls
fields - The mapping of field names to instances

initialize

void initialize()
Notificatoin that the script has completed the setup and should go about its own internal initialisation. This shall be called after the setBrowser(Browser) and setFields(X3DScriptNode, Map) methods have been called.


shutdown

void shutdown()
Notification that this script instance is no longer in use by the scene graph and should now release all resources.


eventsProcessed

void eventsProcessed()
Notification that all the events in the current cascade have finished processing.


Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium