Revision 20100 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/Events/PointEvent.java
PointEvent.java | ||
---|---|---|
45 | 45 |
|
46 | 46 |
|
47 | 47 |
/** |
48 |
* Evento de un punto sobre la vista.
|
|
48 |
* <p><code>PointEvent</code> is used to notify a selection of a point with the mouse.</p>
|
|
49 | 49 |
* |
50 | 50 |
* @author Vicente Caballero Navarro |
51 | 51 |
*/ |
52 | 52 |
public class PointEvent { |
53 |
/** |
|
54 |
* <p>The point 2D associated to this event.</p> |
|
55 |
*/ |
|
53 | 56 |
private Point2D p; |
57 |
|
|
58 |
/** |
|
59 |
* <p>Mouse event that has been the cause of creating this one.</p> |
|
60 |
*/ |
|
54 | 61 |
private MouseEvent e; |
55 | 62 |
|
56 | 63 |
/** |
57 |
* Crea un nuevo PointEvent.
|
|
64 |
* <p>Creates a new <code>PointEvent</code> with all necessary data.</p>
|
|
58 | 65 |
* |
59 |
* @param p Punto. |
|
66 |
* @param p the point 2D associated to this event |
|
67 |
* @param e event that has been the cause of creating this one |
|
60 | 68 |
*/ |
61 | 69 |
public PointEvent(Point2D p, MouseEvent e) { |
62 | 70 |
this.p = p; |
... | ... | |
64 | 72 |
} |
65 | 73 |
|
66 | 74 |
/** |
67 |
* Returns the point in the MapContext where the mouse was clicked. Notice that |
|
68 |
* this is not the point in the screen but it is the world's point. |
|
75 |
* <p>Gets the point 2D where this event was produced.</p> |
|
69 | 76 |
* |
70 |
* @return Punto.
|
|
77 |
* @return the point 2D associated to this event
|
|
71 | 78 |
*/ |
72 | 79 |
public Point2D getPoint() { |
73 | 80 |
return p; |
74 | 81 |
} |
75 | 82 |
|
76 | 83 |
/** |
77 |
* Inserta el punto.
|
|
84 |
* <p>Sets the point 2D where this event was produced.</p>
|
|
78 | 85 |
* |
79 |
* @param p Punto.
|
|
86 |
* @param the point 2D associated to this event
|
|
80 | 87 |
*/ |
81 | 88 |
public void setPoint(Point2D p) { |
82 | 89 |
this.p = p; |
83 | 90 |
} |
84 | 91 |
|
85 |
/** |
|
86 |
* Obtiene el evento de bajo nivel que produjo |
|
87 |
* este evento |
|
88 |
* |
|
89 |
* @return DOCUMENT ME! |
|
90 |
*/ |
|
92 |
/** |
|
93 |
* <p>Gets the event that has been the cause of creating this one.</p> |
|
94 |
* |
|
95 |
* @return mouse event that has been the cause of creating this one |
|
96 |
*/ |
|
91 | 97 |
public MouseEvent getEvent() { |
92 | 98 |
return e; |
93 | 99 |
} |
Also available in: Unified diff