net.java.games.input
Class LinuxJoystickDevice

java.lang.Object
  extended by net.java.games.input.LinuxJoystickDevice
All Implemented Interfaces:
LinuxDevice

final class LinuxJoystickDevice
extends java.lang.Object
implements LinuxDevice


Field Summary
static int AXIS_MAX_VALUE
           
static int JS_EVENT_AXIS
           
static int JS_EVENT_BUTTON
           
static int JS_EVENT_INIT
           
 
Constructor Summary
LinuxJoystickDevice(java.lang.String filename)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 byte[] getAxisMap()
           
 char[] getButtonMap()
           
 java.lang.String getName()
           
 boolean getNextEvent(Event event)
           
 int getNumAxes()
           
 int getNumButtons()
           
 void poll()
           
 void registerAxis(int index, LinuxJoystickAxis axis)
           
 void registerButton(int index, LinuxJoystickButton button)
           
 void registerPOV(LinuxJoystickPOV pov)
           
 void setBufferSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JS_EVENT_BUTTON

public static final int JS_EVENT_BUTTON
See Also:
Constant Field Values

JS_EVENT_AXIS

public static final int JS_EVENT_AXIS
See Also:
Constant Field Values

JS_EVENT_INIT

public static final int JS_EVENT_INIT
See Also:
Constant Field Values

AXIS_MAX_VALUE

public static final int AXIS_MAX_VALUE
See Also:
Constant Field Values
Constructor Detail

LinuxJoystickDevice

public LinuxJoystickDevice(java.lang.String filename)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

setBufferSize

public final void setBufferSize(int size)

registerAxis

public final void registerAxis(int index,
                               LinuxJoystickAxis axis)

registerButton

public final void registerButton(int index,
                                 LinuxJoystickButton button)

registerPOV

public final void registerPOV(LinuxJoystickPOV pov)

getNextEvent

public final boolean getNextEvent(Event event)
                           throws java.io.IOException
Throws:
java.io.IOException

poll

public final void poll()
                throws java.io.IOException
Throws:
java.io.IOException

getNumAxes

public final int getNumAxes()

getNumButtons

public final int getNumButtons()

getAxisMap

public final byte[] getAxisMap()

getButtonMap

public final char[] getButtonMap()

getName

public final java.lang.String getName()

close

public final void close()
                 throws java.io.IOException
Specified by:
close in interface LinuxDevice
Throws:
java.io.IOException

finalize

protected void finalize()
                 throws java.io.IOException
Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException