Package org.xj3d.ui.awt.browser.ogl
Class X3DNRBrowserFactoryImpl
java.lang.Object
org.xj3d.ui.awt.browser.ogl.X3DNRBrowserFactoryImpl
- All Implemented Interfaces:
BrowserFactoryImpl
,X3DComponent
Factory implementation for X3D SAI which will produce components using
the Null renderer.
Component Creation
This implementation allows you to create a new component that is ready to place content in. Parameters can be supplied in the Map as defined by the SAI. The first column is the parameter name string, the second is the type of data, and the third is an explanation.
- Version:
- $Revision: 1.7 $
- Author:
- Alan Hudson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateComponent
(Map<String, Object> params) Create a VRML browser that can be used as an AWT component.Get a browser reference from this component that represents the internals of this browser.getBrowser
(Applet applet) Get a browser from the given java applet reference as a base in the current HTML page.getBrowser
(Applet applet, String frameName, int index) Get a browser from the given java applet reference one some named page and at some embed location.getBrowser
(InetAddress address, int port) Get a reference to a browser that is located on a remote machine.Get a reference to the component implementation.getScene()
Get the scene object being rendered by this panel.Get the universe underlying this panel.void
Change the panels content to the provided URL.void
loadURL
(InputSource src) Change the panels content to the provided URL.void
shutdown()
Shutdown the component because it will no longer be needed.
-
Field Details
-
loadManager
The loadManager
-
-
Constructor Details
-
X3DNRBrowserFactoryImpl
public X3DNRBrowserFactoryImpl()Create a new instance of this factory.
-
-
Method Details
-
createComponent
Description copied from interface:BrowserFactoryImpl
Create a VRML browser that can be used as an AWT component. The component returned is guaranteed to be an instance of X3DComponent.- Specified by:
createComponent
in interfaceBrowserFactoryImpl
- Parameters:
params
- Parameters to control the look and feel.- Returns:
- The component browser initialised to be empty.
- Throws:
NotSupportedException
- The implementation does not support this type of browser.- See Also:
-
getBrowser
public ExternalBrowser getBrowser(Applet applet) throws NotSupportedException, NoSuchBrowserException, ConnectionException Description copied from interface:BrowserFactoryImpl
Get a browser from the given java applet reference as a base in the current HTML page. Used when attempting to access a browser on the current page as this applet and is the first browser on the page. Generically, the same as calling getBrowser(applet, "", 0);- Specified by:
getBrowser
in interfaceBrowserFactoryImpl
- Parameters:
applet
- The applet reference to use- Returns:
- A reference to the Browser implementation
- Throws:
NotSupportedException
- The implementation does not support this type of VRML browserNoSuchBrowserException
- Could not locate a VRML browser on the same page as the applet.ConnectionException
- An error occurred during the connecting process
-
getBrowser
public ExternalBrowser getBrowser(Applet applet, String frameName, int index) throws NotSupportedException, NoSuchBrowserException, ConnectionException Description copied from interface:BrowserFactoryImpl
Get a browser from the given java applet reference one some named page and at some embed location. Used when attempting to access a browser on another HTML page within a multi-framed environment, or if there are a number of VRML browser instances located on the same page.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 VRML browser starting from the top of the page. If there are other non-VRML plugins embedded in the page these are not taken into account in calculating the embed index.
- Specified by:
getBrowser
in interfaceBrowserFactoryImpl
- Parameters:
applet
- The applet reference to useframeName
- The name of the frame to look into for the browserindex
- The embed index of the VRML browser in the page- Returns:
- A reference to the Browser implementation
- Throws:
NotSupportedException
- The implementation does not support this type of VRML browser.NoSuchBrowserException
- Could not locate a VRML browser on the same page as the applet.ConnectionException
- An error occurred during the connecting process
-
getBrowser
public ExternalBrowser getBrowser(InetAddress address, int port) throws NotSupportedException, NoSuchBrowserException, UnknownHostException, ConnectionException Description copied from interface:BrowserFactoryImpl
Get a reference to a browser that is located on a remote machine. This a server application to send scene updates to a number of client browsers located on remote machines. If there are a number of browsers running on a remote machine, they can be differentiated by the port number they are listening on.There is no default port number for VRML browsers.
- Specified by:
getBrowser
in interfaceBrowserFactoryImpl
- Parameters:
address
- The address of the machine to connect toport
- The port number on that machine to connect to.- Returns:
- A reference to the Browser implementation
- Throws:
UnknownHostException
NotSupportedException
- The implementation does not support this type of VRML browser.NoSuchBrowserException
- Could not locate a VRML browser on the same page as the applet.ConnectionException
- An error occurred during the connecting process- See Also:
-
getBrowser
Description copied from interface:X3DComponent
Get a browser reference from this component that represents the internals of this browser.- Specified by:
getBrowser
in interfaceX3DComponent
- Returns:
- A reference to the browser object represented by this component.
- See Also:
-
getImplementation
Description copied from interface:X3DComponent
Get a reference to the component implementation. For example, if this is an AWT component, it would return an instance ofComponent
.- Specified by:
getImplementation
in interfaceX3DComponent
- Returns:
- a reference to the component implementation
- See Also:
-
shutdown
public void shutdown()Description copied from interface:X3DComponent
Shutdown the component because it will no longer be needed. If the component has already had this method called, it will silently ignore any further requests.- Specified by:
shutdown
in interfaceX3DComponent
- See Also:
-
getScene
Get the scene object being rendered by this panel.- Returns:
- The current scene.
-
getUniverse
Get the universe underlying this panel.- Returns:
- The universe.
-
loadURL
Change the panels content to the provided URL.- Parameters:
url
- The URL to load.- Throws:
IOException
- On a failed load or badly formatted URL
-
loadURL
Change the panels content to the provided URL.- Parameters:
src
- the source to load the content from- Throws:
IOException
- On a failed load or badly formatted URL
-