Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.ogl
Class OGLExternPrototypeDecl

java.lang.Object
  extended by org.web3d.vrml.nodes.proto.AbstractProto
      extended by org.web3d.vrml.nodes.proto.ExternalPrototypeDecl
          extended by org.web3d.vrml.renderer.CRExternPrototypeDecl
              extended by org.web3d.vrml.renderer.ogl.OGLExternPrototypeDecl
All Implemented Interfaces:
VRMLNodeTemplate, VRMLExternalNodeType, VRMLExternProtoDeclare, VRMLSingleExternalNodeType

public class OGLExternPrototypeDecl
extends CRExternPrototypeDecl

OpenGL-specific 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.

Version:
$Revision: 1.13 $
Author:
Alan Hudson

Field Summary
 
Fields inherited from class org.web3d.vrml.renderer.CRExternPrototypeDecl
errorReporter, inSetup, instanceList, loadState, nodeFactory, proto, stateManager, uriRef, vfUrl, worldURL, wrInstances
 
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, fieldDeclList, fieldIndexMap, fieldLocalData, 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
OGLExternPrototypeDecl(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 setContent(java.lang.String mimetype, java.lang.Object content)
          Set the content of this node to the given object.
 
Methods inherited from class org.web3d.vrml.renderer.CRExternPrototypeDecl
addInstance, checkValidContentType, finishSetContent, getLoadState, getProtoDefinition, getUrl, getWorldUrl, setErrorReporter, setFrameStateManager, setLoadedURI, setLoadState, setUrl, setWorldUrl
 
Methods inherited from class org.web3d.vrml.nodes.proto.ExternalPrototypeDecl
addContentStateListener, addUrlListener, createNewInstance, getPrimaryType, getProtoDetails, removeContentStateListener, removeUrlListener, 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
 

Constructor Detail

OGLExternPrototypeDecl

public OGLExternPrototypeDecl(java.lang.String name,
                              VRMLNodeFactory fac,
                              int majorVersion,
                              int minorVersion,
                              NodeTemplateToInstanceCreator creator)
Create a place holder that represents the given extern proto declaration.

Parameters:
name - The name applied to the proto decl in the file
fac - The factory to use for creating the instances
majorVersion - The major version number of this scene
minorVersion - The minor version number of this scene
creator - The node creator for generating instances of ourself
Method Detail

setContent

public void setContent(java.lang.String mimetype,
                       java.lang.Object content)
                throws java.lang.IllegalArgumentException
Set the content of this node to the given object. The object is then cast by the internal representation to the form it needs. This assumes at least some amount of intelligence on the part of the caller, but we also know that we should not pass something dumb to it when we can check what sort of content types it likes to handle. We assume the loader thread is operating in the same context as the one that created the node in the first place and thus knows the general types of items to pass through.

Specified by:
setContent in interface VRMLSingleExternalNodeType
Overrides:
setContent in class ExternalPrototypeDecl
Parameters:
mimetype - The mime type of this object if known
content - The content of the object
Throws:
IllegalArguementException - The content object is not supported
java.lang.IllegalArgumentException

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium