Package org.xj3d.core.eventmodel
Class DeviceFactory
java.lang.Object
org.xj3d.core.eventmodel.DeviceFactory
- Direct Known Subclasses:
AWTDeviceFactory
Partial implementation of a DeviceFactory, with plumbing in place
for the ui toolkit specific implementation to create pointing and
key sensor devices.
- Version:
- $Revision: 1.6 $
- Author:
- Rex Melton
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
The toolkit specific object that is the source of device eventsprotected org.j3d.util.ErrorReporter
The class that handles external error messagingprotected String
The identifier String of the renderer typeprotected Object
The renderer specific object, used for instantiating certain DeviceManagersprotected String
The identifier String of the ui toolkit type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate and return the List of InputDevices defined in the the default properties file.abstract org.j3d.device.input.DeviceManager[]
Return the array of DeviceManagers that are available per the constructor parameters.abstract KeySensorDevice
Return the KeySensorDevice associated with the rendering surface initialized with the toolkit appropriate key event listener.void
setErrorReporter
(org.j3d.util.ErrorReporter reporter) Register an error reporter with the factory so that any errors generated can be directed appropriately.
-
Field Details
-
toolkitID
The identifier String of the ui toolkit type -
rendererID
The identifier String of the renderer type -
canvas
The toolkit specific object that is the source of device events -
surface
The renderer specific object, used for instantiating certain DeviceManagers -
errorReporter
protected org.j3d.util.ErrorReporter errorReporterThe class that handles external error messaging
-
-
Constructor Details
-
DeviceFactory
protected DeviceFactory()Protected Default Constructor
-
-
Method Details
-
getDeviceManagers
public abstract 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 appropriate event listeners per the ui toolkit.- 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 toolkit appropriate key event listener.- Returns:
- the KeySensorDevice
-
setErrorReporter
public void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the factory so that any errors generated can be directed appropriately. Setting a value of null will clear the currently set reporter and causes the factory to use the DefaultErrorReporter. If an error reporter is already set, the new value replaces the old.- Parameters:
reporter
- The instance to use or null
-
createDevices
-