PageRenderTime 42ms CodeModel.GetById 31ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

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