com.guigarage.gestures.GestureEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gestures-wrapper Show documentation
Show all versions of gestures-wrapper Show documentation
Wrapper for multitoch gestures
The newest version!
package com.guigarage.gestures;
import java.util.EventObject;
import javax.swing.JComponent;
/**
* Basic event for all gesture events
*
* @author hendrikebbers
* @see GestureMagnificationEvent
* @see GesturePhaseEvent
* @see GestureRotationEvent
* @see GestureSwipeEvent
*/
public class GestureEvent extends EventObject {
private static final long serialVersionUID = 1L;
private boolean consumed = false;
/**
* Constructs a GestureEvent
object with the
* specified source component
* @param source the component on with the event occured
*/
protected GestureEvent(JComponent source) {
super(source);
}
/**
* consume this event
*/
public void consume() {
consumed = true;
}
/**
* @return true if this event has been consumed
*/
public boolean isConsumed() {
return consumed;
}
}