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

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

The newest version!
package com.guigarage.gestures;

import javax.swing.JComponent;

/**
 * A event that indicates that a magnification gesture occured on a component.
 * @author hendrikebbers
 *
 */
public class GestureMagnificationEvent extends GestureEvent {

	private static final long serialVersionUID = 1L;

	private final double magnification;
	
	/**
	 * Constructs a GestureMagnificationEvent object with the
     * specified source component
	 * @param source the component on with the event occured
	 * @param magnification the magnification value
	 */
	public GestureMagnificationEvent(JComponent source, double magnification) {
		super(source);
		this.magnification = magnification;
	}

	/**
	 * Returns the magnification value
	 * @return the magnification value
	 */
	public double getMagnification() {
		return magnification;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy