Revision 20100 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/Events/MoveEvent.java
MoveEvent.java | ||
---|---|---|
45 | 45 |
|
46 | 46 |
|
47 | 47 |
/** |
48 |
* Evento de movimiento sobre la vista.
|
|
48 |
* <p><code>MoveEvent</code> is used to notify a movement of the mouse between two points 2D.</p>
|
|
49 | 49 |
* |
50 | 50 |
* @author Vicente Caballero Navarro |
51 | 51 |
*/ |
52 | 52 |
public class MoveEvent { |
53 |
private Point2D from; |
|
53 |
/** |
|
54 |
* <p>Initial position of the drag & drop movement.</p> |
|
55 |
*/ |
|
56 |
private Point2D from; |
|
57 |
|
|
58 |
/** |
|
59 |
* <p>Final position of the drag & drop movement.</p> |
|
60 |
*/ |
|
54 | 61 |
private Point2D to; |
62 |
|
|
63 |
/** |
|
64 |
* <p>Mouse event that has been the cause of creating this one.</p> |
|
65 |
*/ |
|
55 | 66 |
private MouseEvent event; |
56 | 67 |
|
57 | 68 |
/** |
58 |
* Crea un nuevo MoveEvent.
|
|
69 |
* <p>Creates a new <code>MoveEvent</code> with all necessary data.</p>
|
|
59 | 70 |
* |
60 |
* @param from origen. |
|
61 |
* @param to destino. |
|
71 |
* @param from initial 2D position of the movement |
|
72 |
* @param to final 2D position of the movement |
|
73 |
* @param e mouse event that has been the cause of creating this one |
|
62 | 74 |
*/ |
63 | 75 |
public MoveEvent(Point2D from, Point2D to, MouseEvent e) { |
64 | 76 |
this.from = from; |
... | ... | |
67 | 79 |
} |
68 | 80 |
|
69 | 81 |
/** |
70 |
* Devuelve el punto inical del movimiento.
|
|
82 |
* <p>Gets the initial 2D position of the movement.</p>
|
|
71 | 83 |
* |
72 |
* @return Punto inicial.
|
|
84 |
* @return initial 2D position of the movement
|
|
73 | 85 |
*/ |
74 | 86 |
public Point2D getFrom() { |
75 | 87 |
return from; |
76 | 88 |
} |
77 | 89 |
|
78 | 90 |
/** |
79 |
* Devuelve el punto finale del movimiento.
|
|
91 |
* <p>Gets the final 2D position of the movement.</p>
|
|
80 | 92 |
* |
81 |
* @return Punto final.
|
|
93 |
* @return final 2D position of the movement
|
|
82 | 94 |
*/ |
83 | 95 |
public Point2D getTo() { |
84 | 96 |
return to; |
85 | 97 |
} |
98 |
|
|
99 |
/** |
|
100 |
* <p>Gets the event that has been the cause of creating this one.</p> |
|
101 |
* |
|
102 |
* @return mouse event that has been the cause of creating this one |
|
103 |
*/ |
|
86 | 104 |
public MouseEvent getEvent() { |
87 | 105 |
return event; |
88 | 106 |
} |
Also available in: Unified diff