wiiremotej.event
Class BalanceBoardAdapter

java.lang.Object
  extended by wiiremotej.event.BalanceBoardAdapter
All Implemented Interfaces:
java.util.EventListener, BalanceBoardListener

public abstract class BalanceBoardAdapter
extends java.lang.Object
implements BalanceBoardListener

Implementation of BalanceBoardListener to conveniently implement just the methods you want. Contains all blank methods so you can just override what you need. Note that any time-intensive tasks should be executed in their own threads, as otherwise, they will block the event-dispatch thread.


Constructor Summary
BalanceBoardAdapter()
           
 
Method Summary
 void buttonInputReceived(BBButtonEvent evt)
          Fires whenever data is received from the button.
 void combinedInputReceived(BBCombinedEvent evt)
          Fires whenever input is received on the regular input reports (0x30...0x3f).
 void disconnected()
          Fires when the BalanceBoard disconnects.
 void massInputReceived(BBMassEvent evt)
          Fires whenever data is received from the mass sensors.
 void statusReported(BBStatusEvent evt)
          Fires whenever status data is received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BalanceBoardAdapter

public BalanceBoardAdapter()
Method Detail

buttonInputReceived

public void buttonInputReceived(BBButtonEvent evt)
Description copied from interface: BalanceBoardListener
Fires whenever data is received from the button.

Specified by:
buttonInputReceived in interface BalanceBoardListener
Parameters:
evt - the BBButtonEvent containing information on the button.
See Also:
BalanceBoardListener.combinedInputReceived(BBCombinedEvent)

statusReported

public void statusReported(BBStatusEvent evt)
Description copied from interface: BalanceBoardListener
Fires whenever status data is received.

Specified by:
statusReported in interface BalanceBoardListener
Parameters:
evt - the BBStatusEvent containing status information.

massInputReceived

public void massInputReceived(BBMassEvent evt)
Description copied from interface: BalanceBoardListener
Fires whenever data is received from the mass sensors.

Specified by:
massInputReceived in interface BalanceBoardListener
Parameters:
evt - the BBMassEvent containing mass information.
See Also:
BalanceBoardListener.combinedInputReceived(BBCombinedEvent)

combinedInputReceived

public void combinedInputReceived(BBCombinedEvent evt)
Description copied from interface: BalanceBoardListener
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.

Specified by:
combinedInputReceived in interface BalanceBoardListener
Parameters:
evt - a combined event, containing button press and mass events.
See Also:
BalanceBoardListener.buttonInputReceived(BBButtonEvent), BalanceBoardListener.massInputReceived(BBMassEvent)

disconnected

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

Specified by:
disconnected in interface BalanceBoardListener