Changeset 30650 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2014-09-16T03:28:37+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
r30628 r30650 40 40 41 41 public void mouseDragged(MouseEvent e) { 42 debugMouseEvent("DefaultMapController.mouseDragged", e);43 42 if (!movementEnabled || !isMoving) 44 43 return; 45 44 // Is only the selected mouse button pressed? 46 45 if ((e.getModifiersEx() & MOUSE_BUTTONS_MASK) == movementMouseButtonMask || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) { 47 if (JMapViewer.debug) {48 System.err.println("(#9897) moving");49 }50 46 Point p = e.getPoint(); 51 47 if (lastDragPoint != null) { … … 59 55 60 56 public void mouseClicked(MouseEvent e) { 61 debugMouseEvent("DefaultMapController.mouseClicked", e);62 57 if (doubleClickZoomEnabled && e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) { 63 58 map.zoomIn(e.getPoint()); … … 66 61 67 62 public void mousePressed(MouseEvent e) { 68 debugMouseEvent("DefaultMapController.mousePressed", e);69 70 63 if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) { 71 if (JMapViewer.debug) {72 System.err.println("(#9897) move start");73 }74 64 lastDragPoint = null; 75 65 isMoving = true; … … 78 68 79 69 public void mouseReleased(MouseEvent e) { 80 debugMouseEvent("DefaultMapController.mouseReleased", e);81 70 if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1) { 82 if (JMapViewer.debug) {83 System.err.println("(#9897) move stop");84 }85 71 lastDragPoint = null; 86 72 isMoving = false; 87 }88 }89 90 public void debugMouseEvent(String s, MouseEvent e) {91 if (JMapViewer.debug) {92 System.err.println("(#9897) " + s + ": Button "+ e.getButton() + " Modifiers: " +Integer.toBinaryString(e.getModifiersEx()));93 73 } 94 74 }
Note:
See TracChangeset
for help on using the changeset viewer.