/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
private long parentWindow;
/**
* Animation stage.
*/
/* -1 - uninitialized.
* 0 - 16x16
* 1 - 24x24
* 2 - 32x32
* 3 - 48x48
*/
synchronized (XWarningWindow.class) {
icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
icons[0][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow16_png.security_icon_yellow16_png);
icons[1][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim24_png.security_icon_interim24_png);
icons[1][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow24_png.security_icon_yellow24_png);
icons[2][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim32_png.security_icon_interim32_png);
icons[2][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow32_png.security_icon_yellow32_png);
icons[3][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim48_png.security_icon_interim48_png);
icons[3][2] = new IconInfo(sun.awt.AWTIcon32_security_icon_yellow48_png.security_icon_yellow48_png);
} else {
icons[0][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim16_png.security_icon_interim16_png);
icons[0][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow16_png.security_icon_yellow16_png);
icons[1][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim24_png.security_icon_interim24_png);
icons[1][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow24_png.security_icon_yellow24_png);
icons[2][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim32_png.security_icon_interim32_png);
icons[2][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow32_png.security_icon_yellow32_png);
icons[3][1] = new IconInfo(sun.awt.AWTIcon64_security_icon_interim48_png.security_icon_interim48_png);
icons[3][2] = new IconInfo(sun.awt.AWTIcon64_security_icon_yellow48_png.security_icon_yellow48_png);
}
}
}
}
private void updateIconSize() {
int newSize = -1;
if (ownerWindow != null) {
if (max < 24) {
newSize = 0;
} else if (max < 32) {
newSize = 1;
} else if (max < 48) {
newSize = 2;
} else {
newSize = 3;
}
}
// Make sure we have a valid size
if (newSize == -1) {
newSize = 0;
}
// Note: this is not the most wise solution to use awtLock here,
// this should have been sync'ed with the stateLock. However,
// the awtLock must be taken first (see XBaseWindow.getStateLock()),
// and we need the awtLock anyway to update the shape of the icon.
// So it's easier to use just one lock instead.
try {
if (newSize != currentSize) {
}
} finally {
}
}
}
super(new XCreateWindowParams(new Object[] {
}));
this.ownerWindow = ownerWindow;
this.parentWindow = parentWindow;
public boolean isDisposed() {
return XWarningWindow.this.isDisposed();
}
return XWarningWindow.this.getBounds();
}
public String getTooltipString() {
}
});
}
private void requestNoTaskbar() {
if (netProtocol != null) {
}
}
try {
getWindow(), parentWindow);
} finally {
}
}
/**
* @param x,y,w,h coordinates of the untrusted window
*/
public void reposition(int x, int y, int w, int h) {
x, y, w, h);
}
return "Warning window";
}
return getGraphics(surfaceData,
getColor(),
getFont());
}
}
return ownerWindow.getWarningString();
}
int getWidth() {
return getSecurityIconInfo().getWidth();
}
int getHeight() {
return getSecurityIconInfo().getHeight();
}
return SystemColor.window;
}
}
return ownerWindow.getFont();
}
public void repaint() {
Graphics g = getGraphics();
try {
} finally {
g.dispose();
}
}
super.handleExposeEvent(xev);
new Runnable() {
public void run() {
Graphics g = getGraphics();
try {
} finally {
g.dispose();
}
}
});
}
return true;
}
/** Send a synthetic UnmapNotify in order to withdraw the window.
*/
private void withdraw() {
try {
long root;
try {
}
finally {
}
umev.set_from_configure(false);
try {
root,
false,
}
finally {
}
} finally {
}
}
super.xSetVisible(false);
withdraw();
}
}
super.setMouseAbove(above);
if (p != null) {
}
}
super.enterNotify(window);
}
}
super.leaveNotify(window);
}
}
super.xSetVisible(visible);
// so we request it every time whenever we change the visibility.
}
public void run() {
xSetVisible(false);
}
};
public void run() {
if (!isVisible()) {
xSetVisible(true);
}
}
repaint();
if (currentIcon > 0) {
currentIcon--;
}
}
};
if (visible) {
if (isVisible()) {
currentIcon = 0;
} else {
currentIcon = 3;
}
if (doSchedule) {
} else {
showingTask.run();
}
} else {
if (!isVisible()) {
return;
}
if (doSchedule) {
} else {
hidingTask.run();
}
}
}
}