net.java.games.input
Class Keyboard

java.lang.Object
  extended by net.java.games.input.AbstractController
      extended by net.java.games.input.Keyboard
All Implemented Interfaces:
Controller

public abstract class Keyboard
extends AbstractController

A Keyboard is a type of controller consisting of a single controller, they keypad, which contains several axes (the keys). By default, all keys are set to receive polling data.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.games.input.Controller
Controller.PortType, Controller.Type
 
Constructor Summary
protected Keyboard(java.lang.String name, Component[] keys, Controller[] children, Rumbler[] rumblers)
          Protected constructor.
 
Method Summary
 Controller.Type getType()
          Returns the type of the Controller.
 boolean isKeyDown(Component.Identifier.Key key_id)
           
 
Methods inherited from class net.java.games.input.AbstractController
getComponent, getComponents, getControllers, getEventQueue, getName, getNextDeviceEvent, getPortNumber, getPortType, getRumblers, poll, pollDevice, setDeviceEventQueueSize, setEventQueueSize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Keyboard

protected Keyboard(java.lang.String name,
                   Component[] keys,
                   Controller[] children,
                   Rumbler[] rumblers)
Protected constructor. Subclasses should initialize the array of axes to an array of keys.

Parameters:
name - The name of the keyboard
Method Detail

getType

public Controller.Type getType()
Returns the type of the Controller.

Specified by:
getType in interface Controller
Overrides:
getType in class AbstractController

isKeyDown

public final boolean isKeyDown(Component.Identifier.Key key_id)