j3d.org Code

org.j3d.device.input.jinput
Class USBManager

java.lang.Object
  extended by org.j3d.device.input.jinput.USBManager
All Implemented Interfaces:
DeviceManager

public class USBManager
extends java.lang.Object
implements DeviceManager

A USB device. This device is a navigation only device.

TODO:

Internationalisation Resource Names

Version:
$Revision: 1.2 $
Author:
Alan Hudson

Constructor Summary
USBManager()
          Construct a new instance of the manager
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USBManager

public USBManager()
Construct a new instance of the manager

Method Detail

setErrorReporter

public 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.

Specified by:
setErrorReporter in interface DeviceManager
Parameters:
reporter - The instance to use or null

getNumDevices

public int getNumDevices()
Get the number of devices discovered.

Specified by:
getNumDevices in interface DeviceManager
Returns:
The number of devices.

getDevices

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

Specified by:
getDevices in interface DeviceManager
Returns:
InputDevice[] An array of discovered devices.

addDeviceListener

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

Specified by:
addDeviceListener in interface DeviceManager
Parameters:
l - The listener. Nulls and duplicates will be ignored.

removeDeviceListener

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

Specified by:
removeDeviceListener in interface DeviceManager
Parameters:
l - The listener. Nulls and not found listeners will be ignored.

j3d.org Code

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