Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.vrml.grammar
Class ScriptGutRule  view ScriptGutRule download ScriptGutRule.java

java.lang.Object
  extended bycom.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

Field Summary
(package private)  FieldFactory fieldFactory
           
(package private)  NodeBodyRule nodeBodyRule
           
(package private)  PROTORule protoRule
           
(package private)  RestrictedInterfaceDeclarationRule restrictedInterfaceDeclarationRule
           
(package private)  ROUTERule routeRule
           
 
Constructor Summary
ScriptGutRule(NodeRule nodeRule)
          Constructor for grammar rule that creates a Script field
 
Method Summary
(package private)  void addScriptFunctions(com.trapezium.vrml.node.Node parent, int firstTokenOffset, com.trapezium.parse.TokenEnumerator v)
          add Javascript functions direcly from token stream.
 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
(package private)  boolean javascript(int tokenOffset, com.trapezium.parse.TokenEnumerator v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protoRule

PROTORule protoRule

routeRule

ROUTERule routeRule

restrictedInterfaceDeclarationRule

RestrictedInterfaceDeclarationRule restrictedInterfaceDeclarationRule

fieldFactory

FieldFactory fieldFactory

nodeBodyRule

NodeBodyRule nodeBodyRule
Constructor Detail

ScriptGutRule

public ScriptGutRule(NodeRule nodeRule)
Constructor for grammar rule that creates a Script field

Method Detail

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.