All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.guigarage.gestures.GestureEvent Maven / Gradle / Ivy

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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy