Game Control Plus
1.2.2
|
Public Member Functions | |
final Controller[] | getControllers () |
final Component[] | getComponents () |
final Component | getComponent (Component.Identifier id) |
final Rumbler[] | getRumblers () |
PortType | getPortType () |
int | getPortNumber () |
final String | getName () |
String | toString () |
Type | getType () |
final void | setEventQueueSize (int size) |
final EventQueue | getEventQueue () |
synchronized boolean | poll () |
Protected Member Functions | |
AbstractController (String name, Component[] components, Controller[] children, Rumbler[] rumblers) | |
void | setDeviceEventQueueSize (int size) throws IOException |
abstract boolean | getNextDeviceEvent (Event event) throws IOException |
void | pollDevice () throws IOException |
Static Package Attributes | |
static final int | EVENT_QUEUE_DEPTH = 32 |
Private Attributes | |
final String | name |
final Component[] | components |
final Controller[] | children |
final Rumbler[] | rumblers |
final Map | id_to_components = new HashMap() |
EventQueue | event_queue = new EventQueue(EVENT_QUEUE_DEPTH) |
Static Private Attributes | |
static final Event | event = new Event() |
An AbstractController is a skeleton implementation of a controller that contains a fixed number of axes, controllers, and rumblers.
|
protected |
Protected constructor for a controller containing the specified axes, child controllers, and rumblers
name | name for the controller |
components | components for the controller |
children | child controllers for the controller |
rumblers | rumblers for the controller |
|
virtual |
Returns a single component based on its identifier, or null if no component with the specified type could be found.
Implements net.java.games.input.Controller.
|
virtual |
Returns the components on this controller, in order of assignment priority. For example, the button controller on a mouse returns an array containing the primary or leftmost mouse button, followed by the secondary or rightmost mouse button (if present), followed by the middle mouse button (if present). The array returned is an empty array if this controller contains no components (such as a logical grouping of child controllers).
Implements net.java.games.input.Controller.
final Controller [] net.java.games.input.AbstractController.getControllers | ( | ) |
Returns the controllers connected to make up this controller, or an empty array if this controller contains no child controllers. The objects in the array are returned in order of assignment priority (primary stick, secondary buttons, etc.).
|
virtual |
Get the device event queue
Implements net.java.games.input.Controller.
|
virtual |
Returns a human-readable name for this Controller.
Implements net.java.games.input.Controller.
|
virtual |
Returns the zero-based port number for this Controller.
Implements net.java.games.input.Controller.
|
virtual |
Returns the port type for this Controller.
Implements net.java.games.input.Controller.
Reimplemented in net.java.games.input.OSXAbstractController, net.java.games.input.OSXKeyboard, net.java.games.input.OSXMouse, net.java.games.input.LinuxAbstractController, net.java.games.input.LinuxKeyboard, and net.java.games.input.LinuxMouse.
|
virtual |
Returns the rumblers for sending feedback to this controller, or an empty array if there are no rumblers on this controller.
Implements net.java.games.input.Controller.
|
virtual |
Returns the type of the Controller.
Implements net.java.games.input.Controller.
Reimplemented in net.java.games.input.LinuxAbstractController, net.java.games.input.DIAbstractController, net.java.games.input.LinuxJoystickAbstractController, net.java.games.input.OSXAbstractController, net.java.games.input.Keyboard, and net.java.games.input.Mouse.
|
virtual |
Polls axes for data. Returns false if the controller is no longer valid. Polling reflects the current state of the device when polled.
Implements net.java.games.input.Controller.
|
protected |
Plugins override this method to adjust their internal event queue size
|
virtual |
Creates a new EventQueue. Events in old queue are lost.
Implements net.java.games.input.Controller.
String net.java.games.input.AbstractController.toString | ( | ) |
Returns a non-localized string description of this controller.
|
private |
Array of child controllers
|
private |
Array of components
|
private |
Map from Component.Identifiers to Components
|
private |
Human-readable name for this Controller
|
private |
Array of rumblers