/src/org/mt4j/input/inputData/MTFingerInputEvt.java

http://mt4j.googlecode.com/ · 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. ***********************************************************************/
  18. package org.mt4j.input.inputData;
  19. import org.mt4j.components.interfaces.IMTComponent3D;
  20. import org.mt4j.input.inputSources.AbstractInputSource;
  21. /**
  22. * The Class MTFingerInputEvt.
  23. *
  24. * @author Christopher Ruff
  25. */
  26. public class MTFingerInputEvt extends AbstractCursorInputEvt{
  27. /**
  28. * Instantiates a new mT finger input evt.
  29. *
  30. * @param source the source
  31. * @param positionX the position x
  32. * @param positionY the position y
  33. * @param id the id
  34. * @param m the m
  35. */
  36. public MTFingerInputEvt(
  37. AbstractInputSource source,
  38. float positionX,
  39. float positionY,
  40. int id,
  41. InputCursor m
  42. ) {
  43. super(source, positionX, positionY, id, m);
  44. }
  45. /**
  46. * Instantiates a new mT finger input evt.
  47. *
  48. * @param source the source
  49. * @param target the target
  50. * @param positionX the position x
  51. * @param positionY the position y
  52. * @param id the id
  53. * @param m the m
  54. */
  55. public MTFingerInputEvt(
  56. AbstractInputSource source,
  57. IMTComponent3D target,
  58. float positionX,
  59. float positionY,
  60. int id,
  61. InputCursor m
  62. ) {
  63. super(source, target, positionX, positionY, id, m);
  64. }
  65. /* (non-Javadoc)
  66. * @see org.mt4j.input.inputData.AbstractCursorInputEvt#clone()
  67. */
  68. @Override
  69. public Object clone() throws CloneNotSupportedException {
  70. return new MTFingerInputEvt((AbstractInputSource) this.getSource(), this.getX(), this.getY(), this.getId(), this.getCursor());
  71. }
  72. // /** The Constant FINGER_DOWN. */
  73. // public static final int FINGER_DOWN = 0;
  74. //
  75. // /** The Constant FINGER_UPDATE. */
  76. // public static final int FINGER_UPDATE = 1;
  77. //
  78. // /** The Constant FINGER_UP. */
  79. // public static final int FINGER_UP = 2;
  80. //
  81. //
  82. // /** The has been fired. */
  83. // private boolean hasBeenFired; //TODO remove?
  84. //
  85. // /** The position x. */
  86. // private float positionX;
  87. //
  88. // /** The position y. */
  89. // private float positionY;
  90. //
  91. // /** The id. */
  92. // private int id;
  93. //
  94. //
  95. // /** The added to motion. */
  96. // private boolean addedToMotion;
  97. //
  98. // /** The associated motion. */
  99. // private InputMotion<? extends MTConcretePositionEvt> associatedMotion;
  100. //
  101. // /**
  102. // * Instantiates a new touch event.
  103. // *
  104. // * @param source the source
  105. // * @param positionX the position x
  106. // * @param positionY the position y
  107. // * @param id the id
  108. // * @param m the m
  109. // */
  110. // public MTFingerInputEvt(AbstractInputSource source, float positionX, float positionY, int id, InputMotion<? extends MTConcretePositionEvt> m) {
  111. // super(source);
  112. // hasBeenFired = false;
  113. // this.id = id;
  114. //
  115. // this.positionX = positionX;
  116. // this.positionY = positionY;
  117. //
  118. // this.associatedMotion = m;
  119. //
  120. // this.addedToMotion = false;
  121. // }
  122. //
  123. //
  124. //
  125. // /**
  126. // * Checks if is added to motion.
  127. // *
  128. // * @return true, if is added to motion
  129. // */
  130. // public boolean isAddedToMotion() {
  131. // return addedToMotion;
  132. // }
  133. //
  134. //
  135. //
  136. // /**
  137. // * Sets the added to motion.
  138. // *
  139. // * @param addedToMotion the new added to motion
  140. // */
  141. // public void setAddedToMotion(boolean addedToMotion) {
  142. // this.addedToMotion = addedToMotion;
  143. // }
  144. //
  145. //
  146. //
  147. // /**
  148. // * Checks if is checks for been fired.
  149. // *
  150. // * @return true, if is checks for been fired
  151. // */
  152. // public boolean isHasBeenFired() {
  153. // return hasBeenFired;
  154. // }
  155. //
  156. //
  157. // /**
  158. // * Gets the motion.
  159. // *
  160. // * @return the motion
  161. // */
  162. // public InputMotion<? extends MTConcretePositionEvt> getMotion() {
  163. // return associatedMotion;
  164. // }
  165. //
  166. //
  167. // /**
  168. // * Sets the checks for been fired.
  169. // *
  170. // * @param hasBeenFired the new checks for been fired
  171. // */
  172. // public void setHasBeenFired(boolean hasBeenFired) {
  173. // this.hasBeenFired = hasBeenFired;
  174. // }
  175. //
  176. //
  177. // /**
  178. // * Gets the position x.
  179. // *
  180. // * @return the position x
  181. // */
  182. // public float getPositionX() {
  183. // return positionX;
  184. // }
  185. //
  186. //
  187. // /**
  188. // * Gets the position y.
  189. // *
  190. // * @return the position y
  191. // */
  192. // public float getPositionY() {
  193. // return positionY;
  194. // }
  195. //
  196. //
  197. // /**
  198. // * Gets the id.
  199. // *
  200. // * @return the id
  201. // */
  202. // public int getId() {
  203. // return id;
  204. // }
  205. //
  206. //
  207. // /* (non-Javadoc)
  208. // * @see java.lang.Object#toString()
  209. // */
  210. // public String toString(){
  211. // return new String(super.toString() + "; " + " PosX: " + positionX + " PosY: " + positionY + " InputSource: " + this.getSource());
  212. // }
  213. }