public class BrowserFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static X3DComponent |
createX3DComponent(java.util.Map<java.lang.String,java.lang.Object> params)
Create an X3D player that can be used as an AWT component.
|
static ExternalBrowser |
getBrowser(java.applet.Applet applet)
Get a browser from the given java applet reference as a base in the
current HTML page.
|
static ExternalBrowser |
getBrowser(java.applet.Applet applet,
java.lang.String frameName,
int index)
Get a browser from the given java applet reference one some named page and
at some embed location.
|
static ExternalBrowser |
getBrowser(java.net.InetAddress address,
int port)
Get a reference to a browser that is located on a remote machine.
|
static void |
setBrowserFactoryImpl(BrowserFactoryImpl fac)
Set the factory implementation to use.
|
public static void setBrowserFactoryImpl(BrowserFactoryImpl fac) throws java.lang.IllegalArgumentException, X3DException, java.lang.SecurityException
fac - - The new implementation to usejava.lang.SecurityException - The environment does not allow a factory
to be setjava.lang.IllegalArgumentException - The argument factory instance is nullX3DException - The factory is already defined.public static X3DComponent createX3DComponent(java.util.Map<java.lang.String,java.lang.Object> params) throws NotSupportedException
params - - Parameters to control the look and feel.NotSupportedException - The implementation does not support this
type of X3D player.X3DComponentpublic static ExternalBrowser getBrowser(java.applet.Applet applet) throws NotSupportedException, NoSuchBrowserException, ConnectionException
applet - The applet reference to useNotSupportedException - The implementation does not support this
type of X3D playerNoSuchBrowserException - Could not locate an X3D player on the
same page as the applet.ConnectionException - An error occurred during the connecting
processpublic static ExternalBrowser getBrowser(java.applet.Applet applet, java.lang.String frameName, int index) throws NotSupportedException, NoSuchBrowserException, ConnectionException
If the frame name is a zero length string or null then it is assumed to be located on the same HTML page as the applet. The index is the number of the embed X3D player starting from the top of the page. If there are other non-X3D plugins embedded in the page these are not taken into account in calculating the embed index.
applet - - The applet reference to useframeName - - The name of the frame to look into for the browserindex - - The embed index of the X3D player in the pageNotSupportedException - The implementation does not support this
type of X3D player.NoSuchBrowserException - Could not locate an X3D player on the
same page as the applet.ConnectionException - An error occurred during the connecting
processpublic static ExternalBrowser getBrowser(java.net.InetAddress address, int port) throws NotSupportedException, NoSuchBrowserException, java.net.UnknownHostException, ConnectionException
There is no default port number for X3D players.
address - - The address of the machine to connect toport - - The port number on that machine to connect to.NotSupportedException - The implementation does not support this
type of X3D player.NoSuchBrowserException - Could not locate an X3D player on the
same page as the applet.java.net.UnknownHostException - Could not find the machine named in the
address.ConnectionException - An error occurred during the connecting
processCopyright ©2005-2017 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.