/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*
* Extends JFrame to support better focus handling
*/
// this comp gets focus on frame open
// file path of icon; this does not provide for localization
// if true, clean up pmButton state on frame close
private boolean clearButtonsOnClose;
super(s);
// default: do NOT clear default button state when frame is closed
clearButtonsOnClose = false;
this.addFocusListener(new FocusListener() {
public void focusGained(FocusEvent e) {
if (defaultComponent != null) {
} else
}
public void focusLost(FocusEvent e) {
}
});
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
}
public void windowClosed(WindowEvent e) {
}
});
try {
// System.out.println("Icon: " + iconUrl);
else {
this.setIconImage(img);
}
} catch (Exception x) {
}
}
defaultComponent = c;
}
// If the frame is a minimized icon, make it un-minimized first
if (isVisible == true) {
try {
// this will fail in jdk 1.1 but work fine in 1.2
// restores an iconified window in JDK 1.1
removeNotify();
addNotify();
}
} else
super.setVisible(isVisible);
}
public void cleanupButtons() {
// drop this rootPane from pmButton's hashtable
if (clearButtonsOnClose)
}
protected void setClearButtonsOnClose(boolean b) {
clearButtonsOnClose = b;
}
}