wiiremotej
Class ButtonMouseMap

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

public class ButtonMouseMap
extends ButtonMap

Maps a button on the Wii remote to a mouse press. See ButtonMap for details on buttons and extensions. See java.awt.InputEvent for mouse button map options. Only InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, and InputEvent.BUTTON3_MASK are valid mouse buttons.

See Also:
ButtonMap

Field Summary
 
Fields inherited from class wiiremotej.ButtonMap
CLASSIC_CONTROLLER, GUITAR, NUNCHUK
 
Constructor Summary
ButtonMouseMap(int wiiRemoteButtons, int mouseButton)
          Creates a new ButtonMap for the Wii remote with the given mouse button(s).
ButtonMouseMap(int extension, int extensionButtons, int mouseButton)
          Creates a new ButtonMap for the Wii remote with the given key.
ButtonMouseMap(int wiiRemoteButtons, int extension, int extensionButtons, int mouseButton)
          Creates a new ButtonMap for the Wii remote with the given key.
 
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

ButtonMouseMap

public ButtonMouseMap(int wiiRemoteButtons,
                      int mouseButton)
               throws java.lang.IllegalArgumentException
Creates a new ButtonMap for the Wii remote with the given mouse button(s).

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.
mouseButton - mouse button(s) to map to. A mouse button mask from java.awt.InputEvent.
Throws:
java.lang.IllegalArgumentException - if no Wii remote buttons are indicated.
java.lang.IllegalArgumentException - if mouseButton is -1.
java.lang.IllegalArgumentException - if mouseButton is not one of: InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK.

ButtonMouseMap

public ButtonMouseMap(int extension,
                      int extensionButtons,
                      int mouseButton)
               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.
mouseButton - mouse button(s) to map to. A mouse button mask from java.awt.InputEvent.
Throws:
java.lang.IllegalArgumentException - if no extension buttons are indicated.
java.lang.IllegalArgumentException - if mouseButton is -1.
java.lang.IllegalArgumentException - if mouseButton is not one of: InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK.

ButtonMouseMap

public ButtonMouseMap(int wiiRemoteButtons,
                      int extension,
                      int extensionButtons,
                      int mouseButton)
               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.
mouseButton - mouse button(s) to map to. A mouse button mask from java.awt.InputEvent.
Throws:
java.lang.IllegalArgumentException - if no Wii remote or extension buttons are indicated.
java.lang.IllegalArgumentException - if mouseButton is -1.
java.lang.IllegalArgumentException - if mouseButton is not one of: InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK.