Changeset 13504 in josm


Ignore:
Timestamp:
2018-03-04T19:22:49+01:00 (7 years ago)
Author:
Don-vip
Message:

see #11924, see #15560 - fix deprecation warning with Java 10

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java

    r12846 r13504  
    55
    66import java.awt.GraphicsEnvironment;
    7 import java.awt.Toolkit;
    87import java.awt.event.ActionEvent;
    98import java.awt.event.KeyEvent;
     
    2322import javax.swing.undo.UndoManager;
    2423
     24import org.openstreetmap.josm.Main;
    2525import org.openstreetmap.josm.spi.preferences.Config;
    2626import org.openstreetmap.josm.tools.ImageProvider;
     
    8686                if (!GraphicsEnvironment.isHeadless()) {
    8787                    component.getInputMap().put(
    88                             KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), undoAction);
     88                            KeyStroke.getKeyStroke(KeyEvent.VK_Z, Main.platform.getMenuShortcutKeyMaskEx()), undoAction);
    8989                    component.getInputMap().put(
    90                             KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), redoAction);
     90                            KeyStroke.getKeyStroke(KeyEvent.VK_Y, Main.platform.getMenuShortcutKeyMaskEx()), redoAction);
    9191                }
    9292            }
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r13450 r13504  
    284284     */
    285285    default int getMenuShortcutKeyMaskEx() {
     286        // To remove when switching to Java 10+, and use Toolkit.getMenuShortcutKeyMaskEx instead
    286287        return KeyEvent.CTRL_DOWN_MASK;
    287288    }
Note: See TracChangeset for help on using the changeset viewer.