wiiremotej.event
Class BBEvent
java.lang.Object
java.util.EventObject
wiiremotej.event.BBEvent
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- BBButtonEvent, BBCombinedEvent, BBDataEvent, BBMassEvent, BBStatusEvent
public class BBEvent
- extends java.util.EventObject
Event for Nintendo (R) Balance Board (TM). Super-class for all events. BBEvents are immutable and all subclasses should be immutable as well.
All subclasses should also try to provide a user-friendly constructor for testing purposes. For instance, if an event takes an array of bytes and turns it into a
String representing a name, the event should provide a constructor where the user can specify a String for the name directly. Note that these test constructors may
allow the user to create events with impossible data (such as a BBMassEvent with a negative mass). These constructors are
primarily for testing. If the user uses them for any other purpose, then it is the user's responsibility to ensure that valid data is provided. Otherwise, the
expected results are not guaranteed.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
BBEvent(BalanceBoard source)
Creates a new BBEvent with the BalanceBoard source. |
Methods inherited from class java.util.EventObject |
toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BBEvent
public BBEvent(BalanceBoard source)
- Creates a new BBEvent with the BalanceBoard source.
- Parameters:
source
- the BalanceBoard triggering this event.
getSource
public BalanceBoard getSource()
- The BalanceBoard on which the Event initially occurred.
- Overrides:
getSource
in class java.util.EventObject
- Returns:
- the BalanceBoard on which the Event initially occurred.