public class WandViewBehavior.ResetViewListener extends SensorInputAdaptor
Constructor and Description |
---|
ResetViewListener(Sensor s,
int count)
Creates a sensor listener that resets the view when the specified
number of buttons are down simultaneously.
|
Modifier and Type | Method and Description |
---|---|
void |
pressed(SensorEvent e)
This method is called when a sensor's button is pressed.
|
void |
read(SensorEvent e)
This method is called each time the
dispatchEvents
method of SensorEventAgent is called and none of a
sensor's buttons have been handled by a button listener. |
clicked, dragged, released
public ResetViewListener(Sensor s, int count)
s
- the sensor to listen tocount
- the number of buttons that must be down simultaneouslypublic void pressed(SensorEvent e)
SensorButtonListener
pressed
in interface SensorButtonListener
pressed
in class SensorInputAdaptor
e
- the sensor eventpublic void read(SensorEvent e)
SensorReadListener
dispatchEvents
method of SensorEventAgent
is called and none of a
sensor's buttons have been handled by a button listener. The
sensor read value has not necessarily changed since the last read
event.read
in interface SensorReadListener
read
in class SensorInputAdaptor
e
- the sensor event