Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.sav
Interface ScriptHandler

All Known Subinterfaces:
SceneBuilder
All Known Implementing Classes:
BaseRetainedExporter, BinaryExporter, CRExternProtoBuilder, CRMainSceneBuilder, Exporter, NRExternProtoBuilder, NRVRMLSceneBuilder, NullExporter, OGLExternProtoBuilder, OGLVRMLSceneBuilder, ProtoBuilder, StatisticsCollector, X3DBinaryRetainedDirectExporter, X3DBinaryRetainedExporter, X3DClassicExporter, X3DClassicRetainedExporter, X3DRetainedSAXExporter, X3DXMLExporter, X3DXMLRetainedExporter

public interface ScriptHandler

Receiver of notifications from the VRML document about script declaration information.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Method Summary
 void endScriptDecl()
          Notification of the end of a script declaration.
 void scriptFieldDecl(int access, java.lang.String type, java.lang.String name, java.lang.Object value)
          Notification of a script's field declaration.
 void startScriptDecl()
          Notification of the start of a script declaration.
 

Method Detail

startScriptDecl

void startScriptDecl()
                     throws SAVException,
                            VRMLException
Notification of the start of a script declaration. All calls between now and the corresponding endScriptDecl() call belong to this script node. This method will be called after the ContentHandler startNode() method call. All DEF information is contained in that method call and this just signifies the start of script processing so that we know to treat the field parsing callbacks a little differently.

Throws:
SAVException - This call is taken at the wrong time in the structure of the document.
VRMLException - This call is taken at the wrong time in the structure of the document.

endScriptDecl

void endScriptDecl()
                   throws SAVException,
                          VRMLException
Notification of the end of a script declaration. This is guaranteed to be called before the ContentHandler endNode() callback.

Throws:
SAVException - This call is taken at the wrong time in the structure of the document.
VRMLException - This call is taken at the wrong time in the structure of the document.

scriptFieldDecl

void scriptFieldDecl(int access,
                     java.lang.String type,
                     java.lang.String name,
                     java.lang.Object value)
                     throws SAVException,
                            VRMLException
Notification of a script's field declaration. This is used for all fields except url, mustEvaluate and directOutput fields. These fields use the normal field callbacks of ContentHandler.

If the current parsing is in a proto and the field "value" is defined with an IS statement then the value returned here is null. There will be a subsequent call to the ProtoHandlers protoIsDecl() method with the name of the field included.

Parameters:
access - The access type (eg exposedField, field etc)
type - The field type (eg SFInt32, MFVec3d etc)
name - The name of the field
value - The default value of the field as either String or String[]. Null if not allowed.
Throws:
SAVException - This call is taken at the wrong time in the structure of the document.
VRMLException - This call is taken at the wrong time in the structure of the document.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium