Package org.xj3d.ui.awt.device
Class AWTDeviceFactory
java.lang.Object
org.xj3d.core.eventmodel.DeviceFactory
org.xj3d.ui.awt.device.AWTDeviceFactory
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.8 $
- Author:
- Rex Melton
-
Field Summary
Fields inherited from class org.xj3d.core.eventmodel.DeviceFactory
canvas, errorReporter, rendererID, surface, toolkitID
-
Constructor Summary
ConstructorsConstructorDescriptionAWTDeviceFactory
(Object canvas, String rendererID, Object surface, org.j3d.util.ErrorReporter reporter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.j3d.device.input.DeviceManager[]
Return the array of DeviceManagers that are available per the constructor parameters.Return the KeySensorDevice associated with the rendering surface initialized with the AWT key event listener.Methods inherited from class org.xj3d.core.eventmodel.DeviceFactory
createDevices, setErrorReporter
-
Constructor Details
-
AWTDeviceFactory
public AWTDeviceFactory(Object canvas, String rendererID, Object surface, org.j3d.util.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:
IllegalArgumentException
- if the canvas Object is not an instance of java.awt.Component.
-
-
Method Details
-
getDeviceManagers
public org.j3d.device.input.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 classDeviceFactory
- Returns:
- the array of DeviceManagers. If no DeviceManagers are available, an empty (size 0) array is returned.
-
getKeySensorDevice
Return the KeySensorDevice associated with the rendering surface initialized with the AWT key event listener.- Specified by:
getKeySensorDevice
in classDeviceFactory
- Returns:
- the KeySensorDevice
-