wiiremotej.event
Interface WiiRemoteListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
WiiRemoteAdapter

public interface WiiRemoteListener
extends java.util.EventListener

Listener interface for the remote. Contains listener information for all remote channels. Note that any time-intensive tasks should be executed in their own threads, as otherwise, they will block the event-dispatch thread.


Method Summary
 void accelerationInputReceived(WRAccelerationEvent evt)
          Fires whenever data is received from the accelerometer.
 void buttonInputReceived(WRButtonEvent evt)
          Fires whenever data is received from the buttons.
 void combinedInputReceived(WRCombinedEvent evt)
          Fires whenever input is received on the regular input reports (0x30...0x3f).
 void disconnected()
          Fires when the WiiRemote disconnects.
 void extensionConnected(WiiRemoteExtension extension)
          Fires when an extension is connected and properly setup.
 void extensionDisconnected(WiiRemoteExtension extension)
          Fires when an extension disconnects.
 void extensionInputReceived(WRExtensionEvent evt)
          Fires whenever there's input from the extension port.
 void extensionPartiallyInserted()
          Fires when an extension is partially inserted.
 void extensionUnknown()
          Fires when an extension of an unknown type connects.
 void IRInputReceived(WRIREvent evt)
          Fires whenever data is received from IR sensor.
 void statusReported(WRStatusEvent evt)
          Fires whenever status data is received.
 

Method Detail

buttonInputReceived

void buttonInputReceived(WRButtonEvent evt)
Fires whenever data is received from the buttons.

Parameters:
evt - the WRButtonEvent containing information on the buttons pressed.
See Also:
combinedInputReceived(WRCombinedEvent)

statusReported

void statusReported(WRStatusEvent evt)
Fires whenever status data is received.

Parameters:
evt - the WRStatusEvent containing status information.

accelerationInputReceived

void accelerationInputReceived(WRAccelerationEvent evt)
Fires whenever data is received from the accelerometer. Fires half as fast when data is interleaved. Accelerometer data is meaningless during read operations.

Parameters:
evt - the WRAccelerationEvent containing acceleration information.
See Also:
combinedInputReceived(WRCombinedEvent)

IRInputReceived

void IRInputReceived(WRIREvent evt)
Fires whenever data is received from IR sensor. Fires half as fast when data is interleaved.

Parameters:
evt - the WRIREvent containing acceleration information.
See Also:
combinedInputReceived(WRCombinedEvent)

extensionInputReceived

void extensionInputReceived(WRExtensionEvent evt)
Fires whenever there's input from the extension port.

Parameters:
evt - the WRExtensionEvent containing input from the extension port.
See Also:
combinedInputReceived(WRCombinedEvent)

extensionConnected

void extensionConnected(WiiRemoteExtension extension)
Fires when an extension is connected and properly setup.

Parameters:
extension - the extension that was connected.

extensionPartiallyInserted

void extensionPartiallyInserted()
Fires when an extension is partially inserted. The physical extension connector should be pushed in more, or unplugged and replugged.


extensionUnknown

void extensionUnknown()
Fires when an extension of an unknown type connects. The extension is considered to be disconnected, since there is no way to process input from it.


extensionDisconnected

void extensionDisconnected(WiiRemoteExtension extension)
Fires when an extension disconnects.

Parameters:
extension - the extension that was disconnected.

combinedInputReceived

void combinedInputReceived(WRCombinedEvent evt)
Fires whenever input is received on the regular input reports (0x30...0x3f). Contains all information possibly received from input. This method fires in addition to the individual method of each input.

Parameters:
evt - a combined event, containing button press, acceleration, IR, and extension events.
See Also:
buttonInputReceived(WRButtonEvent), accelerationInputReceived(WRAccelerationEvent), IRInputReceived(WRIREvent), extensionInputReceived(WRExtensionEvent)

disconnected

void disconnected()
Fires when the WiiRemote disconnects. Note that this fires only if the WiiRemote disconnects from the computer. If the computer orders the disconnect, this method does not fire. Note also that the WiiRemote is actually disconnected at this point, so you can not perform any actions on it.