Mercurial > hg > jdk9-shenandoah > jdk
changeset 12690:97f1c1c13164
8067087: Fix mac-specific deprecation warnings in the java.desktop module
Reviewed-by: azvegint, alexsch
author | serb |
---|---|
date | Thu, 20 Aug 2015 13:33:12 +0300 |
parents | 59d798c30a59 |
children | a65750476441 |
files | src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java |
diffstat | 3 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java Wed Aug 19 09:54:15 2015 +0400 +++ b/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/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java Wed Aug 19 09:54:15 2015 +0400 +++ b/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/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java Wed Aug 19 09:54:15 2015 +0400 +++ b/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