|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.scripting.ecmascript.ECMAScriptEngine
public class ECMAScriptEngine
A scripting engine that provides capabilities for X3D ECMAScript.
The setup process uses delayed loading of the Javascript interpreter. It won't actually initialise Rhino until the first script wrapper needs to be built.
| Constructor Summary | |
|---|---|
ECMAScriptEngine(BrowserCore browser,
ViewpointManager vpm,
RouteManager rm,
FrameStateManager fsm,
WorldLoaderManager wlm)
Construct a new script engine with a reference to the enclosing browser. |
|
| Method Summary | |
|---|---|
ScriptWrapper |
buildWrapper(VRMLExecutionSpace space,
java.lang.String contentType,
java.lang.Object content)
Create a wrapper for the given script content. |
java.lang.String[] |
getSupportedContentTypes()
Get a listing of the content types that this engine implementation can handle. |
int |
getSupportedSpecificationVersion()
Get the version of the specification that this engine implementation supports. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the script code can be reported in a nice, pretty fashion. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ECMAScriptEngine(BrowserCore browser,
ViewpointManager vpm,
RouteManager rm,
FrameStateManager fsm,
WorldLoaderManager wlm)
browser - The core representation of the browservpm - The manager for viewpointsrm - A route manager for users creating/removing routesfsm - The per-frame state managerwlm - Loader for full files
java.lang.IllegalArgumentException - The browser reference is null| Method Detail |
|---|
public int getSupportedSpecificationVersion()
getSupportedSpecificationVersion in interface ScriptEnginepublic java.lang.String[] getSupportedContentTypes()
getSupportedContentTypes in interface ScriptEngine
public ScriptWrapper buildWrapper(VRMLExecutionSpace space,
java.lang.String contentType,
java.lang.Object content)
throws InvalidScriptContentException
buildWrapper in interface ScriptEnginespace - The execution space this script belongs tocontentType - The MIME type of the enginecontent - The actual content loaded from a stream
InvalidScriptContentException - The form of the content does
not match the requirements of the engine.public void setErrorReporter(ErrorReporter reporter)
setErrorReporter in interface ScriptEnginereporter - The instance to use or null
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||