Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
net.java.games.input.Controller Interface Referenceabstract
Inheritance diagram for net.java.games.input.Controller:

Classes

class  PortType
 
class  Type
 

Public Member Functions

abstract Type getType ()
 
abstract Component[] getComponents ()
 
abstract Component getComponent (Component.Identifier id)
 
abstract Rumbler[] getRumblers ()
 
abstract boolean poll ()
 
abstract void setEventQueueSize (int size)
 
abstract EventQueue getEventQueue ()
 
abstract PortType getPortType ()
 
abstract int getPortNumber ()
 
abstract String getName ()
 

Detailed Description

A Controller represents a physical device, such as a keyboard, mouse, or joystick, or a logical grouping of related controls, such as a button pad or mouse ball. A controller can be composed of multiple controllers. For example, the ball of a mouse and its buttons are two separate controllers.

Author
Christian Riekoff & Peter Lager

Member Function Documentation

abstract Component net.java.games.input.Controller.getComponent ( Component.Identifier  id)
pure virtual

Returns a single axis based on its type, or null if no axis with the specified type could be found.

Implemented in net.java.games.input.AbstractController.

abstract Component [] net.java.games.input.Controller.getComponents ( )
pure 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).

Implemented in net.java.games.input.AbstractController.

abstract EventQueue net.java.games.input.Controller.getEventQueue ( )
pure virtual

Get the device event queue

Implemented in net.java.games.input.AbstractController.

abstract String net.java.games.input.Controller.getName ( )
pure virtual

Returns a human-readable name for this Controller.

Implemented in net.java.games.input.AbstractController.

abstract int net.java.games.input.Controller.getPortNumber ( )
pure virtual

Returns the zero-based port number for this Controller.

Implemented in net.java.games.input.AbstractController.

abstract Rumbler [] net.java.games.input.Controller.getRumblers ( )
pure virtual

Returns the rumblers for sending feedback to this controller, or an empty array if there are no rumblers on this controller.

Implemented in net.java.games.input.AbstractController.

abstract boolean net.java.games.input.Controller.poll ( )
pure virtual

Polls axes for data. Returns false if the controller is no longer valid. Polling reflects the current state of the device when polled.

Implemented in net.java.games.input.AbstractController.

abstract void net.java.games.input.Controller.setEventQueueSize ( int  size)
pure virtual

Initialized the controller event queue to a new size. Existing events in the queue are lost.

Implemented in net.java.games.input.AbstractController.