src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 28,39 ****
import java.awt.*;
import java.awt.event.*;
import java.awt.peer.TrayIconPeer;
import sun.awt.*;
import java.awt.image.*;
- import java.text.BreakIterator;
- import java.util.concurrent.ArrayBlockingQueue;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.InvocationTargetException;
import sun.util.logging.PlatformLogger;
--- 28,37 ----
*** 345,355 ****
balloon.display(caption, text, messageType);
}
}
// It's synchronized with disposal by EDT.
- @SuppressWarnings("deprecation")
public void showPopupMenu(int x, int y) {
if (isDisposed())
return;
assert SunToolkit.isDispatchThreadForAppContext(target);
--- 343,352 ----
*** 364,374 ****
}
popup = newPopup;
}
if (popup != null) {
! Point loc = ((XBaseWindow)eframe.getPeer()).toLocal(new Point(x, y));
popup.show(eframe, loc.x, loc.y);
}
}
--- 361,373 ----
}
popup = newPopup;
}
if (popup != null) {
! final XBaseWindow peer = AWTAccessor.getComponentAccessor()
! .getPeer(eframe);
! Point loc = peer.toLocal(new Point(x, y));
popup.show(eframe, loc.x, loc.y);
}
}
*** 414,426 ****
void addListeners() {
canvas.addMouseListener(eventProxy);
canvas.addMouseMotionListener(eventProxy);
}
- @SuppressWarnings("deprecation")
long getWindow() {
! return ((XEmbeddedFramePeer)eframe.getPeer()).getWindow();
}
public boolean isDisposed() {
return isDisposed;
}
--- 413,425 ----
void addListeners() {
canvas.addMouseListener(eventProxy);
canvas.addMouseMotionListener(eventProxy);
}
long getWindow() {
! return AWTAccessor.getComponentAccessor()
! .<XEmbeddedFramePeer>getPeer(eframe).getWindow();
}
public boolean isDisposed() {
return isDisposed;
}