Ignore:
Timestamp:
2009-07-25T18:17:36+02:00 (15 years ago)
Author:
Gubaer
Message:

removed global static variable
replaced usage of JOptionPane by OptionPaneUtil

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r1643 r1842  
    1414
    1515/**
    16   * see PlatformHook.java
    17   */
     16 * see PlatformHook.java
     17 */
    1818public class PlatformHookOsx extends PlatformHookUnixoid implements PlatformHook, InvocationHandler {
    1919    private static PlatformHookOsx ivhandler = new PlatformHookOsx();
     20    @Override
    2021    public void preStartupHook(){
    2122        // This will merge our MenuBar into the system menu.
     
    2526        System.setProperty("apple.laf.useScreenMenuBar", "true");
    2627    }
     28    @Override
    2729    public void startupHook() {
    2830        // Here we register callbacks for the menu entries in the system menu
     
    4244            System.out.println("Failed to register with OSX: " + ex);
    4345        }
    44 
    45         // Ctrl + mouse 1 is suppressing mouseDragged events
    46         SelectAction.needMouseMove = true;
    4746    }
    4847    public Object invoke (Object proxy, Method method, Object[] args) throws Throwable {
     
    5554        } else if (method.getName().equals("handlePreferences")) {
    5655            Main.main.menu.preferences.actionPerformed(null);
    57         } else {
     56        } else
    5857            return null;
    59         }
    6058        if (args[0] != null) {
    6159            try {
     
    6765        return null;
    6866    }
     67    @Override
    6968    public void openUrl(String url) throws IOException {
    7069        // Ain't that KISS?
    7170        Runtime.getRuntime().exec("open " + url);
    7271    }
     72    @Override
    7373    public void initShortcutGroups() {
    7474        // Everything but Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU is guesswork.
     
    9797        Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC),   Integer.toString(KeyEvent.ALT_DOWN_MASK));
    9898    }
     99    @Override
    99100    public void initSystemShortcuts() {
    100101        // Yeah, it's a long, long list. And people always complain that OSX has no shortcuts.
     
    235236
    236237    }
     238    @Override
    237239    public String makeTooltip(String name, Shortcut sc) {
    238240        String lafid = UIManager.getLookAndFeel().getID();
     
    243245        }
    244246        String result = "";
    245         if (canHtml) result += "<html>";
     247        if (canHtml) {
     248            result += "<html>";
     249        }
    246250        result += name;
    247251        if (sc != null && sc.getKeyText().length() != 0) {
    248252            result += " ";
    249             if (canHtml) result += "<font size='-2'>";
     253            if (canHtml) {
     254                result += "<font size='-2'>";
     255            }
    250256            result += "("+sc.getKeyText()+")";
    251             if (canHtml) result += "</font>";
    252         }
    253         if (canHtml) result += "&nbsp;</html>";
     257            if (canHtml) {
     258                result += "</font>";
     259            }
     260        }
     261        if (canHtml) {
     262            result += "&nbsp;</html>";
     263        }
    254264        return result;
    255265    }
Note: See TracChangeset for help on using the changeset viewer.