|
Xj3D 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.nodes.proto.AbstractProto
org.web3d.vrml.nodes.proto.ExternalPrototypeDecl
org.web3d.vrml.renderer.CRExternPrototypeDecl
A CR External Prototype Declaration.
This node will be placed on the content loader. Instances of this EP will go into the scenegraph as stubs. When this EP is loaded it will finish creating those instances.
| Field Summary | |
protected ErrorReporter |
errorReporter
Reporter instance for handing out errors |
protected boolean |
inSetup
Flag indicating we are in setup mode currently |
protected java.util.ArrayList |
instanceList
List of EP instances to fill in. |
protected int |
loadState
The state of the load |
protected VRMLNodeFactory |
nodeFactory
The node factory used to create real node instances |
protected VRMLNodeTemplate |
proto
The prototype declaration that we always use |
protected FrameStateManager |
stateManager
Frame state manager for this event model instance |
protected java.lang.String |
uriRef
The reference part of the URI loaded |
protected java.lang.String[] |
vfUrl
url field |
protected java.lang.String |
worldURL
The world URL for correcting relative URL values |
protected java.util.ArrayList |
wrInstances
List of EP instances. |
| Fields inherited from class org.web3d.vrml.nodes.proto.ExternalPrototypeDecl |
loadedURI |
| Fields inherited from class org.web3d.vrml.nodes.proto.AbstractProto |
BAD_NODE_MSG, FIELD_CLASH_MSG, fieldData, fieldDeclList, fieldIndexMap, isVrml97, nodeName, protoCreator, VRML97_FIELD_MSG, vrmlMajorVersion, vrmlMinorVersion |
| Fields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType |
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED |
| Constructor Summary | |
CRExternPrototypeDecl(java.lang.String name,
VRMLNodeFactory fac,
int majorVersion,
int minorVersion,
NodeTemplateToInstanceCreator creator)
Create a place holder that represents the given extern proto declaration. |
|
| Method Summary | |
void |
addInstance(VRMLNodeType parent,
int idx,
VRMLNodeType node)
Add an instance of a EXTERNPROTO to be filled out when loaded |
boolean |
checkValidContentType(java.lang.String mimetype)
Check to see if the given MIME type is one that would be supported as content coming into this node. |
protected void |
finishSetContent(PrototypeDecl protoDef,
CRProtoCreator protoCreator,
VRMLExecutionSpace rootSpace)
Finish off the creation process of the generic externproto handling. |
int |
getLoadState()
Ask the state of the load of this node. |
VRMLNodeTemplate |
getProtoDefinition()
Get the PROTO/EXTERNPROTO definition used by this place holder. |
java.lang.String[] |
getUrl()
Fetch the set values for the URL(s) of the externproto definition. |
java.lang.String |
getWorldUrl()
Get the world URL so set for this node. |
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. |
void |
setFrameStateManager(FrameStateManager mgr)
Set the frame state manager to be used by this proto instance. |
void |
setLoadedURI(java.lang.String URI)
Notify the node which URL was used to load the content. |
void |
setLoadState(int state)
Set the load state of the node. |
void |
setUrl(java.lang.String[] newUrl,
int numValid)
Set the URL list that describes the sources for this externproto. |
void |
setWorldUrl(java.lang.String url)
Set the world URL so that any relative URLs may be corrected to the fully qualified version. |
| Methods inherited from class org.web3d.vrml.nodes.proto.ExternalPrototypeDecl |
addContentStateListener, addUrlListener, createNewInstance, getPrimaryType, getProtoDetails, removeContentStateListener, removeUrlListener, setContent, setProtoDetails |
| Methods inherited from class org.web3d.vrml.nodes.proto.AbstractProto |
addNodeListener, appendField, checkNodeType, deleteField, deleteField, fireFieldChanged, getAllFields, getFieldCount, getFieldDeclaration, getFieldIndex, getNumFields, getVRMLNodeName, isVRML97, removeNodeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.web3d.vrml.lang.VRMLNodeTemplate |
appendField, deleteField, deleteField, getAllFields, getFieldCount, getFieldDeclaration, getFieldIndex, getNumFields, getVRMLNodeName |
| Field Detail |
protected VRMLNodeTemplate proto
protected boolean inSetup
protected java.lang.String[] vfUrl
protected java.lang.String worldURL
protected int loadState
protected VRMLNodeFactory nodeFactory
protected java.util.ArrayList instanceList
protected java.util.ArrayList wrInstances
protected java.lang.String uriRef
protected FrameStateManager stateManager
protected ErrorReporter errorReporter
| Constructor Detail |
public CRExternPrototypeDecl(java.lang.String name,
VRMLNodeFactory fac,
int majorVersion,
int minorVersion,
NodeTemplateToInstanceCreator creator)
name - The name of the declaration to base this placeholder onfac - The factory to use for creating the instancesmajorVersion - The major version number of this sceneminorVersion - The minor version number of this scenecreator - The node creator for generating instances of ourself| Method Detail |
public void setErrorReporter(ErrorReporter reporter)
setErrorReporter in interface VRMLNodeTemplatesetErrorReporter in class AbstractProtoreporter - The instance to use or null
public void addInstance(VRMLNodeType parent,
int idx,
VRMLNodeType node)
parent - The parent node for this EPidx - The field indexnode - The instancepublic void setFrameStateManager(FrameStateManager mgr)
mgr - The manager instance to usepublic VRMLNodeTemplate getProtoDefinition()
public int getLoadState()
getLoadState in interface VRMLSingleExternalNodeTypegetLoadState in class ExternalPrototypeDeclpublic void setLoadState(int state)
setLoadState in interface VRMLSingleExternalNodeTypesetLoadState in class ExternalPrototypeDeclstate - The new state of the nodepublic void setWorldUrl(java.lang.String url)
setWorldUrl in interface VRMLExternalNodeTypesetWorldUrl in class ExternalPrototypeDeclurl - The world URL.public java.lang.String getWorldUrl()
getWorldUrl in interface VRMLExternalNodeTypegetWorldUrl in class ExternalPrototypeDeclpublic boolean checkValidContentType(java.lang.String mimetype)
checkValidContentType in interface VRMLSingleExternalNodeTypecheckValidContentType in class ExternalPrototypeDeclmimetype - The type to check for
public void setLoadedURI(java.lang.String URI)
setLoadedURI in interface VRMLSingleExternalNodeTypesetLoadedURI in class ExternalPrototypeDeclURI - The URI used to load this content
public void setUrl(java.lang.String[] newUrl,
int numValid)
setUrl in interface VRMLSingleExternalNodeTypesetUrl in class ExternalPrototypeDeclnewUrl - The list of URLs to usenumValid - The number of valid items to use from the array
java.lang.RuntimeException - Attempting to change the URL at runtimepublic java.lang.String[] getUrl()
getUrl in interface VRMLSingleExternalNodeTypegetUrl in class ExternalPrototypeDecl
protected void finishSetContent(PrototypeDecl protoDef,
CRProtoCreator protoCreator,
VRMLExecutionSpace rootSpace)
protoDef - The declaration to build stuff fromprotoCreator - The creator used to copy the noderootSpace - Parent execution space that this instance belongs to
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||