/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 JDialog to provide for better default location.
*/
}
}
}
// determine a nice location relative to parent frame
if (f == null) {
// centered on screen
} else {
// centered over parent frame
newLocation = new Point(
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
}
public void windowClosed(WindowEvent e) {
}
public void windowDeactivated(WindowEvent e) {
// possible java bug: too many of these events generated!
// cleanupButtons();
}
});
}
// cannot set dialog icons under 1.1....
/*
* try {
* String iconName = new String("images/appicon.gif");
* Class thisClass = this.getClass();
* URL iconUrl = thisClass.getResource(iconName);
* if (iconUrl == null)
* Debug.warning("Unable to resolve URL for icon " + iconName);
* else {
* Toolkit tk = Toolkit.getDefaultToolkit();
* Image img = tk.getImage(iconUrl);
* // this.setIconImage(img);
* }
* } catch (Exception x) {
* Debug.warning(x.toString());
* }
*/
}
public void cleanupButtons() {
// drop this rootPane from pmButton's hashtable
}
public void setVisible(boolean b) {
if (b == false)
super.setVisible(b);
}
}