wiiremotej
Class ButtonKeyMap

java.lang.Object
  extended by wiiremotej.ButtonMap
      extended by wiiremotej.ButtonKeyMap

public class ButtonKeyMap
extends ButtonMap

Maps a button/button mask on the Wii remote to a one or more keys. See ButtonMap for details on buttons and extensions. See java.awt.KeyEvent for key map options (any of the VK_ constants are acceptable). The order the keys are pressed and released is determined by their order in the array. It is the user's responsibility to make sure valid keys are entered. If invalid keys are entered, no exception will be thrown until the map is triggered, at which point errors will be generated.

See Also:
ButtonMap

Field Summary
 
Fields inherited from class wiiremotej.ButtonMap
CLASSIC_CONTROLLER, GUITAR, NUNCHUK
 
Constructor Summary
ButtonKeyMap(int wiiRemoteButtons, int key)
          Creates a new ButtonMap for the Wii remote with the given key.
ButtonKeyMap(int wiiRemoteButtons, int[] keys)
          Creates a new ButtonMap for the Wii remote with the given list of keys.
ButtonKeyMap(int extension, int extensionButtons, int key)
          Creates a new ButtonMap for the Wii remote with the given key.
ButtonKeyMap(int extension, int extensionButtons, int[] keys)
          Creates a new ButtonMap for the Wii remote with the given list of keys.
ButtonKeyMap(int wiiRemoteButtons, int extension, int extensionButtons, int key)
          Creates a new ButtonMap for the Wii remote with the given key.
ButtonKeyMap(int wiiRemoteButtons, int extension, int extensionButtons, int[] keys)
          Creates a new ButtonMap for the Wii remote with the given list of keys.
 
Method Summary
 
Methods inherited from class wiiremotej.ButtonMap
equals, getExtension, getExtensionButtons, getKeys, getMouseButton, getScrollAmount, getScrollInterval, getWiiRemoteButtons
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonKeyMap

public ButtonKeyMap(int wiiRemoteButtons,
                    int key)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given key.

Parameters:
wiiRemoteButtons - the Wii remote buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
key - a single keyboard key to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.

ButtonKeyMap

public ButtonKeyMap(int extension,
                    int extensionButtons,
                    int key)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given key.

Parameters:
extension - the extension on which the extension buttons must be depressed to trigger the action(s).
extensionButtons - the extension buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
key - a single keyboard key to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.

ButtonKeyMap

public ButtonKeyMap(int wiiRemoteButtons,
                    int extension,
                    int extensionButtons,
                    int key)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given key.

Parameters:
wiiRemoteButtons - the Wii remote buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
extension - the extension on which the extension buttons must be depressed to trigger the action(s).
extensionButtons - the extension buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
key - a single keyboard key to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.

ButtonKeyMap

public ButtonKeyMap(int wiiRemoteButtons,
                    int[] keys)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given list of keys.

Parameters:
wiiRemoteButtons - the Wii remote buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
keys - a list of keys to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.
java.lang.IllegalArgumentException - if keys is null.

ButtonKeyMap

public ButtonKeyMap(int extension,
                    int extensionButtons,
                    int[] keys)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given list of keys.

Parameters:
extension - the extension on which the extension buttons must be depressed to trigger the action(s).
extensionButtons - the extension buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
keys - a list of keys to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.
java.lang.IllegalArgumentException - if keys is null.

ButtonKeyMap

public ButtonKeyMap(int wiiRemoteButtons,
                    int extension,
                    int extensionButtons,
                    int[] keys)
             throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given list of keys.

Parameters:
wiiRemoteButtons - the Wii remote buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
extension - the extension on which the extension buttons must be depressed to trigger the action(s).
extensionButtons - the extension buttons that must be depressed to trigger this ButtonMap. May be either a single button or a multi-button mask.
keys - a list of keys to map to. Any of the VK_ constants from java.awt.KeyEvent.
Throws:
java.lang.IllegalArgumentException - if no buttons are indicated.
java.lang.IllegalArgumentException - if keys is null.