com.sun.j3d.utils.behaviors.sensor
Interface SensorButtonListener

All Known Implementing Classes:
SensorInputAdaptor, WandViewBehavior.GrabViewListener6D, WandViewBehavior.ListenerBase, WandViewBehavior.ResetViewListener, WandViewBehavior.RotationListener2D, WandViewBehavior.RotationListener6D, WandViewBehavior.ScaleListener2D, WandViewBehavior.ScaleListener6D, WandViewBehavior.TranslationListener2D, WandViewBehavior.TranslationListener6D

public interface SensorButtonListener

This defines the interface for handling a sensor's button events in conjunction with a 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.

Since:
Java 3D 1.3
See Also:
SensorEvent, SensorEventAgent, SensorReadListener

Method Summary
 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.
 

Method Detail

pressed

void pressed(SensorEvent e)
This method is called when a sensor's button is pressed.

Parameters:
e - the sensor event

released

void released(SensorEvent e)
This method is called when a sensor's button is released.

Parameters:
e - the sensor event

dragged

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. The sensor value has not necessarily changed from the last drag event.

Parameters:
e - the sensor event

clicked

void clicked(SensorEvent e)
This method is currently not used by SensorEventAgent, but is included here for future possible development. Its implementations should remain empty for the present.