j3d.org Code

org.j3d.device.input
Interface DeviceManager

All Known Implementing Classes:
USBManager

public interface DeviceManager

Managers a class of devices.

Version:
$Revision: 1.1 $
Author:
Alan Hudson

Method Summary
 void addDeviceListener(DeviceListener l)
          Add a listener for devices additions and removals.
 InputDevice[] getDevices()
          Get the device discovered by this manager.
 int getNumDevices()
          Get the number of devices discovered.
 void removeDeviceListener(DeviceListener l)
          Remove a listener for device additions and removals.
 void setErrorReporter(ErrorReporter reporter)
          Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.
 

Method Detail

getNumDevices

int getNumDevices()
Get the number of devices discovered.

Returns:
The number of devices.

getDevices

InputDevice[] getDevices()
Get the device discovered by this manager. All devices discovered after this call will be reported to DeviceListeners.

Returns:
InputDevice[] An array of discovered devices.

addDeviceListener

void addDeviceListener(DeviceListener l)
Add a listener for devices additions and removals.

Parameters:
l - The listener. Nulls and duplicates will be ignored.

removeDeviceListener

void removeDeviceListener(DeviceListener l)
Remove a listener for device additions and removals.

Parameters:
l - The listener. Nulls and not found listeners will be ignored.

setErrorReporter

void setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Parameters:
reporter - The instance to use or null

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org