|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Browser
Basic browser interface that represents the interface to the VRML browser from any application.
Individual VRML browser implementors are to extend this interface and provide this functionality. The individual users will not see anything but this interface.
A number of the methods in this applicationcan take strings representing URLs. Relative URL strings contained in URL fields of nodes or these method arguments are interpreted as follows:
Relative URLs are treated as per clause B.3.5 of the EAI Java Bindings
| Method Summary | |
|---|---|
X3DScene |
createScene(ProfileInfo profile,
ComponentInfo[] components)
Create a new, empty scene that can be used to programmatically fill in new scenes. |
X3DScene |
createX3DFromStream(java.io.InputStream is)
Parse the contents of the stream and interpret it as X3D content. |
X3DScene |
createX3DFromString(java.lang.String x3dString)
Parse the given string and turn this into a list of X3D nodes. |
X3DScene |
createX3DFromURL(java.lang.String[] url)
Create and load X3D from the given URL. |
void |
firstViewpoint()
Bind the first viewpoint in the list. |
void |
firstViewpoint(int layer)
Bind the first viewpoint in the list of the given layer. |
java.util.Map |
getBrowserProperties()
Get the collection of browser properties that the browser provides. |
ComponentInfo |
getComponent(java.lang.String name,
int level)
Get a specific component at the requested support level. |
float |
getCurrentFrameRate()
Get the current frame rate of the browser in frames per second. |
float |
getCurrentSpeed()
Get the current velocity of the bound viewpoint in meters per second. |
java.lang.String |
getDescription()
Get the description of the current world. |
X3DExecutionContext |
getExecutionContext()
Get the information about the current scene. |
java.lang.String |
getName()
Get the name of the browser. |
ProfileInfo |
getProfile(java.lang.String name)
Get a specific profile. |
java.util.Map |
getRenderingProperties()
Get the collection of rendering properties that the browser provides. |
ComponentInfo[] |
getSupportedComponents()
Get a listing of all the components that this browser implementation is capable of supporting. |
ProfileInfo[] |
getSupportedProfiles()
Get a listing of the profiles that this browser implementation is capable of supporting. |
java.lang.String |
getVersion()
Get the version of the browser. |
X3DScene |
importDocument(org.w3c.dom.Node element)
A utility request to import a W3C DOM document or document fragment and convert it to an X3D scene. |
void |
lastViewpoint()
Bind the last viewpoint in the list. |
void |
lastViewpoint(int layer)
Bind the last viewpoint in the list of the given layer. |
void |
loadURL(java.lang.String[] url,
java.util.Map parameters)
Load the URL as the new root of the scene. |
void |
nextViewpoint()
Bind the next viewpoint in the list. |
void |
nextViewpoint(int layer)
Bind the next viewpoint in the list of the given layer. |
void |
previousViewpoint()
Bind the previous viewpoint in the list. |
void |
previousViewpoint(int layer)
Bind the previous viewpoint in the list of the given layer. |
void |
print(java.lang.Object msg)
Print the message to the browser console without wrapping a new line onto it. |
void |
println(java.lang.Object msg)
Print the message to the browser console and append a new line onto it. |
void |
replaceWorld(X3DScene scene)
Replace the current world with the given nodes. |
void |
setDescription(java.lang.String desc)
Set the description of the current world. |
| Method Detail |
|---|
java.lang.String getName()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
java.lang.String getVersion()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
ProfileInfo[] getSupportedProfiles()
throws InvalidBrowserException
ConnectionException - An error occurred in the connection to the
browser.
InvalidBrowserException
ProfileInfo getProfile(java.lang.String name)
throws InvalidBrowserException,
NotSupportedException
name - The profile name
ConnectionException - An error occurred in the connection to the
browser.
NotSupportedException - The reqested profile is not supported
InvalidBrowserException
ComponentInfo[] getSupportedComponents()
throws InvalidBrowserException
ConnectionException - An error occurred in the connection to the
browser.
InvalidBrowserException
ComponentInfo getComponent(java.lang.String name,
int level)
throws InvalidBrowserException,
NotSupportedException
name - The component namelevel - The minimum component level
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
NotSupportedException - The reqested profile is not supported
X3DExecutionContext getExecutionContext()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
X3DScene createScene(ProfileInfo profile,
ComponentInfo[] components)
throws InvalidBrowserException,
java.lang.IllegalArgumentException
profile - The profile to use for this scene or null for nonecomponents - The list of components to use or null
InvalidBrowserException - The dispose method has been called on
this browser reference.
java.lang.IllegalArgumentException - Both arguments provided are null or
zero length
float getCurrentSpeed()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
float getCurrentFrameRate()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
void replaceWorld(X3DScene scene)
throws InvalidBrowserException
Calling this method causes a SHUTDOWN event followed by an INITIALIZED event to be generated.
scene - The new scene to render in the browser
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
void loadURL(java.lang.String[] url,
java.util.Map parameters)
throws InvalidBrowserException,
InvalidURLException
Generates an immediate SHUTDOWN event and then when the new contents are ready to be loaded, sends an INITIALIZED event.
url - The list of URLs in decreasing order of preference as defined
in the VRML97 specification.parameters - The list of parameters to accompany the load call as
defined in the Anchor node specification of VRML97
InvalidBrowserException - The dispose method has been called on
this browser reference.
InvalidURLException - All of the URLs passed to this method are
bogus and cannot be translated to usable values
ConnectionException - An error occurred in the connection to the
browser.
java.lang.String getDescription()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
void setDescription(java.lang.String desc)
throws InvalidBrowserException
desc - The description string to set.
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
X3DScene createX3DFromString(java.lang.String x3dString)
throws InvalidBrowserException,
InvalidX3DException
At the point that this method returns, external files such as textures, sounds and inlines may not have been loaded.
The string may contain all legal X3D syntax - either UTF8 or XML encoding. The X3D header line is not required to be present in the string if UTF8 syntax.
x3dString - The string containing VRML string syntax
InvalidX3DException - If the string does not contain legal
X3D/VRML syntax or no node instantiations
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
X3DScene createX3DFromStream(java.io.InputStream is)
throws InvalidBrowserException,
InvalidX3DException,
java.io.IOException
is - The input stream that contains the content to parse
InvalidX3DException - If the string does not contain legal
X3D/VRML syntax or no node instantiations
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
java.io.IOException - An I/O Error occurred while reading the stream
X3DScene createX3DFromURL(java.lang.String[] url)
throws InvalidBrowserException,
InvalidURLException,
InvalidX3DException
url - The list of URLs in decreasing order of preference as defined
in the VRML97/X3D specification.
InvalidX3DException - If the string does not contain legal
X3D/VRML syntax or no node instantiations
InvalidBrowserException - The dispose method has been called on
this browser reference.
InvalidURLException - All of the URLs passed to this method are
bogus and cannot be translated to usable values
ConnectionException - An error occurred in the connection to the
browser.
X3DScene importDocument(org.w3c.dom.Node element)
throws InvalidBrowserException,
InvalidDocumentException,
NotSupportedException
element - The root element to convert
InvalidBrowserException - The dispose method has been called on
this browser reference.
InvalidDocumentException - The document structure cannot be
converted to an X3D scene for some reason
NotSupportedException
void print(java.lang.Object msg)
throws InvalidBrowserException
msg - The object to be printed
InvalidBrowserException - The dispose method has been called on
this browser reference.
void println(java.lang.Object msg)
throws InvalidBrowserException
msg - The object to be printed
InvalidBrowserException - The dispose method has been called on
this browser reference.
void nextViewpoint()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void nextViewpoint(int layer)
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void previousViewpoint()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void previousViewpoint(int layer)
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void firstViewpoint()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void firstViewpoint(int layer)
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void lastViewpoint()
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
void lastViewpoint(int layer)
throws InvalidBrowserException
InvalidBrowserException - The dispose method has been called on
this browser reference.
java.util.Map getRenderingProperties()
throws InvalidBrowserException,
InvalidOperationTimingException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
InvalidOperationTimingException - This was not called during the
correct timing during a script (may be called at any time from
external)
java.util.Map getBrowserProperties()
throws InvalidBrowserException,
InvalidOperationTimingException
InvalidBrowserException - The dispose method has been called on
this browser reference.
ConnectionException - An error occurred in the connection to the
browser.
InvalidOperationTimingException - This was not called during the
correct timing during a script (may be called at any time from
external)
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||