Revision 20100 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/Behavior/MouseMovementBehavior.java
MouseMovementBehavior.java | ||
---|---|---|
49 | 49 |
|
50 | 50 |
|
51 | 51 |
/** |
52 |
* Behaviour que espera un listener de tipo PointListener. |
|
52 |
* <p>Behavior that permits user to move and drag the mouse on the image of the associated |
|
53 |
* <code>MapControl</code> instance using a {@link PointListener PointListener}.</p> |
|
53 | 54 |
* |
54 | 55 |
* @author Vicente Caballero Navarro |
55 | 56 |
*/ |
56 | 57 |
public class MouseMovementBehavior extends Behavior { |
58 |
/** |
|
59 |
* Tool listener used to work with the <code>MapControl</code> object. |
|
60 |
* |
|
61 |
* @see #getListener() |
|
62 |
* @see #setListener(ToolListener) |
|
63 |
*/ |
|
57 | 64 |
protected PointListener listener; |
58 | 65 |
|
59 | 66 |
/** |
60 |
* Crea un nuevo MouseMovementBehavior.
|
|
67 |
* <p>Creates a new behavior for moving or dragging the mouse on the image of the associated <code>MapControl</code> instance.</p>
|
|
61 | 68 |
* |
62 |
* @param mli listener.
|
|
69 |
* @param mli listener used to permit this object to work with the associated <code>MapControl</code>
|
|
63 | 70 |
*/ |
64 | 71 |
public MouseMovementBehavior(PointListener mli) { |
65 | 72 |
listener = mli; |
66 | 73 |
} |
67 | 74 |
|
68 |
/** |
|
69 |
* @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent) |
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseDragged(java.awt.event.MouseEvent) |
|
70 | 78 |
*/ |
71 | 79 |
public void mouseDragged(MouseEvent e) throws BehaviorException { |
72 | 80 |
mouseMoved(e); |
73 | 81 |
} |
74 | 82 |
|
75 |
/** |
|
76 |
* @see java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent) |
|
83 |
/* |
|
84 |
* (non-Javadoc) |
|
85 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseMoved(java.awt.event.MouseEvent) |
|
77 | 86 |
*/ |
78 | 87 |
public void mouseMoved(MouseEvent E) throws BehaviorException { |
79 | 88 |
PointEvent event = new PointEvent(E.getPoint(), E); |
... | ... | |
81 | 90 |
} |
82 | 91 |
|
83 | 92 |
/** |
84 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#setListener(com.iver.cit.gvsig.fmap.tools.ToolListener) |
|
93 |
* <p>Sets a tool listener to work with the <code>MapControl</code> using this behavior.</p> |
|
94 |
* |
|
95 |
* @param listener a <code>PointListener</code> object for this behavior |
|
85 | 96 |
*/ |
86 | 97 |
public void setListener(ToolListener listener) { |
87 | 98 |
this.listener = (PointListener) listener; |
88 | 99 |
} |
89 | 100 |
|
90 |
/** |
|
101 |
/* |
|
102 |
* (non-Javadoc) |
|
91 | 103 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#getListener() |
92 | 104 |
*/ |
93 | 105 |
public ToolListener getListener() { |
Also available in: Unified diff