wiiusej.wiiusejevents.utils
Interface WiimoteListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
AccelerationExpansionEventPanel, AccelerationPanel, AccelerationWiimoteEventPanel, ButtonsEventPanel, GForceExpansionEventPanel, GForcePanel, GForceWiimoteEventPanel, IRPanel, JoystickEventPanel, NunchukGuiTest, NunchukJoystickEventPanel, OrientationExpansionEventPanel, OrientationPanel, OrientationWiimoteEventPanel, 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, onExpansionEvent, onStatusEvent, onDisconnectionEvent onNunchukInsertedEvent, onNunchukRemovedEvent.

Author:
guiguito

Method Summary
 void onButtonsEvent(WiimoteButtonsEvent e)
          Method called on a button Event.
 void onDisconnectionEvent(DisconnectionEvent e)
          This is the method called when a disconnection event occurs.
 void onExpansionEvent(ExpansionEvent e)
          Method called when an expansion 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 onNunchukInsertedEvent(NunchukInsertedEvent e)
          This is the method called when a NunchukInsertedEvent occurs.
 void onNunchukRemovedEvent(NunchukRemovedEvent e)
          This is the method called when a NunchukRemovedEvent occurs.
 void onStatusEvent(StatusEvent e)
          Method called on a status event.
 

Method Detail

onButtonsEvent

void onButtonsEvent(WiimoteButtonsEvent 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.

onExpansionEvent

void onExpansionEvent(ExpansionEvent e)
Method called when an expansion event occurs.

Parameters:
e - the expansion event occured.

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.

onNunchukInsertedEvent

void onNunchukInsertedEvent(NunchukInsertedEvent e)
This is the method called when a NunchukInsertedEvent occurs.

Parameters:
e - the NunchukInsertedEvent.

onNunchukRemovedEvent

void onNunchukRemovedEvent(NunchukRemovedEvent e)
This is the method called when a NunchukRemovedEvent occurs.

Parameters:
e - the NunchukRemovedEvent.