< prev index next >
src/java.desktop/share/classes/java/awt/Window.java
Print this page
@@ -753,10 +753,11 @@
* not be called directly by programs.
* @see Component#isDisplayable
* @see Container#removeNotify
* @since 1.0
*/
+ @SuppressWarnings("deprecation")
public void addNotify() {
synchronized (getTreeLock()) {
Container parent = this.parent;
if (parent != null && parent.getPeer() == null) {
parent.addNotify();
@@ -796,10 +797,11 @@
* size is being calculated.
*
* @see Component#isDisplayable
* @see #setMinimumSize
*/
+ @SuppressWarnings("deprecation")
public void pack() {
Container parent = this.parent;
if (parent != null && parent.getPeer() == null) {
parent.addNotify();
}
@@ -1068,10 +1070,11 @@
postWindowEvent(WindowEvent.WINDOW_OPENED);
state |= OPENED;
}
}
+ @SuppressWarnings("deprecation")
static void updateChildFocusableWindowState(Window w) {
if (w.getPeer() != null && w.isShowing()) {
((WindowPeer)w.getPeer()).updateFocusableWindowState();
}
for (int i = 0; i < w.ownedWindowList.size(); i++) {
@@ -1155,10 +1158,11 @@
* Fix for 4872170.
* If dispose() is called on parent then its children have to be disposed as well
* as reported in javadoc. So we need to implement this functionality even if a
* child overrides dispose() in a wrong way without calling super.dispose().
*/
+ @SuppressWarnings("deprecation")
void disposeImpl() {
dispose();
if (getPeer() != null) {
doDispose();
}
@@ -3621,10 +3625,11 @@
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
*
* @since 1.7
*/
+ @SuppressWarnings("deprecation")
public void setOpacity(float opacity) {
synchronized (getTreeLock()) {
if (opacity < 0.0f || opacity > 1.0f) {
throw new IllegalArgumentException(
"The value of opacity should be in the range [0.0f .. 1.0f].");
@@ -3719,10 +3724,11 @@
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
*
* @since 1.7
*/
+ @SuppressWarnings("deprecation")
public void setShape(Shape shape) {
synchronized (getTreeLock()) {
if (shape != null) {
GraphicsConfiguration gc = getGraphicsConfiguration();
GraphicsDevice gd = gc.getDevice();
@@ -3836,10 +3842,11 @@
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
* @see GraphicsConfiguration#isTranslucencyCapable()
*/
@Override
+ @SuppressWarnings("deprecation")
public void setBackground(Color bgColor) {
Color oldBg = getBackground();
super.setBackground(bgColor);
if (oldBg != null && oldBg.equals(bgColor)) {
return;
@@ -3888,10 +3895,11 @@
public boolean isOpaque() {
Color bg = getBackground();
return bg != null ? bg.getAlpha() == 255 : true;
}
+ @SuppressWarnings("deprecation")
private void updateWindow() {
synchronized (getTreeLock()) {
WindowPeer peer = (WindowPeer)getPeer();
if (peer != null) {
peer.updateWindow();
@@ -4078,10 +4086,11 @@
{
window.securityWarningWidth = width;
window.securityWarningHeight = height;
}
+ @SuppressWarnings("deprecation")
public void setSecurityWarningPosition(Window window,
Point2D point, float alignmentX, float alignmentY)
{
window.securityWarningPointX = point.getX();
window.securityWarningPointY = point.getY();
< prev index next >