Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.lwjgl.input
Class Controllers

    java.lang.Object
      org.lwjgl.input.Controllers

    public class Controllers

extends java.lang.Object

The collection of controllers currently connected.

Author:
  Kevin Glass

Constructor Summary
`Controllers()`

Method Summary
`static void` | `clearEvents()` Clear any events stored for the controllers in this set
`static void` | `create()` Initialise the controllers collection
`static void` | `destroy()` Destroys any resources used by the controllers
`static Controller` | `getController(int index)` Get a controller from the collection
`static int` | `getControllerCount()` Retrieve a count of the number of controllers
`static int` | `getEventControlIndex()` Get the index of the control that caused the current event
`static long` | `getEventNanoseconds()` Get the timestamp assigned to the current event
`static Controller` | `getEventSource()` Get the source of the current event
`static boolean` | `isCreated()`
`static boolean` | `isEventAxis()` Check if the current event was caused by a axis
`static boolean` | `isEventButton()` Check if the current event was caused by a button
`static boolean` | `isEventPovX()` Check if the current event was cause by the POV x-axis
`static boolean` | `isEventPovY()` Check if the current event was cause by the POV x-axis
`static boolean` | `isEventXAxis()` Check if the current event was caused by movement on the x-axis
`static boolean` | `isEventYAxis()` Check if the current event was caused by movement on the y-axis
`static boolean` | `next()` Move to the next event that has been stored.
`static void` | `poll()` Poll the controllers available.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Controllers

    public Controllers()

Method Detail

### create

    public static void create()
                       throws LWJGLException

  Initialise the controllers collection

  Throws:
    `LWJGLException` - Indicates a failure to initialise the controller library.

### getController

    public static Controller getController(int index)

  Get a controller from the collection

  Parameters:
    `index` - The index of the controller to retrieve
  Returns:
    The controller requested

### getControllerCount

    public static int getControllerCount()

  Retrieve a count of the number of controllers

  Returns:
    The number of controllers available

### poll

    public static void poll()

  Poll the controllers available. This will both update their state and generate events that must be cleared.

### clearEvents

    public static void clearEvents()

  Clear any events stored for the controllers in this set

### next

    public static boolean next()

  Move to the next event that has been stored.

  Returns:
    True if there is still an event to process

### isCreated

    public static boolean isCreated()

  Returns:
    True if Controllers has been created

### destroy

    public static void destroy()

  Destroys any resources used by the controllers

### getEventSource

    public static Controller getEventSource()

  Get the source of the current event

  Returns:
    The source of the current event

### getEventControlIndex

    public static int getEventControlIndex()

  Get the index of the control that caused the current event

  Returns:
    The index of the control that cause the current event

### isEventButton

    public static boolean isEventButton()

  Check if the current event was caused by a button

  Returns:
    True if the current event was caused by a button

### isEventAxis

    public static boolean isEventAxis()

  Check if the current event was caused by a axis

  Returns:
    True if the current event was caused by a axis

### isEventXAxis

    public static boolean isEventXAxis()

  Check if the current event was caused by movement on the x-axis

  Returns:
    True if the current event was cause by movement on the x-axis

### isEventYAxis

    public static boolean isEventYAxis()

  Check if the current event was caused by movement on the y-axis

  Returns:
    True if the current event was caused by movement on the y-axis

### isEventPovX

    public static boolean isEventPovX()

  Check if the current event was cause by the POV x-axis

  Returns:
    True if the current event was caused by the POV x-axis

### isEventPovY

    public static boolean isEventPovY()

  Check if the current event was cause by the POV x-axis

  Returns:
    True if the current event was caused by the POV x-axis

### getEventNanoseconds

    public static long getEventNanoseconds()

  Get the timestamp assigned to the current event

  Returns:
    The timestamp assigned ot the current event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 lwjgl.org. All Rights Reserved.