Changeset 16969 in osm for applications/viewer/jmapviewer/src/org/openstreetmap
- Timestamp:
- 2009-08-10T13:38:54+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
r16939 r16969 9 9 import java.awt.event.MouseWheelEvent; 10 10 import java.awt.event.MouseWheelListener; 11 12 import org.openstreetmap.josm.Main;13 import org.openstreetmap.josm.tools.PlatformHookOsx;14 11 15 12 /** … … 115 112 this.movementMouseButton = movementMouseButton; 116 113 switch (movementMouseButton) { 117 case MouseEvent.BUTTON1:118 movementMouseButtonMask = MouseEvent.BUTTON1_DOWN_MASK;119 break;120 case MouseEvent.BUTTON2:121 movementMouseButtonMask = MouseEvent.BUTTON2_DOWN_MASK;122 break;123 case MouseEvent.BUTTON3:124 movementMouseButtonMask = MouseEvent.BUTTON3_DOWN_MASK;125 break;126 default:127 throw new RuntimeException("Unsupported button");114 case MouseEvent.BUTTON1: 115 movementMouseButtonMask = MouseEvent.BUTTON1_DOWN_MASK; 116 break; 117 case MouseEvent.BUTTON2: 118 movementMouseButtonMask = MouseEvent.BUTTON2_DOWN_MASK; 119 break; 120 case MouseEvent.BUTTON3: 121 movementMouseButtonMask = MouseEvent.BUTTON3_DOWN_MASK; 122 break; 123 default: 124 throw new RuntimeException("Unsupported button"); 128 125 } 129 126 } … … 178 175 */ 179 176 public static boolean isPlatformOsx() { 180 return Main.platform != null && Main.platform instanceof PlatformHookOsx; 177 String os = System.getProperty("os.name"); 178 return os != null && os.toLowerCase().startsWith("mac os x"); 181 179 } 182 183 180 }
Note:
See TracChangeset
for help on using the changeset viewer.