Package net.java.games.input
Interface Controller
- All Known Implementing Classes:
- AbstractController,- Keyboard,- LinuxCombinedController,- Mouse,- WinTabDevice
public interface Controller
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.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classCommon controller port types.static classTypes of controller objects.
- 
Method SummaryModifier and TypeMethodDescriptionReturns a single axis based on its type, or null if no axis with the specified type could be found.Returns the components on this controller, in order of assignment priority.Returns the controllers connected to make up this controller, or an empty array if this controller contains no child controllers.Get the device event queuegetName()Returns a human-readable name for this Controller.intReturns the zero-based port number for this Controller.Returns the port type for this Controller.Rumbler[]Returns the rumblers for sending feedback to this controller, or an empty array if there are no rumblers on this controller.getType()Returns the type of the Controller.booleanpoll()Polls axes for data.voidsetEventQueueSize(int size) Initialized the controller event queue to a new size.
- 
Method Details- 
getControllersAbstractController[] 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.).
- 
getTypeController.Type getType()Returns the type of the Controller.
- 
getComponentsComponent[] getComponents()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).
- 
getComponentReturns a single axis based on its type, or null if no axis with the specified type could be found.
- 
getRumblersRumbler[] getRumblers()Returns the rumblers for sending feedback to this controller, or an empty array if there are no rumblers on this controller.
- 
pollboolean poll()Polls axes for data. Returns false if the controller is no longer valid. Polling reflects the current state of the device when polled.
- 
setEventQueueSizevoid setEventQueueSize(int size) Initialized the controller event queue to a new size. Existing events in the queue are lost.
- 
getEventQueueEventQueue getEventQueue()Get the device event queue
- 
getPortTypeController.PortType getPortType()Returns the port type for this Controller.
- 
getPortNumberint getPortNumber()Returns the zero-based port number for this Controller.
- 
getNameString getName()Returns a human-readable name for this Controller.
 
-