Revision 41971 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/RectangleBehavior.java
RectangleBehavior.java | ||
---|---|---|
110 | 110 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mousePressed(java.awt.event.MouseEvent) |
111 | 111 |
*/ |
112 | 112 |
public void mousePressed(MouseEvent e) { |
113 |
if( !isMyButton(e) ) { |
|
114 |
return; |
|
115 |
} |
|
113 | 116 |
if (e.getButton() == MouseEvent.BUTTON1) { |
114 | 117 |
m_FirstPoint = e.getPoint(); |
115 | 118 |
getMapControl().repaint(); |
... | ... | |
125 | 128 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseReleased(java.awt.event.MouseEvent) |
126 | 129 |
*/ |
127 | 130 |
public void mouseReleased(MouseEvent e) throws BehaviorException { |
131 |
if( !isMyButton(e) ) { |
|
132 |
return; |
|
133 |
} |
|
128 | 134 |
if (m_FirstPoint == null) return; |
129 | 135 |
Point2D p1; |
130 | 136 |
Point2D p2; |
... | ... | |
182 | 188 |
* @see com.iver.cit.gvsig.fmap.tools.Behavior.Behavior#mouseDragged(java.awt.event.MouseEvent) |
183 | 189 |
*/ |
184 | 190 |
public void mouseDragged(MouseEvent e) { |
191 |
if( !isMyButton(e) ) { |
|
192 |
return; |
|
193 |
} |
|
185 | 194 |
m_LastPoint = e.getPoint(); |
186 | 195 |
getMapControl().repaint(); |
187 | 196 |
} |
Also available in: Unified diff