public interface SensorButtonListener
SensorEventAgent
instance.
The events passed to this listener's methods are ephemeral; they
are only valid until the listener has returned. If a listener needs to
retain the event it must be copied using the
SensorEvent(SensorEvent)
constructor.
SensorEvent
,
SensorEventAgent
,
SensorReadListener
Modifier and Type | Method and Description |
---|---|
void |
clicked(SensorEvent e)
This method is currently not used by
SensorEventAgent ,
but is included here for future possible development. |
void |
dragged(SensorEvent e)
This method is called with each invocation of the
dispatchEvents method of SensorEventAgent
if any button bound to the listener is down and has not changed
state since the last invocation. |
void |
pressed(SensorEvent e)
This method is called when a sensor's button is pressed.
|
void |
released(SensorEvent e)
This method is called when a sensor's button is released.
|
void pressed(SensorEvent e)
e
- the sensor eventvoid released(SensorEvent e)
e
- the sensor eventvoid dragged(SensorEvent e)
dispatchEvents
method of SensorEventAgent
if any button bound to the listener is down and has not changed
state since the last invocation. The sensor value has not
necessarily changed from the last drag event.e
- the sensor eventvoid clicked(SensorEvent e)
SensorEventAgent
,
but is included here for future possible development. Its
implementations should remain empty for the present.