Revision 41971 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java
Behavior.java | ||
---|---|---|
64 | 64 |
* @author Luis W. Sevilla |
65 | 65 |
*/ |
66 | 66 |
public abstract class Behavior implements IBehavior { |
67 |
public static final int LEFT = 0;
|
|
68 |
public static final int MIDDLE = 1;
|
|
69 |
public static final int RIGHT = 2;
|
|
67 |
public static final int BUTTON_LEFT = 1;
|
|
68 |
public static final int BUTTON_MIDDLE = 2;
|
|
69 |
public static final int BUTTON_RIGHT = 4;
|
|
70 | 70 |
|
71 | 71 |
/** |
72 | 72 |
* Reference to the <code>MapControl</code> object that uses. |
... | ... | |
80 | 80 |
|
81 | 81 |
protected GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
82 | 82 |
|
83 |
private int mouseButton = LEFT;
|
|
83 |
protected int mouseButton = BUTTON_LEFT;
|
|
84 | 84 |
|
85 | 85 |
public Behavior() { |
86 | 86 |
|
... | ... | |
341 | 341 |
|
342 | 342 |
protected boolean isMyButton(MouseEvent e) { |
343 | 343 |
switch(this.mouseButton) { |
344 |
case LEFT: |
|
344 |
case BUTTON_LEFT:
|
|
345 | 345 |
default: |
346 | 346 |
return (SwingUtilities.isLeftMouseButton(e)); |
347 |
case MIDDLE: |
|
347 |
case BUTTON_MIDDLE:
|
|
348 | 348 |
return (SwingUtilities.isMiddleMouseButton(e)); |
349 |
case RIGHT: |
|
349 |
case BUTTON_RIGHT:
|
|
350 | 350 |
return (SwingUtilities.isRightMouseButton(e)); |
351 | 351 |
} |
352 | 352 |
} |
Also available in: Unified diff