java.lang.Object
com.trapezium.vrml.grammar.ScriptGutRule
- public class ScriptGutRule
- extends java.lang.Object
Creates the scene graph component for the internals of a Script node.
This is much different than other built in nodes because Script
nodes allow user defined interface (field) extensions.
Grammar handled by "Build" method:
scriptGut:
nodeGut
restrictedInterfaceDeclaration
eventIn fieldType eventInId IS eventInId
eventOut fieldType eventOutId IS eventOutId
field fieldType fieldId IS fieldId
- Since:
- 1.0
- Version:
- 1.12, 9 April 1998, made public, 1.1, 19 Jan 1998
|
Constructor Summary |
ScriptGutRule(NodeRule nodeRule)
Constructor for grammar rule that creates a Script field |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
protoRule
PROTORule protoRule
routeRule
ROUTERule routeRule
restrictedInterfaceDeclarationRule
RestrictedInterfaceDeclarationRule restrictedInterfaceDeclarationRule
fieldFactory
FieldFactory fieldFactory
nodeBodyRule
NodeBodyRule nodeBodyRule
ScriptGutRule
public ScriptGutRule(NodeRule nodeRule)
- Constructor for grammar rule that creates a Script field
Build
public void Build(int tokenOffset,
com.trapezium.parse.TokenEnumerator v,
com.trapezium.vrml.Scene scene,
com.trapezium.vrml.node.Node parent,
com.trapezium.vrml.node.PROTO protoParent)
- Build onto a Node by adding on individual NodeGuts
javascript
boolean javascript(int tokenOffset,
com.trapezium.parse.TokenEnumerator v)
addScriptFunctions
void addScriptFunctions(com.trapezium.vrml.node.Node parent,
int firstTokenOffset,
com.trapezium.parse.TokenEnumerator v)
- add Javascript functions direcly from token stream.
This is used when the Javascript is embedded directly in the VRML file
as part of the url string, using the "javascript: ..." format.
The tokens are examined one by noe until a token is found that
is not part of a quoted string. As tokens are examined, any functions
fuond are added to the parent node.