| Modifier and Type | Field and Description |
|---|---|
| private final Controller[] | children
Array of child controllers |
| private final Component[] | components
Array of components |
| private static final Event | |
| private EventQueue | |
| pack-priv static final int | |
| private final Map | id_to_components
Map from Component.Identifiers to Components |
| private final String | name
Human-readable name for this Controller |
| private final Rumbler[] | rumblers
Array of rumblers |
| Access | Constructor and Description |
|---|---|
| protected | AbstractController(String
name for the controller name, Component[] components for the controller components, Controller[] child controllers for the controller children, Rumbler[] rumblers for the controller rumblers)Protected constructor for a controller containing the specified axes, child controllers, and rumblers |
| Modifier and Type | Method and Description |
|---|---|
| public final Component | getComponent(Component.
Implements net. |
| public final Component[] | getComponents()
Implements net. |
| public final Controller[] | getControllers()
Implements net. |
| public final EventQueue | |
| public final String | getName()
Implements net. |
| protected abstract boolean | |
| public int | Returns: 0 by default, can be overriddenImplements net. |
| public Controller. | Returns: PortType.UNKNOWN by default, can be overriddenImplements net. |
| public final Rumbler[] | getRumblers()
Implements net. |
| public Controller. | |
| public synchronized boolean | |
| protected void | |
| protected void | setDeviceEventQueueSize(int size)
Plugins override this method to adjust their internal event queue size |
| public final void | setEventQueueSize(int size)
Implements net. |
| public String | toString()
Overrides java. |
| children | back to summary |
|---|---|
| private final Controller[] children Array of child controllers | |
| components | back to summary |
|---|---|
| private final Component[] components Array of components | |
| event | back to summary |
|---|---|
| private static final Event event | |
| event_queue | back to summary |
|---|---|
| private EventQueue event_queue | |
| EVENT_QUEUE_DEPTH | back to summary |
|---|---|
| pack-priv static final int EVENT_QUEUE_DEPTH | |
| id_to_components | back to summary |
|---|---|
| private final Map<Component. Map from Component.Identifiers to Components | |
| name | back to summary |
|---|---|
| private final String name Human-readable name for this Controller | |
| rumblers | back to summary |
|---|---|
| private final Rumbler[] rumblers Array of rumblers | |
| AbstractController | back to summary |
|---|---|
| protected AbstractController(String name, Component[] components, Controller[] children, Rumbler[] rumblers) Protected constructor for a controller containing the specified axes, child controllers, and rumblers
| |
| getComponent | back to summary |
|---|---|
| public final Component getComponent(Component. Implements net. Returns a single component based on its identifier, or null if no component with the specified type could be found. | |
| getComponents | back to summary |
|---|---|
| public final Component[] getComponents() Implements net. 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). | |
| getControllers | back to summary |
|---|---|
| public final Controller[] getControllers() Implements net. 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.). | |
| getEventQueue | back to summary |
|---|---|
| public final EventQueue getEventQueue() Implements net. Doc from net. Get the device event queue | |
| getName | back to summary |
|---|---|
| public final String getName() Implements net. Returns a human-readable name for this Controller. | |
| getNextDeviceEvent | back to summary |
|---|---|
| protected abstract boolean getNextDeviceEvent(Event event) throws IOException | |
| getPortNumber | back to summary |
|---|---|
| public int getPortNumber() Implements net. Returns the zero-based port number for this Controller.
| |
| getPortType | back to summary |
|---|---|
| public Controller. Implements net. Returns the port type for this Controller.
| |
| getRumblers | back to summary |
|---|---|
| public final Rumbler[] getRumblers() Implements net. Returns the rumblers for sending feedback to this controller, or an empty array if there are no rumblers on this controller. | |
| getType | back to summary |
|---|---|
| public Controller. Implements net. Returns the type of the Controller. | |
| poll | back to summary |
|---|---|
| public synchronized boolean poll() Implements net. Doc from net. Polls axes for data. Returns false if the controller is no longer valid. Polling reflects the current state of the device when polled. | |
| pollDevice | back to summary |
|---|---|
| protected void pollDevice() throws IOException | |
| setDeviceEventQueueSize | back to summary |
|---|---|
| protected void setDeviceEventQueueSize(int size) throws IOException Plugins override this method to adjust their internal event queue size | |
| setEventQueueSize | back to summary |
|---|---|
| public final void setEventQueueSize(int size) Implements net. Creates a new EventQueue. Events in old queue are lost. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a non-localized string description of this controller.
| |