Revision 41964 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PointBehavior.java
PointBehavior.java | ||
---|---|---|
57 | 57 |
* |
58 | 58 |
* @param l listener used to permit this object to work with the associated <code>MapControl</code> |
59 | 59 |
*/ |
60 |
public PointBehavior(PointListener l, int mouseButton) { |
|
61 |
super(mouseButton); |
|
62 |
listener = l; |
|
63 |
} |
|
64 |
|
|
60 | 65 |
public PointBehavior(PointListener l) { |
61 |
listener = l;
|
|
66 |
this(l,LEFT);
|
|
62 | 67 |
} |
63 | 68 |
|
64 | 69 |
/* |
... | ... | |
66 | 71 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mousePressed(java.awt.event.MouseEvent) |
67 | 72 |
*/ |
68 | 73 |
public void mousePressed(MouseEvent e) { |
74 |
if( !isMyButton(e) ) { |
|
75 |
return; |
|
76 |
} |
|
69 | 77 |
if (listener.cancelDrawing()) { |
70 | 78 |
getMapControl().cancelDrawing(); |
71 | 79 |
} |
... | ... | |
79 | 87 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseReleased(java.awt.event.MouseEvent) |
80 | 88 |
*/ |
81 | 89 |
public void mouseReleased(MouseEvent e) throws BehaviorException { |
90 |
if( !isMyButton(e) ) { |
|
91 |
return; |
|
92 |
} |
|
82 | 93 |
PointEvent event = new PointEvent(e.getPoint(), e, this.getMapControl()); |
83 | 94 |
listener.point(event); |
84 | 95 |
if (doubleClick){ |
Also available in: Unified diff