< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -500,34 +500,22 @@
default:
return false;
}
}
- /**
- * Determines which modifier key is the appropriate accelerator
- * key for menu shortcuts.
- * <p>
- * Menu shortcuts, which are embodied in the
- * {@code MenuShortcut} class, are handled by the
- * {@code MenuBar} class.
- * <p>
- * By default, this method returns {@code Event.CTRL_MASK}.
- * Toolkit implementations should override this method if the
- * <b>Control</b> key isn't the correct key for accelerators.
- * @return the modifier mask on the {@code Event} class
- * that is used for menu shortcuts on this toolkit.
- * @see java.awt.MenuBar
- * @see java.awt.MenuShortcut
- * @since 1.1
- */
@Override
- @SuppressWarnings("deprecation")
+ @Deprecated(since = "10")
public int getMenuShortcutKeyMask() {
return Event.META_MASK;
}
@Override
+ public int getMenuShortcutKeyMaskEx() {
+ return InputEvent.META_DOWN_MASK;
+ }
+
+ @Override
public Image getImage(final String filename) {
final Image nsImage = checkForNSImage(filename);
if (nsImage != null) {
return nsImage;
}
< prev index next >