wiiusej.wiiuseapievents
Interface WiimoteListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
AccelerationPanel, ButtonsEventPanel, GForcePanel, IRPanel, OrientationPanel, Tests, WiiuseJGuiTest

public interface WiimoteListener
extends java.util.EventListener

This is the interface to implement to listen to events from wiimotes. The differents methods are called in this order : onButtonsEvent, onIrEvent, onMotionSensingEvent, onStatusEvent, onDisconnectionEvent.

Author:
guiguito

Method Summary
 void onButtonsEvent(ButtonsEvent e)
          Method called on a button Event.
 void onDisconnectionEvent(DisconnectionEvent e)
          This is the method called when a disconnection event occurs.
 void onIrEvent(IREvent e)
          Method called when an IR event occurs.
 void onMotionSensingEvent(MotionSensingEvent e)
          Method called when a motion sensing event occurs.
 void onStatusEvent(StatusEvent e)
          Method called on a status event.
 

Method Detail

onButtonsEvent

void onButtonsEvent(ButtonsEvent e)
Method called on a button Event.

Parameters:
e - the buttonEvent with the last informations about the buttons of the wiimote.

onIrEvent

void onIrEvent(IREvent e)
Method called when an IR event occurs.

Parameters:
e - the IREvent with the IR points seen.

onMotionSensingEvent

void onMotionSensingEvent(MotionSensingEvent e)
Method called when a motion sensing event occurs.

Parameters:
e - the motion sensing event with orientation and acceleration.

onStatusEvent

void onStatusEvent(StatusEvent e)
Method called on a status event. A status event occurs when : - we ask it - an expansion controller has been plugged - an expansion controller has been unplugged This is where you can get the different values of the parameters setup on your wiimote.

Parameters:
e - the status event.

onDisconnectionEvent

void onDisconnectionEvent(DisconnectionEvent e)
This is the method called when a disconnection event occurs. A disconnection event happens when : - there are no battery left - the wiimote has just been turned off - the connection is dropped

Parameters:
e - the disconnection event.