com.jme.input.joystick
Class DummyJoystickInput

java.lang.Object
  extended by com.jme.input.Input
      extended by com.jme.input.joystick.JoystickInput
          extended by com.jme.input.joystick.DummyJoystickInput

public class DummyJoystickInput
extends JoystickInput

Dummy JoystickInput to disable joystick support.


Nested Class Summary
static class DummyJoystickInput.DummyJoystick
           
 
Field Summary
 
Fields inherited from class com.jme.input.joystick.JoystickInput
INPUT_DUMMY, INPUT_LWJGL, listeners
 
Constructor Summary
DummyJoystickInput()
           
 
Method Summary
protected  void destroy()
           
 java.util.ArrayList<Joystick> findJoysticksByAxis(java.lang.String... axis)
          Locate and return a joystick with the given axis names.
 Joystick getDefaultJoystick()
          This is a method to obtain a single joystick.
 Joystick getJoystick(int index)
          Game controller at specified index.
 int getJoystickCount()
           
 void update()
          Poll data for this input system part (update the values) and send events to all listeners (events will not be generated if no listeners were added via addListener).
 
Methods inherited from class com.jme.input.joystick.JoystickInput
addListener, destroyIfInitalized, get, getProvider, removeListener, removeListeners, setProvider, setProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyJoystickInput

public DummyJoystickInput()
Method Detail

getJoystickCount

public int getJoystickCount()
Specified by:
getJoystickCount in class JoystickInput
Returns:
number of attached game controllers

getJoystick

public Joystick getJoystick(int index)
Game controller at specified index.

Specified by:
getJoystick in class JoystickInput
Parameters:
index - index of the controller (0 <= index <= getJoystickCount())
Returns:
game controller

findJoysticksByAxis

public java.util.ArrayList<Joystick> findJoysticksByAxis(java.lang.String... axis)
Description copied from class: JoystickInput
Locate and return a joystick with the given axis names.

Specified by:
findJoysticksByAxis in class JoystickInput
Parameters:
axis - 1 or more names to look by
Returns:
array of joysticks, each having axis to match every name (case insensitive)

getDefaultJoystick

public Joystick getDefaultJoystick()
This is a method to obtain a single joystick. It's simple to used but not recommended (user may have multiple joysticks!).

Specified by:
getDefaultJoystick in class JoystickInput
Returns:
what the implementation thinks is the main joystick, not null!

destroy

protected void destroy()
Specified by:
destroy in class JoystickInput

update

public void update()
Poll data for this input system part (update the values) and send events to all listeners (events will not be generated if no listeners were added via addListener).

Specified by:
update in class Input