Ignore:
Timestamp:
2009-08-10T13:38:54+02:00 (15 years ago)
Author:
guggis
Message:

Removed dependencies to org.openstreetmap.josm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java

    r16939 r16969  
    99import java.awt.event.MouseWheelEvent;
    1010import java.awt.event.MouseWheelListener;
    11 
    12 import org.openstreetmap.josm.Main;
    13 import org.openstreetmap.josm.tools.PlatformHookOsx;
    1411
    1512/**
     
    115112        this.movementMouseButton = movementMouseButton;
    116113        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");
    128125        }
    129126    }
     
    178175     */
    179176    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");
    181179    }
    182 
    183180}
Note: See TracChangeset for help on using the changeset viewer.