8143077: Deprecate InputEvent._MASK in favor of InputEvent._DOWN_MASK
Reviewed-by: prr, alexsch, azvegint, mchung, egahlin
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java Tue Jan 31 19:22:35 2017 +0300
@@ -154,9 +154,15 @@
protected JList<Object> createList() {
return new JList<Object>(comboBox.getModel()) {
@Override
+ @SuppressWarnings("deprecation")
public void processMouseEvent(MouseEvent e) {
if (e.isMetaDown()) {
- e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), e.getModifiers() ^ InputEvent.META_MASK, e.getX(), e.getY(), e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON);
+ e = new MouseEvent((Component) e.getSource(), e.getID(),
+ e.getWhen(),
+ e.getModifiers() ^ InputEvent.META_MASK,
+ e.getX(), e.getY(), e.getXOnScreen(),
+ e.getYOnScreen(), e.getClickCount(),
+ e.isPopupTrigger(), MouseEvent.NOBUTTON);
}
super.processMouseEvent(e);
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -137,6 +137,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
public void mouseEntered(final MouseEvent e) {
if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) return;
String title = fFrame.getTitle();
@@ -146,6 +147,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
public void mouseExited(final MouseEvent e) {
if (fDockLabel != null && (e.getModifiers() & InputEvent.BUTTON1_MASK) == 0) fDockLabel.hide();
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -555,6 +555,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
public void mouseDragged(final MouseEvent e) {
// do not forward drags
// if (didForwardEvent(e)) return;
@@ -621,7 +622,7 @@
return didForwardEvent;
}
-
+ @SuppressWarnings("deprecation")
boolean didForwardEventInternal(final MouseEvent e) {
if (fDraggingFrame) return false;
@@ -927,11 +928,15 @@
return (w - x) + (h - y) < 12;
}
+ @SuppressWarnings("deprecation")
void forwardEventToFrame(final MouseEvent e) {
final Point pt = new Point();
final Component c = getComponentToForwardTo(e, pt);
if (c == null) return;
- c.dispatchEvent(new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(), pt.x, pt.y, e.getClickCount(), e.isPopupTrigger(), e.getButton()));
+ c.dispatchEvent(
+ new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(),
+ pt.x, pt.y, e.getClickCount(),
+ e.isPopupTrigger(), e.getButton()));
}
Component getComponentToForwardTo(final MouseEvent e, final Point dst) {
@@ -993,6 +998,7 @@
public void mouseMoved(final MouseEvent e) { }
@Override
+ @SuppressWarnings("deprecation")
public void mouseWheelMoved(final MouseWheelEvent e) {
final Point pt = new Point();
final Component c = getComponentToForwardTo(e, pt);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java Tue Jan 31 19:22:35 2017 +0300
@@ -74,7 +74,10 @@
kUCapsLockGlyph = 0x21EA;
static final int ALT_GRAPH_MASK = 1 << 5; // New to Java2
- static final int sUnsupportedModifiersMask = ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK | InputEvent.META_MASK | ALT_GRAPH_MASK);
+ @SuppressWarnings("deprecation")
+ static final int sUnsupportedModifiersMask =
+ ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK
+ | InputEvent.META_MASK | ALT_GRAPH_MASK);
interface Client {
public void paintBackground(Graphics g, JComponent c, int menuWidth, int menuHeight);
@@ -86,6 +89,7 @@
}
// Return a string with the proper modifier glyphs
+ @SuppressWarnings("deprecation")
private static String getKeyModifiersUnicode(final int modifiers, final boolean isLeftToRight) {
final StringBuilder buf = new StringBuilder(2);
// Order (from StandardMenuDef.c): control, option(alt), shift, cmd
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -515,6 +515,7 @@
/**
* Adds the specified mnemonic at the specified index.
*/
+ @SuppressWarnings("deprecation")
private void addMnemonic(final int index, final int mnemonic) {
if (mnemonicToIndexMap == null) {
initMnemonics();
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -1224,6 +1224,7 @@
* Changes the target of the AWTEvent from awt component to appropriate
* swing delegate.
*/
+ @SuppressWarnings("deprecation")
private AWTEvent createDelegateEvent(final AWTEvent e) {
// TODO modifiers should be changed to getModifiers()|getModifiersEx()?
AWTEvent delegateEvent = null;
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -302,6 +302,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
protected void processMouseEvent(final MouseEvent e) {
super.processMouseEvent(e);
if (e.getID() == MouseEvent.MOUSE_CLICKED && e.getClickCount() == 2) {
@@ -314,6 +315,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
protected void processKeyEvent(final KeyEvent e) {
super.processKeyEvent(e);
if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ENTER) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -93,6 +93,7 @@
InputEvent triggerEvent = trigger.getTriggerEvent();
Point dragOrigin = new Point(trigger.getDragOrigin());
+ @SuppressWarnings("deprecation")
int extModifiers = (triggerEvent.getModifiers() | triggerEvent.getModifiersEx());
long timestamp = triggerEvent.getWhen();
int clickCount = ((triggerEvent instanceof MouseEvent) ? (((MouseEvent) triggerEvent).getClickCount()) : 1);
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java Tue Jan 31 19:22:35 2017 +0300
@@ -63,7 +63,7 @@
CMenuComponent parent = (CMenuComponent)LWToolkit.targetToPeer(getTarget().getParent());
return parent.executeGet(ptr->nativeCreate(ptr, isSeparator()));
}
-
+ @SuppressWarnings("deprecation")
public void setLabel(String label, char keyChar, int keyCode, int modifiers) {
int keyMask = modifiers;
if (keyCode == KeyEvent.VK_UNDEFINED) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java Tue Jan 31 19:22:35 2017 +0300
@@ -46,6 +46,7 @@
private native long nativeShowPopupMenu(long modelPtr, int x, int y);
@Override
+ @SuppressWarnings("deprecation")
public void show(Event e) {
Component origin = (Component)e.target;
if (origin != null) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -68,6 +68,7 @@
public void setResizable(boolean resizable) {}
public void setEnabled(boolean enable) {}
public void setBounds(int x, int y, int width, int height) {}
+ @SuppressWarnings("deprecation")
public boolean handleEvent(Event e) { return false; }
public void setForeground(Color c) {}
public void setBackground(Color c) {}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Tue Jan 31 19:22:35 2017 +0300
@@ -532,6 +532,7 @@
* @since 1.1
*/
@Override
+ @SuppressWarnings("deprecation")
public int getMenuShortcutKeyMask() {
return Event.META_MASK;
}
@@ -768,6 +769,7 @@
* stroke.
*/
@Override
+ @SuppressWarnings("deprecation")
public int getFocusAcceleratorKeyMask() {
return InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
}
@@ -777,6 +779,7 @@
* printable character.
*/
@Override
+ @SuppressWarnings("deprecation")
public boolean isPrintableCharacterModifiersMask(int mods) {
return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
}
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -236,7 +236,7 @@
}
});
}
-
+ @SuppressWarnings("deprecation")
void forwardEventToParent(MouseEvent e) {
getParent().dispatchEvent(new MouseEvent(
getParent(), e.getID(), e.getWhen(), e.getModifiers(),
@@ -329,7 +329,7 @@
}
});
}
-
+ @SuppressWarnings("deprecation")
void forwardEventToParent(MouseEvent e) {
getParent().dispatchEvent(new MouseEvent(
getParent(), e.getID(), e.getWhen(), e.getModifiers(),
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java Tue Jan 31 19:22:35 2017 +0300
@@ -139,10 +139,11 @@
}
/**
- * This method is not being used to paint menu item since
+ * @deprecated This method is not being used to paint menu item since
* 6.0 This code left for compatibility only. Do not use or
* override it, this will not cause any visible effect.
*/
+ @Deprecated(since = "9")
public static void paintMenuItem(Graphics g, JComponent c,
Icon checkIcon, Icon arrowIcon,
Color background, Color foreground,
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Tue Jan 31 19:22:35 2017 +0300
@@ -361,7 +361,7 @@
}
});
}
-
+ @SuppressWarnings("deprecation")
void forwardEventToParent(MouseEvent e) {
getParent().dispatchEvent(new MouseEvent(
getParent(), e.getID(), e.getWhen(), e.getModifiers(),
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java Tue Jan 31 19:22:35 2017 +0300
@@ -523,7 +523,8 @@
Object optionPaneMessageAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,12,10);
-
+ @SuppressWarnings("deprecation")
+ final int metaMask = KeyEvent.META_MASK;
Object[] defaults = {
"Desktop.background", table.get("desktop"),
@@ -635,8 +636,7 @@
"Menu.submenuPopupOffsetX", -2,
"Menu.submenuPopupOffsetY", 3,
"Menu.shortcutKeys", new int[]{
- SwingUtilities2.getSystemMnemonicKeyMask(),
- KeyEvent.META_MASK
+ SwingUtilities2.getSystemMnemonicKeyMask(), metaMask
},
"Menu.cancelMode", "hideMenuTree",
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -107,6 +107,7 @@
};
}
+ @SuppressWarnings("deprecation")
public boolean isPopupTrigger(MouseEvent e) {
return ((e.getID()==MouseEvent.MOUSE_PRESSED)
&& ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -155,6 +155,7 @@
/**
* Default bindings all keymaps implementing the Motif feel.
*/
+ @SuppressWarnings("deprecation")
static final JTextComponent.KeyBinding[] defaultBindings = {
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT,
InputEvent.CTRL_MASK),
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -63,6 +63,7 @@
private boolean contentOpaque = true;
+ @SuppressWarnings("deprecation")
protected void installDefaults() {
super.installDefaults();
contentOpaque = UIManager.getBoolean("TabbedPane.contentOpaque");
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -292,8 +292,12 @@
/**
* Constructs an AWTEvent object from the parameters of a 1.0-style event.
+ *
* @param event the old-style event
+ * @deprecated It is recommended that {@link #AWTEvent(Object, int)} be used
+ * instead
*/
+ @Deprecated(since = "9")
public AWTEvent(Event event) {
this(event.target, event.id);
}
@@ -436,6 +440,7 @@
* event class in java.awt.event because we don't want to make
* it public and it needs to be called from java.awt.
*/
+ @SuppressWarnings("deprecation")
Event convertToOld() {
Object src = getSource();
int newid = id;
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java Tue Jan 31 19:22:35 2017 +0300
@@ -350,6 +350,7 @@
* @throws NullPointerException if {@code anEvent} is null
* @return the {@code AWTKeyStroke} that precipitated the event
*/
+ @SuppressWarnings("deprecation")
public static AWTKeyStroke getAWTKeyStrokeForEvent(KeyEvent anEvent) {
int id = anEvent.getID();
switch(id) {
@@ -397,6 +398,7 @@
* @throws IllegalArgumentException if {@code s} is {@code null},
* or is formatted incorrectly
*/
+ @SuppressWarnings("deprecation")
public static AWTKeyStroke getAWTKeyStroke(String s) {
if (s == null) {
throw new IllegalArgumentException("String cannot be null");
@@ -708,6 +710,7 @@
}
}
+ @SuppressWarnings("deprecation")
private static int mapOldModifiers(int modifiers) {
if ((modifiers & InputEvent.SHIFT_MASK) != 0) {
modifiers |= InputEvent.SHIFT_DOWN_MASK;
@@ -737,6 +740,7 @@
return modifiers;
}
+ @SuppressWarnings("deprecation")
private static int mapNewModifiers(int modifiers) {
if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) {
modifiers |= InputEvent.SHIFT_MASK;
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java Tue Jan 31 19:22:35 2017 +0300
@@ -5036,6 +5036,7 @@
*
* Returns whether or not event was dispatched to an ancestor
*/
+ @SuppressWarnings("deprecation")
boolean dispatchMouseWheelToAncestor(MouseWheelEvent e) {
int newX, newY;
newX = e.getX() + getX(); // Coordinates take into account at least
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java Tue Jan 31 19:22:35 2017 +0300
@@ -4728,6 +4728,7 @@
* Listen for drag events posted in other hw components so we can
* track enter/exit regardless of where a drag originated
*/
+ @SuppressWarnings("deprecation")
public void eventDispatched(AWTEvent e) {
boolean isForeignDrag = (e instanceof MouseEvent) &&
!(e instanceof SunDropTargetEvent) &&
@@ -4826,6 +4827,7 @@
* If the target has been removed, we don't bother to send the
* message.
*/
+ @SuppressWarnings("deprecation")
void retargetMouseEvent(Component target, int id, MouseEvent e) {
if (target == null) {
return; // mouse is over another hw component or target is disabled
--- a/jdk/src/java.desktop/share/classes/java/awt/Event.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/Event.java Tue Jan 31 19:22:35 2017 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -24,8 +24,7 @@
*/
package java.awt;
-import java.awt.event.*;
-import java.io.*;
+import java.awt.event.KeyEvent;
/**
* <b>NOTE:</b> The {@code Event} class is obsolete and is
@@ -56,9 +55,12 @@
* {@code Event} class ({@code PGUP},
* {@code PGDN}, {@code F1}, {@code F2}, etc).
*
+ * @deprecated It is recommended that {@code AWTEvent} and its subclasses be
+ * used instead
* @author Sami Shaio
* @since 1.0
*/
+@Deprecated(since = "9")
public class Event implements java.io.Serializable {
private transient long data;
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Tue Jan 31 19:22:35 2017 +0300
@@ -415,6 +415,7 @@
* Initializes a KeyboardFocusManager.
*/
public KeyboardFocusManager() {
+ @SuppressWarnings("deprecation")
AWTKeyStroke[][] defaultFocusTraversalKeyStrokes = {
{
AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, 0, false),
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java Tue Jan 31 19:22:35 2017 +0300
@@ -375,6 +375,7 @@
* 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();
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Tue Jan 31 19:22:35 2017 +0300
@@ -379,6 +379,7 @@
}
} else { // backward compatibility
+ @SuppressWarnings("deprecation")
Event olde = e.convertToOld();
if (olde != null) {
postEvent(olde);
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java Tue Jan 31 19:22:35 2017 +0300
@@ -435,6 +435,7 @@
* keydown) and the item is enabled.
* Returns true if there is an associated shortcut.
*/
+ @SuppressWarnings("deprecation")
boolean handleShortcut(KeyEvent e) {
MenuShortcut s = new MenuShortcut(e.getKeyCode(),
(e.getModifiers() & InputEvent.SHIFT_MASK) > 0);
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java Tue Jan 31 19:22:35 2017 +0300
@@ -180,6 +180,7 @@
* @return a string representation of this MenuShortcut.
* @since 1.1
*/
+ @SuppressWarnings("deprecation")
public String toString() {
int modifiers = 0;
if (!GraphicsEnvironment.isHeadless()) {
--- a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java Tue Jan 31 19:22:35 2017 +0300
@@ -154,6 +154,7 @@
* parent's hierarchy
* @exception RuntimeException if the parent is not showing on screen
*/
+ @SuppressWarnings("deprecation")
public void show(Component origin, int x, int y) {
// Use localParent for thread safety.
MenuContainer localParent = parent;
--- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java Tue Jan 31 19:22:35 2017 +0300
@@ -137,6 +137,7 @@
initLegalButtonMask();
}
+ @SuppressWarnings("deprecation")
private static synchronized void initLegalButtonMask() {
if (LEGAL_BUTTON_MASK != 0) return;
--- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Tue Jan 31 19:22:35 2017 +0300
@@ -1067,6 +1067,7 @@
* @see java.awt.MenuShortcut
* @since 1.1
*/
+ @SuppressWarnings("deprecation")
public int getMenuShortcutKeyMask() throws HeadlessException {
GraphicsEnvironment.checkHeadless();
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -281,6 +281,7 @@
* The mouse modifiers have higher priority than overlaying key
* modifiers.
*/
+ @SuppressWarnings("deprecation")
private void setNewModifiers() {
if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) {
gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK;
@@ -305,6 +306,7 @@
/**
* Sets old modifiers by the new ones.
*/
+ @SuppressWarnings("deprecation")
private void setOldModifiers() {
if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) {
gestureModifiers |= InputEvent.BUTTON1_MASK;
--- a/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -26,7 +26,6 @@
package java.awt.event;
import java.awt.AWTEvent;
-import java.awt.Event;
import java.lang.annotation.Native;
/**
@@ -63,25 +62,25 @@
* The shift modifier. An indicator that the shift key was held
* down during the event.
*/
- public static final int SHIFT_MASK = Event.SHIFT_MASK;
+ public static final int SHIFT_MASK = 1 << 0;
/**
* The control modifier. An indicator that the control key was held
* down during the event.
*/
- public static final int CTRL_MASK = Event.CTRL_MASK;
+ public static final int CTRL_MASK = 1 << 1;
/**
* The meta modifier. An indicator that the meta key was held
* down during the event.
*/
- public static final int META_MASK = Event.META_MASK;
+ public static final int META_MASK = 1 << 2;
/**
* The alt modifier. An indicator that the alt key was held
* down during the event.
*/
- public static final int ALT_MASK = Event.ALT_MASK;
+ public static final int ALT_MASK = 1 << 3;
/**
@@ -274,6 +273,7 @@
*
* @return a string identifying the event and its associated command
*/
+ @SuppressWarnings("deprecation")
public String paramString() {
String typeStr;
switch(id) {
--- a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, 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
@@ -62,51 +62,76 @@
/**
* The Shift key modifier constant.
- * It is recommended that SHIFT_DOWN_MASK be used instead.
+ *
+ * @deprecated It is recommended that SHIFT_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int SHIFT_MASK = Event.SHIFT_MASK;
/**
* The Control key modifier constant.
- * It is recommended that CTRL_DOWN_MASK be used instead.
+ *
+ * @deprecated It is recommended that CTRL_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int CTRL_MASK = Event.CTRL_MASK;
/**
* The Meta key modifier constant.
- * It is recommended that META_DOWN_MASK be used instead.
+ *
+ * @deprecated It is recommended that META_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int META_MASK = Event.META_MASK;
/**
* The Alt key modifier constant.
- * It is recommended that ALT_DOWN_MASK be used instead.
+ *
+ * @deprecated It is recommended that ALT_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int ALT_MASK = Event.ALT_MASK;
/**
* The AltGraph key modifier constant.
+ *
+ * @deprecated It is recommended that ALT_GRAPH_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int ALT_GRAPH_MASK = 1 << 5;
/**
* The Mouse Button1 modifier constant.
- * It is recommended that BUTTON1_DOWN_MASK be used instead.
+ *
+ * @deprecated It is recommended that BUTTON1_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public static final int BUTTON1_MASK = 1 << 4;
/**
* The Mouse Button2 modifier constant.
- * It is recommended that BUTTON2_DOWN_MASK be used instead.
- * Note that BUTTON2_MASK has the same value as ALT_MASK.
+ *
+ * @deprecated It is recommended that BUTTON2_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead. Note that
+ * BUTTON2_MASK has the same value as ALT_MASK.
*/
+ @Deprecated(since = "9")
public static final int BUTTON2_MASK = Event.ALT_MASK;
/**
* The Mouse Button3 modifier constant.
- * It is recommended that BUTTON3_DOWN_MASK be used instead.
- * Note that BUTTON3_MASK has the same value as META_MASK.
+ *
+ * @deprecated It is recommended that BUTTON3_DOWN_MASK and
+ * {@link #getModifiersEx()} be used instead. Note that
+ * BUTTON3_MASK has the same value as META_MASK.
*/
+ @Deprecated(since = "9")
public static final int BUTTON3_MASK = Event.META_MASK;
/**
@@ -159,7 +184,7 @@
/**
* An array of extended modifiers for additional buttons.
- * @see getButtonDownMasks
+ * @see #getButtonDownMasks()
* There are twenty buttons fit into 4byte space.
* one more bit is reserved for FIRST_HIGH_BIT.
* @since 1.7
@@ -382,7 +407,7 @@
* @return whether or not the Shift modifier is down on this event
*/
public boolean isShiftDown() {
- return (modifiers & SHIFT_MASK) != 0;
+ return (modifiers & SHIFT_DOWN_MASK) != 0;
}
/**
@@ -390,7 +415,7 @@
* @return whether or not the Control modifier is down on this event
*/
public boolean isControlDown() {
- return (modifiers & CTRL_MASK) != 0;
+ return (modifiers & CTRL_DOWN_MASK) != 0;
}
/**
@@ -398,7 +423,7 @@
* @return whether or not the Meta modifier is down on this event
*/
public boolean isMetaDown() {
- return (modifiers & META_MASK) != 0;
+ return (modifiers & META_DOWN_MASK) != 0;
}
/**
@@ -406,7 +431,7 @@
* @return whether or not the Alt modifier is down on this event
*/
public boolean isAltDown() {
- return (modifiers & ALT_MASK) != 0;
+ return (modifiers & ALT_DOWN_MASK) != 0;
}
/**
@@ -414,7 +439,7 @@
* @return whether or not the AltGraph modifier is down on this event
*/
public boolean isAltGraphDown() {
- return (modifiers & ALT_GRAPH_MASK) != 0;
+ return (modifiers & ALT_GRAPH_DOWN_MASK) != 0;
}
/**
@@ -428,8 +453,12 @@
/**
* Returns the modifier mask for this event.
+ *
* @return the modifier mask for this event
+ * @deprecated It is recommended that extended modifier keys and
+ * {@link #getModifiersEx()} be used instead
*/
+ @Deprecated(since = "9")
public int getModifiers() {
return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -1169,6 +1169,7 @@
* @see #getKeyLocation()
* @since 1.4
*/
+ @SuppressWarnings("deprecation")
public KeyEvent(Component source, int id, long when, int modifiers,
int keyCode, char keyChar, int keyLocation) {
super(source, id, when, modifiers);
@@ -1561,7 +1562,10 @@
* @return string a text description of the combination of modifier
* keys that were held down during the event
* @see InputEvent#getModifiersExText(int)
+ * @deprecated It is recommended that extended modifier keys and
+ * {@link InputEvent#getModifiersExText(int)} be used instead
*/
+ @Deprecated(since = "9")
public static String getKeyModifiersText(int modifiers) {
StringBuilder buf = new StringBuilder();
if ((modifiers & InputEvent.META_MASK) != 0) {
@@ -1696,6 +1700,7 @@
*
* @return a string identifying the event and its attributes
*/
+ @SuppressWarnings("deprecation")
public String paramString() {
StringBuilder str = new StringBuilder(100);
@@ -1821,6 +1826,7 @@
* Sets new modifiers by the old ones. The key modifiers
* override overlapping mouse modifiers.
*/
+ @SuppressWarnings("deprecation")
private void setNewModifiers() {
if ((modifiers & SHIFT_MASK) != 0) {
modifiers |= SHIFT_DOWN_MASK;
@@ -1845,6 +1851,7 @@
/**
* Sets old modifiers by the new ones.
*/
+ @SuppressWarnings("deprecation")
private void setOldModifiers() {
if ((modifiers & SHIFT_DOWN_MASK) != 0) {
modifiers |= SHIFT_MASK;
@@ -1871,6 +1878,7 @@
* override overlapping mouse modifiers.
* @serial
*/
+ @SuppressWarnings("deprecation")
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
s.defaultReadObject();
--- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java Tue Jan 31 19:22:35 2017 +0300
@@ -733,6 +733,7 @@
* @see InputEvent#getMaskForButton(int)
* @since 1.6
*/
+ @SuppressWarnings("deprecation")
public MouseEvent(Component source, int id, long when, int modifiers,
int x, int y, int xAbs, int yAbs,
int clickCount, boolean popupTrigger, int button)
@@ -943,6 +944,7 @@
* @see InputEvent#getModifiersExText(int)
* @since 1.4
*/
+ @SuppressWarnings("deprecation")
public static String getMouseModifiersText(int modifiers) {
StringBuilder buf = new StringBuilder();
if ((modifiers & InputEvent.ALT_MASK) != 0) {
@@ -1007,6 +1009,7 @@
*
* @return a string identifying the event and its attributes
*/
+ @SuppressWarnings("deprecation")
public String paramString() {
StringBuilder str = new StringBuilder(80);
@@ -1066,6 +1069,7 @@
* Sets new modifiers by the old ones.
* Also sets button.
*/
+ @SuppressWarnings("deprecation")
private void setNewModifiers() {
if ((modifiers & BUTTON1_MASK) != 0) {
modifiers |= BUTTON1_DOWN_MASK;
@@ -1120,6 +1124,7 @@
/**
* Sets old modifiers by the new ones.
*/
+ @SuppressWarnings("deprecation")
private void setOldModifiers() {
if (id == MOUSE_PRESSED
|| id == MOUSE_RELEASED
@@ -1168,6 +1173,7 @@
* Sets new modifiers by the old ones.
* @serial
*/
+ @SuppressWarnings("deprecation")
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
s.defaultReadObject();
--- a/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -46,5 +46,6 @@
*
* @see PopupMenu#show(java.awt.Component, int, int)
*/
+ @SuppressWarnings("deprecation")
void show(Event e);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java Tue Jan 31 19:22:35 2017 +0300
@@ -82,6 +82,7 @@
/**
* Starts the timer targeting the passed in component.
*/
+ @SuppressWarnings("deprecation")
private void start(JComponent c, MouseEvent e) {
Point screenLocation = c.getLocationOnScreen();
@@ -156,6 +157,7 @@
* ActionListener method. Invoked when the Timer fires. This will scroll
* if necessary.
*/
+ @SuppressWarnings("deprecation")
public void actionPerformed(ActionEvent x) {
JComponent component = Autoscroller.component;
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java Tue Jan 31 19:22:35 2017 +0300
@@ -239,6 +239,7 @@
/**
* {@inheritDoc}
*/
+ @SuppressWarnings("deprecation")
public void setPressed(boolean b) {
if((isPressed() == b) || !isEnabled()) {
return;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java Tue Jan 31 19:22:35 2017 +0300
@@ -1235,6 +1235,7 @@
*
* @see EventListenerList
*/
+ @SuppressWarnings("deprecation")
protected void fireActionEvent() {
if (!firingActionEvent) {
// Set flag to ensure that an infinite loop is not created
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Tue Jan 31 19:22:35 2017 +0300
@@ -429,6 +429,7 @@
* Returns the Set of <code>KeyStroke</code>s to use if the component
* is managing focus for forward focus traversal.
*/
+ @SuppressWarnings("deprecation")
static Set<KeyStroke> getManagingFocusForwardTraversalKeys() {
synchronized(JComponent.class) {
if (managingFocusForwardTraversalKeys == null) {
@@ -445,6 +446,7 @@
* Returns the Set of <code>KeyStroke</code>s to use if the component
* is managing focus for backward focus traversal.
*/
+ @SuppressWarnings("deprecation")
static Set<KeyStroke> getManagingFocusBackwardTraversalKeys() {
synchronized(JComponent.class) {
if (managingFocusBackwardTraversalKeys == null) {
@@ -2886,6 +2888,7 @@
*
* @since 1.3
*/
+ @SuppressWarnings("deprecation")
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,
int condition, boolean pressed) {
InputMap map = getInputMap(condition, false);
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java Tue Jan 31 19:22:35 2017 +0300
@@ -1754,6 +1754,7 @@
* the event
* @see EventListenerList
*/
+ @SuppressWarnings("deprecation")
protected void fireActionPerformed(String command) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java Tue Jan 31 19:22:35 2017 +0300
@@ -1516,6 +1516,7 @@
* @see JComponent#setToolTipText
* @see JComponent#getToolTipText
*/
+ @SuppressWarnings("deprecation")
public String getToolTipText(MouseEvent event) {
if(event != null) {
Point p = event.getPoint();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java Tue Jan 31 19:22:35 2017 +0300
@@ -412,6 +412,7 @@
* @param path the <code>MenuElement</code> path array
* @param manager the <code>MenuSelectionManager</code>
*/
+ @SuppressWarnings("deprecation")
public void processMouseEvent(MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
processMenuDragMouseEvent(
new MenuDragMouseEvent(e.getComponent(), e.getID(),
@@ -435,6 +436,7 @@
* @param path the <code>MenuElement</code> path array
* @param manager the <code>MenuSelectionManager</code>
*/
+ @SuppressWarnings("deprecation")
public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
if (DEBUG) {
System.out.println("in JMenuItem.processKeyEvent/3 for " + getText() +
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java Tue Jan 31 19:22:35 2017 +0300
@@ -1385,6 +1385,7 @@
* @param path the <code>MenuElement</code> path array
* @param manager the <code>MenuSelectionManager</code>
*/
+ @SuppressWarnings("deprecation")
public void processKeyEvent(KeyEvent e, MenuElement path[],
MenuSelectionManager manager) {
MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(),
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java Tue Jan 31 19:22:35 2017 +0300
@@ -3410,8 +3410,10 @@
// Convert the event to the renderer's coordinate system
Rectangle cellRect = getCellRect(hitRowIndex, hitColumnIndex, false);
p.translate(-cellRect.x, -cellRect.y);
+ @SuppressWarnings("deprecation")
+ final int modifiers = event.getModifiers();
MouseEvent newEvent = new MouseEvent(component, event.getID(),
- event.getWhen(), event.getModifiers(),
+ event.getWhen(), modifiers,
p.x, p.y,
event.getXOnScreen(),
event.getYOnScreen(),
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java Tue Jan 31 19:22:35 2017 +0300
@@ -485,6 +485,7 @@
* first order.
* @see EventListenerList
*/
+ @SuppressWarnings("deprecation")
protected void fireActionPerformed() {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java Tue Jan 31 19:22:35 2017 +0300
@@ -372,6 +372,7 @@
/**
* Sets the pressed state of the toggle button.
*/
+ @SuppressWarnings("deprecation")
public void setPressed(boolean b) {
if ((isPressed() == b) || !isEnabled()) {
return;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java Tue Jan 31 19:22:35 2017 +0300
@@ -1568,9 +1568,10 @@
Rectangle pathBounds = getPathBounds(path);
p.translate(-pathBounds.x, -pathBounds.y);
+ @SuppressWarnings("deprecation")
+ final int modifiers = event.getModifiers();
newEvent = new MouseEvent(rComponent, event.getID(),
- event.getWhen(),
- event.getModifiers(),
+ event.getWhen(), modifiers,
p.x, p.y,
event.getXOnScreen(),
event.getYOnScreen(),
--- a/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java Tue Jan 31 19:22:35 2017 +0300
@@ -207,6 +207,7 @@
* want a crack at the event.
* If one of them wants it, then it will "DO-THE-RIGHT-THING"
*/
+ @SuppressWarnings("deprecation")
public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) {
if (e.isConsumed()) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java Tue Jan 31 19:22:35 2017 +0300
@@ -212,6 +212,7 @@
*
* @param event a MouseEvent object
*/
+ @SuppressWarnings("deprecation")
public void processMouseEvent(MouseEvent event) {
int screenX,screenY;
Point p;
--- a/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java Tue Jan 31 19:22:35 2017 +0300
@@ -346,6 +346,7 @@
*
* @return the new mouse event
*/
+ @SuppressWarnings("deprecation")
public static MouseEvent convertMouseEvent(Component source,
MouseEvent sourceEvent,
Component destination) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java Tue Jan 31 19:22:35 2017 +0300
@@ -89,6 +89,7 @@
*/
protected boolean heavyWeightPopupEnabled = false;
+ @SuppressWarnings("deprecation")
ToolTipManager() {
enterTimer = new Timer(750, new insideTimerAction());
enterTimer.setRepeats(false);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -1839,6 +1839,7 @@
// key. If it finds a key event that wasn't a navigation key it
// dispatches it to JComboBox.selectWithKeyChar() so that it can do
// type-ahead.
+ @SuppressWarnings("deprecation")
public void keyPressed( KeyEvent e ) {
if ( isNavigationKey(e.getKeyCode(), e.getModifiers()) ) {
lastTime = 0L;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java Tue Jan 31 19:22:35 2017 +0300
@@ -528,6 +528,7 @@
*/
protected JList<Object> createList() {
return new JList<Object>( comboBox.getModel() ) {
+ @SuppressWarnings("deprecation")
public void processMouseEvent(MouseEvent e) {
if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
// Fix for 4234053. Filter out the Control Key from the list.
@@ -1238,6 +1239,7 @@
protected MouseEvent convertMouseEvent( MouseEvent e ) {
Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
e.getPoint(), list );
+ @SuppressWarnings("deprecation")
MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
e.getID(),
e.getWhen(),
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java Tue Jan 31 19:22:35 2017 +0300
@@ -382,6 +382,7 @@
return c.getComponentOrientation().isLeftToRight();
}
+ @SuppressWarnings("deprecation")
static boolean isMenuShortcutKeyDown(InputEvent event) {
return (event.getModifiers() &
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -1024,7 +1024,7 @@
return;
}
}
-
+ @SuppressWarnings("deprecation")
public void mouseDragged(MouseEvent e) {
if ( startingBounds == null ) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -1026,6 +1026,7 @@
manager.processMouseEvent(e);
}
}
+ @SuppressWarnings("deprecation")
public void mouseEntered(MouseEvent e) {
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
int modifiers = e.getModifiers();
@@ -1037,6 +1038,7 @@
manager.setSelectedPath(getPath());
}
}
+ @SuppressWarnings("deprecation")
public void mouseExited(MouseEvent e) {
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -123,6 +123,7 @@
getPropertyPrefix() + ".actionMap");
}
+ @SuppressWarnings("deprecation")
void updateMnemonicBinding() {
int mnemonic = menuItem.getModel().getMnemonic();
int[] shortcutKeys = (int[])DefaultLookup.get(menuItem, this,
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -268,6 +268,7 @@
return list;
}
+ @SuppressWarnings("deprecation")
public boolean isPopupTrigger(MouseEvent e) {
return ((e.getID()==MouseEvent.MOUSE_RELEASED)
&& ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -328,6 +328,7 @@
/**
* Installs the UI defaults.
*/
+ @SuppressWarnings("deprecation")
protected void installDefaults(){
LookAndFeel.installBorder(splitPane, "SplitPane.border");
LookAndFeel.installColors(splitPane, "SplitPane.background",
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -868,6 +868,7 @@
public void keyReleased(KeyEvent e) { }
+ @SuppressWarnings("deprecation")
public void keyTyped(KeyEvent e) {
KeyStroke keyStroke = KeyStroke.getKeyStroke(e.getKeyChar(),
e.getModifiers());
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -525,7 +525,7 @@
* adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case
* editor is non editable
*/
-
+ @SuppressWarnings("deprecation")
void updateFocusTraversalKeys() {
/*
* Fix for 4514331 Non-editable JTextArea and similar
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -898,6 +898,7 @@
w.setCursor(lastCursor);
}
+ @SuppressWarnings("deprecation")
public void mouseClicked(MouseEvent ev) {
Window w = (Window)ev.getSource();
Frame f = null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -192,6 +192,7 @@
// that subclasses that randomly invoke this method will see varying
// results. If this becomes an issue, MetalToolTipUI should no longer be
// shared.
+ @SuppressWarnings("deprecation")
public String getAcceleratorString() {
if (tip == null || isAcceleratorHidden()) {
return "";
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java Tue Jan 31 19:22:35 2017 +0300
@@ -80,6 +80,7 @@
* Installs the UI defaults.
*/
@Override
+ @SuppressWarnings("deprecation")
protected void installDefaults() {
updateStyle(splitPane);
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Tue Jan 31 19:22:35 2017 +0300
@@ -384,6 +384,7 @@
* renderer and, therefore, the proper tip
* @return the tool tip for this component
*/
+ @SuppressWarnings("deprecation")
public String getToolTipText(MouseEvent event) {
String tip = null;
Point p = event.getPoint();
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Tue Jan 31 19:22:35 2017 +0300
@@ -372,6 +372,7 @@
/**
* Selects word based on the MouseEvent
*/
+ @SuppressWarnings("deprecation")
private void selectWord(MouseEvent e) {
if (selectedWordEvent != null
&& selectedWordEvent.getX() == e.getX()
@@ -405,6 +406,7 @@
* @param e the mouse event
* @see MouseListener#mouseClicked
*/
+ @SuppressWarnings("deprecation")
public void mouseClicked(MouseEvent e) {
if (getComponent() == null) {
return;
@@ -513,6 +515,7 @@
/**
* Adjusts the caret location based on the MouseEvent.
*/
+ @SuppressWarnings("deprecation")
private void adjustCaret(MouseEvent e) {
if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0 &&
getDot() != -1) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java Tue Jan 31 19:22:35 2017 +0300
@@ -4103,6 +4103,7 @@
get(FOCUSED_COMPONENT);
}
+ @SuppressWarnings("deprecation")
private int getCurrentEventModifiers() {
int modifiers = 0;
AWTEvent currentEvent = EventQueue.getCurrentEvent();
--- a/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -126,6 +126,7 @@
public void coalescePaintEvent(PaintEvent e) {
}
+ @SuppressWarnings("deprecation")
public boolean handleEvent(Event e) {
return false;
}
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Tue Jan 31 19:22:35 2017 +0300
@@ -1049,6 +1049,7 @@
/**
* Returns key modifiers used by Swing to set up a focus accelerator key stroke.
*/
+ @SuppressWarnings("deprecation")
public int getFocusAcceleratorKeyMask() {
return InputEvent.ALT_MASK;
}
@@ -1059,6 +1060,7 @@
* the way things work on Windows: here, pressing ctrl + alt allows user to enter
* characters from the extended character set (like euro sign or math symbols)
*/
+ @SuppressWarnings("deprecation")
public boolean isPrintableCharacterModifiersMask(int mods) {
return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK));
}
--- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Tue Jan 31 19:22:35 2017 +0300
@@ -1831,6 +1831,7 @@
private class Handler implements MouseListener {
private MouseListener doubleClickListener;
+ @SuppressWarnings("deprecation")
public void mouseClicked(MouseEvent evt) {
JComponent source = (JComponent)evt.getSource();
--- a/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java Tue Jan 31 19:22:35 2017 +0300
@@ -175,6 +175,7 @@
arrowSize.origWidth = arrowSize.width;
}
+ @SuppressWarnings("deprecation")
private String getAccText(String acceleratorDelimiter) {
String accText = "";
KeyStroke accelerator = mi.getAccelerator();
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Tue Jan 31 19:22:35 2017 +0300
@@ -1460,7 +1460,7 @@
*
* @param ie InputEvent to check
*/
-
+ @SuppressWarnings("deprecation")
private static boolean isAccessClipboardGesture(InputEvent ie) {
boolean allowedGesture = false;
if (ie instanceof KeyEvent) { //we can validate only keyboard gestures
@@ -2129,6 +2129,7 @@
return -1;
}
+ @SuppressWarnings("deprecation")
public static int getSystemMnemonicKeyMask() {
Toolkit toolkit = Toolkit.getDefaultToolkit();
if (toolkit instanceof SunToolkit) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java Tue Jan 31 19:22:35 2017 +0300
@@ -429,7 +429,7 @@
gtkImagesLoaded = true;
}
}
-
+ @SuppressWarnings("deprecation")
private class ActionPerformer extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
// hide the balloon by any click
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java Tue Jan 31 19:22:35 2017 +0300
@@ -385,7 +385,7 @@
}
return false;
}
-
+ @SuppressWarnings("deprecation")
void handleVSBEvent(MouseEvent e, Rectangle bounds, int x, int y) {
int sbHeight = hsbVis ? bounds.height - SCROLLBAR_WIDTH : bounds.height;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Tue Jan 31 19:22:35 2017 +0300
@@ -1087,7 +1087,9 @@
}
} else {
//Invoke action event
- item.action(mouseEvent.getWhen(), mouseEvent.getModifiers());
+ @SuppressWarnings("deprecation")
+ final int modifiers = mouseEvent.getModifiers();
+ item.action(mouseEvent.getWhen(), modifiers);
ungrabInput();
}
} else {
@@ -1200,7 +1202,9 @@
if (citem instanceof XMenuPeer) {
cwnd.selectItem(citem, true);
} else if (citem != null) {
- citem.action(event.getWhen(), event.getModifiers());
+ @SuppressWarnings("deprecation")
+ final int modifiers = event.getModifiers();
+ citem.action(event.getWhen(), modifiers);
ungrabInput();
}
break;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -120,7 +120,9 @@
if (XToolkit.isLeftMouseButton(e)) {
if (armed)
{
- action(e.getWhen(),e.getModifiers());
+ @SuppressWarnings("deprecation")
+ final int modifiers = e.getModifiers();
+ action(e.getWhen(), modifiers);
}
pressed = false;
armed = false;
@@ -168,7 +170,9 @@
pressed=true;
armed=true;
repaint();
- action(e.getWhen(),e.getModifiers());
+ @SuppressWarnings("deprecation")
+ final int modifiers = e.getModifiers();
+ action(e.getWhen(), modifiers);
}
break;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -482,7 +482,7 @@
firstPress = false;
dragStartIdx = -1;
}
-
+ @SuppressWarnings("deprecation")
public void mouseDragged(MouseEvent e) {
/*
* fix for 5003166. On Motif user are unable to drag
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java Tue Jan 31 19:22:35 2017 +0300
@@ -452,6 +452,7 @@
waitWindowActivated(res);
return res;
}
+ @SuppressWarnings("deprecation")
private int activateServerNoWait(int prev) {
xembedLog.fine("Activating server");
int res = getEventPos();
@@ -467,6 +468,7 @@
robot.mouseRelease(InputEvent.BUTTON1_MASK);
return res;
}
+ @SuppressWarnings("deprecation")
private int deactivateServer() {
xembedLog.fine("Deactivating server");
int res = getEventPos();
@@ -480,6 +482,7 @@
waitWindowDeactivated(res);
return res;
}
+ @SuppressWarnings("deprecation")
private int focusServer() {
xembedLog.fine("Focusing server");
boolean weFocused = focused;
@@ -740,6 +743,7 @@
private void ungrabKey() {
sendMessage(XEmbedHelper.NON_STANDARD_XEMBED_GTK_UNGRAB_KEY, 0, accel_keysym, accel_mods);
}
+ @SuppressWarnings("deprecation")
private int showModalDialog() {
xembedLog.fine("Showing modal dialog");
int res = getEventPos();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -573,7 +573,7 @@
repaint();
}
}
-
+ @SuppressWarnings("deprecation")
void mousePressed(MouseEvent mouseEvent) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
@@ -641,6 +641,7 @@
isMousePressed = true;
}
}
+ @SuppressWarnings("deprecation")
void mouseReleased(MouseEvent mouseEvent) {
if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
//winReleaseCursorFocus();
@@ -685,6 +686,7 @@
}
}
+ @SuppressWarnings("deprecation")
void mouseDragged(MouseEvent mouseEvent) {
// TODO: can you drag w/ any other buttons? what about multiple buttons?
if (isEnabled() &&
@@ -810,7 +812,7 @@
break;
}
}
-
+ @SuppressWarnings("deprecation")
void keyPressed(KeyEvent e) {
int keyCode = e.getKeyCode();
if (log.isLoggable(PlatformLogger.Level.FINE)) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -503,6 +503,7 @@
* This function is called from XWindow
* @see XWindow.handleF10onEDT()
*/
+ @SuppressWarnings("deprecation")
void handleF10KeyPress(KeyEvent event) {
int keyState = event.getModifiers();
if (((keyState & InputEvent.ALT_MASK) != 0) ||
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -131,6 +131,7 @@
/*
* From PopupMenuPeer
*/
+ @SuppressWarnings("deprecation")
public void show(Event e) {
target = (Component)e.target;
// Get menus from the target.
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -468,6 +468,7 @@
* MouseEvent.MOUSE_EXITED
* MouseEvent.MOUSE_DRAGGED
*/
+ @SuppressWarnings("deprecation")
public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
super.handleJavaMouseEvent(mouseEvent);
int modifiers = mouseEvent.getModifiers();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java Tue Jan 31 19:22:35 2017 +0300
@@ -457,6 +457,7 @@
* MouseEvent.MOUSE_EXITED
* MouseEvent.MOUSE_DRAGGED
*/
+ @SuppressWarnings("deprecation")
public void handleMouseEvent(int id, int modifiers, int x, int y) {
if ((modifiers & InputEvent.BUTTON1_MASK) == 0) {
return;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -126,6 +126,7 @@
* MouseEvent.MOUSE_EXITED
* MouseEvent.MOUSE_DRAGGED
*/
+ @SuppressWarnings("deprecation")
public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
super.handleJavaMouseEvent(mouseEvent);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -1344,6 +1344,7 @@
}
}
+ @SuppressWarnings("deprecation")
private static MouseEvent newMouseEvent(
Component source, Point point, MouseEvent template )
{
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -477,6 +477,7 @@
e.setSource(xtiPeer.target);
XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), e);
}
+ @SuppressWarnings("deprecation")
public void mouseClicked(MouseEvent e) {
if ((e.getClickCount() == 1 || xtiPeer.balloon.isVisible()) &&
e.getButton() == MouseEvent.BUTTON1)
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Tue Jan 31 19:22:35 2017 +0300
@@ -621,7 +621,7 @@
// 4 and 5 buttons are usually considered assigned to a first wheel
return button == XConstants.buttons[3] || button == XConstants.buttons[4];
}
-
+ @SuppressWarnings("deprecation")
static int getXModifiers(AWTKeyStroke stroke) {
int mods = stroke.getModifiers();
int res = 0;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -95,6 +95,7 @@
private static native void initIDs();
@Override
+ @SuppressWarnings("deprecation")
public boolean handleJavaKeyEvent(KeyEvent e) {
switch (e.getID()) {
case KeyEvent.KEY_RELEASED:
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -263,6 +263,7 @@
void disable() {}
@Override
public void reshape(int x, int y, int width, int height) {}
+ @SuppressWarnings("deprecation")
public boolean handleEvent(Event e) { return false; }
@Override
public void setForeground(Color c) {}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -70,6 +70,7 @@
private native void createMenu(WComponentPeer parent);
+ @SuppressWarnings("deprecation")
public void show(Event e) {
Component origin = (Component)e.target;
WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
@@ -97,6 +98,7 @@
*/
void show(Component origin, Point p) {
WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
+ @SuppressWarnings("deprecation")
Event e = new Event(origin, 0, Event.MOUSE_DOWN, p.x, p.y, 0, 0);
if (peer == null) {
Component nativeOrigin = WToolkit.getNativeContainer(origin);
@@ -107,5 +109,6 @@
_show(e);
}
+ @SuppressWarnings("deprecation")
private native void _show(Event e);
}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -135,6 +135,7 @@
void disable() {}
@Override
public void reshape(int x, int y, int width, int height) {}
+ @SuppressWarnings("deprecation")
public boolean handleEvent(Event e) { return false; }
@Override
public void setForeground(Color c) {}
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java Tue Jan 31 19:22:35 2017 +0300
@@ -43,6 +43,7 @@
}
@Override
+ @SuppressWarnings("deprecation")
public boolean handleJavaKeyEvent(KeyEvent e) {
switch (e.getID()) {
case KeyEvent.KEY_TYPED:
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java Tue Jan 31 19:22:35 2017 +0300
@@ -128,7 +128,7 @@
hotspotMI.setMnemonic(Resources.getMnemonicInt(Messages.HOTSPOT_MBEANS_ELLIPSIS));
hotspotMI.setAccelerator(KeyStroke.
getKeyStroke(KeyEvent.VK_H,
- InputEvent.CTRL_MASK));
+ InputEvent.CTRL_DOWN_MASK));
hotspotMI.addActionListener(this);
connectionMenu.add(hotspotMI);
@@ -138,7 +138,7 @@
connectMI = new JMenuItem(Messages.NEW_CONNECTION_ELLIPSIS);
connectMI.setMnemonic(Resources.getMnemonicInt(Messages.NEW_CONNECTION_ELLIPSIS));
connectMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,
- InputEvent.CTRL_MASK));
+ InputEvent.CTRL_DOWN_MASK));
connectMI.addActionListener(this);
connectionMenu.add(connectMI);
@@ -147,7 +147,7 @@
exitMI = new JMenuItem(Messages.EXIT);
exitMI.setMnemonic(Resources.getMnemonicInt(Messages.EXIT));
exitMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4,
- InputEvent.ALT_MASK));
+ InputEvent.ALT_DOWN_MASK));
exitMI.addActionListener(this);
connectionMenu.add(exitMI);
@@ -223,7 +223,7 @@
tileMI = new JMenuItem(Messages.TILE);
tileMI.setMnemonic(Resources.getMnemonicInt(Messages.TILE));
tileMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,
- InputEvent.CTRL_MASK));
+ InputEvent.CTRL_DOWN_MASK));
tileMI.addActionListener(JConsole.this);
add(tileMI);
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java Tue Jan 31 19:22:35 2017 +0300
@@ -124,7 +124,9 @@
addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
- if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) {
+ if (connectedIconBounds != null
+ && (e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0
+ && connectedIconBounds.contains(e.getPoint())) {
if (isConnected()) {
userDisconnected = true;
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java Mon Jan 30 12:04:11 2017 -0800
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java Tue Jan 31 19:22:35 2017 +0300
@@ -438,7 +438,7 @@
public void keyPressed(KeyEvent e) {
// Accept "copy" key strokes
KeyStroke ks = KeyStroke.getKeyStroke(
- e.getKeyCode(), e.getModifiers());
+ e.getKeyCode(), e.getModifiersEx());
JComponent comp = (JComponent) e.getSource();
for (int i = 0; i < 3; i++) {
InputMap im = comp.getInputMap(i);