|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.wisch.joystick.JoystickManager
public class JoystickManager
The class JoystickManager. This is the main class for handling and recieving
Joystick
and FFJoystick
objects.
Some methods of this class will throw FFJoystickException
. Be aware
that these are fatal errors. If these errors occur, neiter input, nor FF will
work.
To get an introduction how to use this class, take a look at the sourcecode
of JoystickInputDemo and JoystickForceDemo.
JoystickInputDemo
,
JoystickForceDemo
Method Summary | |
---|---|
static void |
close()
Close the native JoystickManager subsystem. |
static boolean |
disableJoystickEventPolling()
Disable joystick input event polling. |
static boolean |
enableJoystickEventPolling()
Enable joystick input event polling. |
static java.util.ArrayList<FFJoystick> |
getAllFFJoysticks()
Gets an ArrayList containing all force feedback joysticks. |
static java.util.ArrayList<Joystick> |
getAllJoysticks()
Gets an ArrayList containing all joysticks. |
static FFJoystick |
getFFJoystick()
Gets a force feedback joystick. |
static Joystick |
getJoystick()
Gets a joystick. |
static Joystick |
getJoystick(int joystickIndex)
Gets a joystick with a certain index. |
static void |
init()
Initialize the native JoystickManager subsystem. |
static boolean |
isEventPollingEnabled()
Checks if event polling is enabled. |
static void |
pauseAll()
Pause all effects on all FF joysticks, that are currently playing. |
static void |
reopenJoysticks()
Reopen joysticks. |
static void |
stopAllJoysticks()
Stop all effects on all FF joysticks. |
static void |
unpauseAll()
Resume all effects on all FF joysticks, that were playing before they were paused. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void init() throws FFJoystickException
FFJoystickException
- During init() this is a fatal error. We will not be able to
get joystick objects later on.public static void reopenJoysticks()
public static Joystick getJoystick() throws JoystickManagerNotInitializedException, JoystickNotFoundException
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.
JoystickNotFoundException
- No joystick was found.public static FFJoystick getFFJoystick() throws JoystickManagerNotInitializedException, JoystickNotFoundException
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.
JoystickNotFoundException
- No force feedback joystick was found.public static Joystick getJoystick(int joystickIndex) throws JoystickManagerNotInitializedException, JoystickNotFoundException
joystickIndex
- the joystick's index
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.
JoystickNotFoundException
- There is no joystick with that joystickIndex in the collection.public static java.util.ArrayList<Joystick> getAllJoysticks() throws JoystickManagerNotInitializedException
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.public static java.util.ArrayList<FFJoystick> getAllFFJoysticks() throws JoystickManagerNotInitializedException
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.public static void pauseAll()
FFJoystick.pause()
on every FF joystick)
public static void unpauseAll()
FFJoystick.unpause()
on every FF joystick)
public static void stopAllJoysticks()
FFJoystick.stopAll()
on every FF joystick)
public static boolean isEventPollingEnabled()
public static boolean enableJoystickEventPolling() throws JoystickManagerNotInitializedException, FFJoystickException
JoystickManagerNotInitializedException
- The joystick manager was not initialized. You have to call init()
first.
FFJoystickException
- Another error occured, probably fatal. Event polling will not work.ControllerEventListener.controllerEventOccured(AdvancedControllerEvent)
,
ControllerEventManager.addControllerEventListener(ControllerEventListener)
public static boolean disableJoystickEventPolling() throws FFJoystickException
FFJoystickException
- the FF joystick exceptionpublic static void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |