org.xj3d.ui.awt.device
Class AWTDeviceFactory
java.lang.Object
org.xj3d.core.eventmodel.DeviceFactory
org.xj3d.ui.awt.device.AWTDeviceFactory
public class AWTDeviceFactory
- extends DeviceFactory
A concrete implementation of DeviceFactory that is
specific to the AWT UI toolkit. Devices created through
this factory are initialized with the appropriate AWT
event listeners.
- Version:
- $Revision: 1.7 $
- Author:
- Rex Melton
|
Constructor Summary |
AWTDeviceFactory(java.lang.Object canvas,
java.lang.String rendererID,
java.lang.Object surface,
ErrorReporter reporter)
Constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AWTDeviceFactory
public AWTDeviceFactory(java.lang.Object canvas,
java.lang.String rendererID,
java.lang.Object surface,
ErrorReporter reporter)
- Constructor.
- Parameters:
canvas - - The Object representing the ui toolkit
specific graphical component. Must be an instance of
java.awt.Component.rendererID - - Identifier String of the renderer type.surface - - The Object representing the renderer
specific drawing surface.reporter - - The instance to use or null. A value of null
will clear the currently set reporter and causes the factory
to use the DefaultErrorReporter.
- Throws:
java.lang.IllegalArgumentException - if the canvas Object is not
an instance of java.awt.Component.
getDeviceManagers
public DeviceManager[] getDeviceManagers()
- Return the array of DeviceManagers that are available per the
constructor parameters. The InputDevices instantiated will be
initialized with the AWT ui toolkit event listeners.
- Specified by:
getDeviceManagers in class DeviceFactory
- Returns:
- the array of DeviceManagers. If no DeviceManagers are
available, an empty (size 0) array is returned.
getKeySensorDevice
public KeySensorDevice getKeySensorDevice()
- Return the KeySensorDevice associated with the rendering surface
initialized with the AWT key event listener.
- Specified by:
getKeySensorDevice in class DeviceFactory
- Returns:
- the KeySensorDevice
Copyright © 2001 - 2006 Web3D Consortium