mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8183518: Premature deprecation of Event/InputEvent/KeyEvent in Java 9
Reviewed-by: prr, psadhukhan
This commit is contained in:
parent
6a21c771ec
commit
d8efdbc4a2
10 changed files with 99 additions and 46 deletions
|
@ -377,7 +377,6 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
|||
* keydown). Returns true if there is an associated
|
||||
* keyboard event.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean handleShortcut(KeyEvent e) {
|
||||
// Is it a key event?
|
||||
int id = e.getID();
|
||||
|
@ -386,8 +385,8 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
|||
}
|
||||
|
||||
// Is the accelerator modifier key pressed?
|
||||
int accelKey = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
|
||||
if ((e.getModifiers() & accelKey) == 0) {
|
||||
int accelKey = Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
|
||||
if ((e.getModifiersEx() & accelKey) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue