8067087: Fix mac-specific deprecation warnings in the java.desktop module
Reviewed-by: azvegint, alexsch
This commit is contained in:
parent
3b888867cb
commit
8e49701e7b
jdk/src/java.desktop/macosx/classes
@ -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 @@ class AquaComboBoxButton extends JButton {
|
||||
this.list = list;
|
||||
|
||||
setModel(new DefaultButtonModel() {
|
||||
@Override
|
||||
public void setArmed(final boolean armed) {
|
||||
super.setArmed(isPressed() ? true : armed);
|
||||
}
|
||||
@ -66,12 +67,13 @@ class AquaComboBoxButton extends JButton {
|
||||
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 @@ class AquaComboBoxButton extends JButton {
|
||||
return State.ACTIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintComponent(final Graphics g) {
|
||||
// Don't Paint the button as usual
|
||||
// super.paintComponent( g );
|
||||
|
@ -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 @@ public class AquaInternalFrameDockIconUI extends DesktopIconUI implements MouseL
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public void hide() {
|
||||
final Container parent = getParent();
|
||||
final Rectangle r = this.getBounds();
|
||||
|
@ -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 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user