8067087: Fix mac-specific deprecation warnings in the java.desktop module
authorserb
Thu, 20 Aug 2015 13:33:12 +0300
changeset 32481 6f01579f7118
parent 32480 6d72f6be8202
child 32482 45ff83ee1ee9
8067087: Fix mac-specific deprecation warnings in the java.desktop module Reviewed-by: azvegint, alexsch
jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java
jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java
jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Wed Aug 19 09:54:15 2015 +0400
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Thu Aug 20 13:33:12 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -58,6 +58,7 @@
         this.list = list;
 
         setModel(new DefaultButtonModel() {
+            @Override
             public void setArmed(final boolean armed) {
                 super.setArmed(isPressed() ? true : armed);
             }
@@ -66,12 +67,13 @@
         setEnabled(comboBox.isEnabled());
     }
 
+    @Override
     public boolean isEnabled() {
         return comboBox == null ? true : comboBox.isEnabled();
     }
 
-    @SuppressWarnings("deprecation")
-    public boolean isFocusTraversable() {
+    @Override
+    public boolean isFocusable() {
         return false;
     }
 
@@ -92,6 +94,7 @@
         return State.ACTIVE;
     }
 
+    @Override
     public void paintComponent(final Graphics g) {
         // Don't Paint the button as usual
         // super.paintComponent( g );
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Wed Aug 19 09:54:15 2015 +0400
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Thu Aug 20 13:33:12 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -303,7 +303,7 @@
             }
         }
 
-        @SuppressWarnings("deprecation")
+        @Deprecated
         public void hide() {
             final Container parent = getParent();
             final Rectangle r = this.getBounds();
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Wed Aug 19 09:54:15 2015 +0400
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Thu Aug 20 13:33:12 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -125,9 +125,8 @@
         return fConfig;
     }
 
-    @SuppressWarnings("deprecation")
     protected void setBounds(int x, int y, int w, int h) {
-        fBounds.reshape(x, y, w, y + h);
+        fBounds.setBounds(x, y, w, y + h);
     }
 
     // START compositing support API