|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Abstract representation of a class that can be used to provide script lifecycle management facilities to the browser core.
The loader also takes part in the event model evaluation as well. For this,
it must hook into the URL change handling through the
VRMLUrlListener interface and participate
as part of the larger event model. Method calls are provided in this
interface for other classes
(eg EventModelEvaluator) to make
calls to at the appropriate time in the event model. This interface does
not extend the URLListener interface directly as it assumes that an
implementation may take other internal arrangements. It assumes that
listeners will be registered with the script nodes.
For VRML97/X3D conformant behaviour, the implied architecture of an implementation of this interface is 5 separate buckets of data:
| Method Summary | |
void |
addScripts(NodeArray list)
Queue the scripts to add to the scene. |
void |
eventsProcessed()
Notification that all of the processing is finished and that eventsProcessed() should now be called. |
void |
getProcessedScripts(NodeArray list)
Copy all the processed scripts to date into the given list. |
ScriptLoader |
getScriptLoader()
Get the current script loader to be used by this manager. |
void |
initializeScripts(double timestamp)
Initialise any newly loaded scripts and then put them into the completed basket. |
void |
prepareEvents(double timestamp)
Setup the scripts for the new timestamp. |
void |
processEvents()
Process any events that scripts need to send. |
void |
removeScripts(NodeArray list)
Remove this list of scripts from active service. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. |
void |
setScriptLoader(ScriptLoader ldr)
Set the script loader to be used by this manager. |
void |
shutdown()
Shutdown all scripts as the system is about to shutdown all of the current world and is starting again. |
void |
shutdownActiveScripts()
The loader should now shutdown any scripts that have had their set_url events called. |
| Method Detail |
public void setErrorReporter(ErrorReporter reporter)
reporter - The instance to use or nullpublic void setScriptLoader(ScriptLoader ldr)
ldr - The loader instance to usepublic ScriptLoader getScriptLoader()
public void shutdownActiveScripts()
public void shutdown()
public void initializeScripts(double timestamp)
timestamp - The VRML time that the initialisation occured atpublic void prepareEvents(double timestamp)
timestamp - The current time in VRML timepublic void processEvents()
public void eventsProcessed()
public void removeScripts(NodeArray list)
list - The list of scripts to removepublic void addScripts(NodeArray list)
list - the list of scripts to addpublic void getProcessedScripts(NodeArray list)
list - The list to copy values into
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||