/src/org/mt4j/input/inputProcessors/componentProcessors/lassoProcessor/LassoEvent.java

http://mt4j.googlecode.com/ · Java · 93 lines · 26 code · 18 blank · 49 comment · 0 complexity · 989c6f43c21178048f5009d9ad08afda MD5 · raw file

  1. /***********************************************************************
  2. * mt4j Copyright (c) 2008 - 2009, C.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.inputProcessors.componentProcessors.lassoProcessor;
  19. import org.mt4j.components.interfaces.IMTComponent3D;
  20. import org.mt4j.components.visibleComponents.shapes.MTPolygon;
  21. import org.mt4j.input.inputData.InputCursor;
  22. import org.mt4j.input.inputProcessors.IInputProcessor;
  23. import org.mt4j.input.inputProcessors.MTGestureEvent;
  24. /**
  25. * The Class ClusteringEvent.
  26. * @author Christopher Ruff
  27. */
  28. public class LassoEvent extends MTGestureEvent {
  29. /** The selection poly. */
  30. private MTPolygon selectionPoly;
  31. /** The motion. */
  32. private InputCursor motion;
  33. /** The selected comps. */
  34. private IdragClusterable[] selectedComps;
  35. /**
  36. * Instantiates a new clustering event.
  37. *
  38. * @param source the source
  39. * @param id the id
  40. * @param targetComponent the target component
  41. * @param motion the motion
  42. * @param selectionPoly the selection poly
  43. * @param selectedComponents the selected components
  44. */
  45. public LassoEvent(IInputProcessor source, int id, IMTComponent3D targetComponent, InputCursor motion, MTPolygon selectionPoly, IdragClusterable[] selectedComponents) {
  46. super(source, id, targetComponent);
  47. this.motion = motion;
  48. this.selectionPoly = selectionPoly;
  49. this.selectedComps = selectedComponents;
  50. }
  51. /**
  52. * Gets the motion.
  53. *
  54. * @return the motion
  55. */
  56. public InputCursor getCursor() {
  57. return motion;
  58. }
  59. /**
  60. * Gets the clustered components.
  61. *
  62. * @return the clustered components
  63. */
  64. public IdragClusterable[] getClusteredComponents() {
  65. return selectedComps;
  66. }
  67. /**
  68. * Gets the selection poly.
  69. *
  70. * @return the selection poly
  71. */
  72. public MTPolygon getSelectionPoly() {
  73. return selectionPoly;
  74. }
  75. }