/src/org/mt4j/input/inputData/MTFingerInputEvt.java
Java | 223 lines | 28 code | 10 blank | 185 comment | 0 complexity | 95a3ccaaee0fb69231f9c8b50c68078f MD5 | raw file
1/*********************************************************************** 2 * mt4j Copyright (c) 2008 - 2009 Christopher Ruff, Fraunhofer-Gesellschaft All rights reserved. 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * 17 ***********************************************************************/ 18package org.mt4j.input.inputData; 19 20import org.mt4j.components.interfaces.IMTComponent3D; 21import org.mt4j.input.inputSources.AbstractInputSource; 22 23/** 24 * The Class MTFingerInputEvt. 25 * 26 * @author Christopher Ruff 27 */ 28public class MTFingerInputEvt extends AbstractCursorInputEvt{ 29 30 31 /** 32 * Instantiates a new mT finger input evt. 33 * 34 * @param source the source 35 * @param positionX the position x 36 * @param positionY the position y 37 * @param id the id 38 * @param m the m 39 */ 40 public MTFingerInputEvt( 41 AbstractInputSource source, 42 float positionX, 43 float positionY, 44 int id, 45 InputCursor m 46 ) { 47 super(source, positionX, positionY, id, m); 48 } 49 50 /** 51 * Instantiates a new mT finger input evt. 52 * 53 * @param source the source 54 * @param target the target 55 * @param positionX the position x 56 * @param positionY the position y 57 * @param id the id 58 * @param m the m 59 */ 60 public MTFingerInputEvt( 61 AbstractInputSource source, 62 IMTComponent3D target, 63 float positionX, 64 float positionY, 65 int id, 66 InputCursor m 67 ) { 68 super(source, target, positionX, positionY, id, m); 69 } 70 71 /* (non-Javadoc) 72 * @see org.mt4j.input.inputData.AbstractCursorInputEvt#clone() 73 */ 74 @Override 75 public Object clone() throws CloneNotSupportedException { 76 return new MTFingerInputEvt((AbstractInputSource) this.getSource(), this.getX(), this.getY(), this.getId(), this.getCursor()); 77 } 78 79 80// /** The Constant FINGER_DOWN. */ 81// public static final int FINGER_DOWN = 0; 82// 83// /** The Constant FINGER_UPDATE. */ 84// public static final int FINGER_UPDATE = 1; 85// 86// /** The Constant FINGER_UP. */ 87// public static final int FINGER_UP = 2; 88 89// 90// 91// /** The has been fired. */ 92// private boolean hasBeenFired; //TODO remove? 93// 94// /** The position x. */ 95// private float positionX; 96// 97// /** The position y. */ 98// private float positionY; 99// 100// /** The id. */ 101// private int id; 102// 103// 104// /** The added to motion. */ 105// private boolean addedToMotion; 106// 107// /** The associated motion. */ 108// private InputMotion<? extends MTConcretePositionEvt> associatedMotion; 109// 110// /** 111// * Instantiates a new touch event. 112// * 113// * @param source the source 114// * @param positionX the position x 115// * @param positionY the position y 116// * @param id the id 117// * @param m the m 118// */ 119// public MTFingerInputEvt(AbstractInputSource source, float positionX, float positionY, int id, InputMotion<? extends MTConcretePositionEvt> m) { 120// super(source); 121// hasBeenFired = false; 122// this.id = id; 123// 124// this.positionX = positionX; 125// this.positionY = positionY; 126// 127// this.associatedMotion = m; 128// 129// this.addedToMotion = false; 130// } 131// 132// 133// 134// /** 135// * Checks if is added to motion. 136// * 137// * @return true, if is added to motion 138// */ 139// public boolean isAddedToMotion() { 140// return addedToMotion; 141// } 142// 143// 144// 145// /** 146// * Sets the added to motion. 147// * 148// * @param addedToMotion the new added to motion 149// */ 150// public void setAddedToMotion(boolean addedToMotion) { 151// this.addedToMotion = addedToMotion; 152// } 153// 154// 155// 156// /** 157// * Checks if is checks for been fired. 158// * 159// * @return true, if is checks for been fired 160// */ 161// public boolean isHasBeenFired() { 162// return hasBeenFired; 163// } 164// 165// 166// /** 167// * Gets the motion. 168// * 169// * @return the motion 170// */ 171// public InputMotion<? extends MTConcretePositionEvt> getMotion() { 172// return associatedMotion; 173// } 174// 175// 176// /** 177// * Sets the checks for been fired. 178// * 179// * @param hasBeenFired the new checks for been fired 180// */ 181// public void setHasBeenFired(boolean hasBeenFired) { 182// this.hasBeenFired = hasBeenFired; 183// } 184// 185// 186// /** 187// * Gets the position x. 188// * 189// * @return the position x 190// */ 191// public float getPositionX() { 192// return positionX; 193// } 194// 195// 196// /** 197// * Gets the position y. 198// * 199// * @return the position y 200// */ 201// public float getPositionY() { 202// return positionY; 203// } 204// 205// 206// /** 207// * Gets the id. 208// * 209// * @return the id 210// */ 211// public int getId() { 212// return id; 213// } 214// 215// 216// /* (non-Javadoc) 217// * @see java.lang.Object#toString() 218// */ 219// public String toString(){ 220// return new String(super.toString() + "; " + " PosX: " + positionX + " PosY: " + positionY + " InputSource: " + this.getSource()); 221// } 222 223}