? core/plans ? core/src/META-INF.save Index: autoupdate/libsrc/org/netbeans/updater/UpdaterFrame.java =================================================================== RCS file: /cvs/autoupdate/libsrc/org/netbeans/updater/UpdaterFrame.java,v retrieving revision 1.16 diff -u -r1.16 UpdaterFrame.java --- autoupdate/libsrc/org/netbeans/updater/UpdaterFrame.java 16 Jan 2002 12:45:06 -0000 1.16 +++ autoupdate/libsrc/org/netbeans/updater/UpdaterFrame.java 26 Feb 2002 17:36:56 -0000 @@ -52,9 +52,13 @@ static final void center(Window c) { c.pack(); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + + GraphicsConfiguration gconf = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); + Rectangle bounds = gconf.getBounds(); Dimension dialogSize = c.getSize(); - c.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + + c.setLocation(bounds.x + (bounds.width - dialogSize.width) / 2, + bounds.y + (bounds.height - dialogSize.height) / 2); } static String getMainWindowTitle() { Index: autoupdate/src/org/netbeans/modules/autoupdate/AutoCheckInfo.java =================================================================== RCS file: /cvs/autoupdate/src/org/netbeans/modules/autoupdate/AutoCheckInfo.java,v retrieving revision 1.17 diff -u -r1.17 AutoCheckInfo.java --- autoupdate/src/org/netbeans/modules/autoupdate/AutoCheckInfo.java 6 Jan 2002 15:24:06 -0000 1.17 +++ autoupdate/src/org/netbeans/modules/autoupdate/AutoCheckInfo.java 26 Feb 2002 17:36:56 -0000 @@ -383,16 +383,4 @@ } return null; } - - - /** Moves specified window to the center of the screen - */ - /* - public static void centerWindow (Window w) { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = w.getSize(); - w.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); -} - */ - } Index: core/javahelp/manifest.mf =================================================================== RCS file: /cvs/core/javahelp/manifest.mf,v retrieving revision 1.3 diff -u -r1.3 manifest.mf --- core/javahelp/manifest.mf 29 Jan 2002 14:38:13 -0000 1.3 +++ core/javahelp/manifest.mf 26 Feb 2002 17:36:56 -0000 @@ -4,7 +4,7 @@ OpenIDE-Module-Specification-Version: 1.0 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Provides: org.netbeans.api.javahelp.Help -OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Package-Dependencies: javax.help[HelpSet] > 1.0 OpenIDE-Module-Layer: org/netbeans/modules/javahelp/resources/layer.xml OpenIDE-Module-Install: org/netbeans/modules/javahelp/Installer.class Index: core/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java =================================================================== RCS file: /cvs/core/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java,v retrieving revision 1.8 diff -u -r1.8 JavaHelp.java --- core/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java 18 Feb 2002 13:43:15 -0000 1.8 +++ core/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java 26 Feb 2002 17:36:57 -0000 @@ -186,7 +186,7 @@ frameViewer.setTitle(jh.getModel().getHelpSet().getTitle()); frameViewer.pack(); } - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension screenSize = Utilities.getCurrentGraphicsConfiguration().getBounds().getSize(); Dimension frameSize = frameViewer.getSize(); // #11018: have mercy on little screens if (frameSize.width > screenSize.width) { @@ -198,8 +198,8 @@ frameViewer.setSize(frameSize); } // Now center it. - frameViewer.setLocation((screenSize.width - frameSize.width) / 2, - (screenSize.height - frameSize.height) / 2); + frameViewer.setBounds(Utilities.getCenterBounds(frameSize)); + frameViewer.setState(Frame.NORMAL); if (frameViewer.isVisible()) { frameViewer.repaint(); Index: core/src/org/netbeans/beaninfo/editors/PropertiesCustomEditor.java =================================================================== RCS file: /cvs/core/src/org/netbeans/beaninfo/editors/PropertiesCustomEditor.java,v retrieving revision 1.14 diff -u -r1.14 PropertiesCustomEditor.java --- core/src/org/netbeans/beaninfo/editors/PropertiesCustomEditor.java 10 Jan 2002 15:22:03 -0000 1.14 +++ core/src/org/netbeans/beaninfo/editors/PropertiesCustomEditor.java 26 Feb 2002 17:36:57 -0000 @@ -66,16 +66,6 @@ return props; } - /** Returns preferredSize as the preferred height and the width of the panel */ - public java.awt.Dimension getPreferredSize() { - int screenWidth = org.openide.util.Utilities.getScreenSize().width; - - if (super.getPreferredSize().width >= screenWidth) - return new java.awt.Dimension(screenWidth - 50, super.getPreferredSize().height); - else - return super.getPreferredSize(); - } - /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is Index: core/src/org/netbeans/core/CoronaDialog.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/CoronaDialog.java,v retrieving revision 1.13 diff -u -r1.13 CoronaDialog.java --- core/src/org/netbeans/core/CoronaDialog.java 22 Jan 2002 13:45:23 -0000 1.13 +++ core/src/org/netbeans/core/CoronaDialog.java 26 Feb 2002 17:36:57 -0000 @@ -22,6 +22,7 @@ import org.netbeans.core.awt.ButtonBarButton; import org.openide.TopManager; import org.openide.util.HelpCtx; +import org.openide.util.Utilities; /** The CoronaDialog is a standard dialog that contains a ButtonBar on the South. * All the "add(Component)" and "setLayout(LayoutManager)" requests should be @@ -156,9 +157,7 @@ public void center() { // standard way how to place the dialog to the center of the screen pack(); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = getSize(); - setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + setBounds(Utilities.getCenterBounds(getSize())); } /** Called when user presses a button on the ButtonBar. Index: core/src/org/netbeans/core/NbPresenter.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/NbPresenter.java,v retrieving revision 1.54 diff -u -r1.54 NbPresenter.java --- core/src/org/netbeans/core/NbPresenter.java 17 Jan 2002 13:09:47 -0000 1.54 +++ core/src/org/netbeans/core/NbPresenter.java 26 Feb 2002 17:36:57 -0000 @@ -145,7 +145,7 @@ initializePresenter(); pack(); - setLocationRelativeTo(null); // center on screen + setBounds(Utilities.getCenterBounds(getSize())); // #17794. First time the initial focus component // will be set automatically when called show. Index: core/src/org/netbeans/core/Splash.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/Splash.java,v retrieving revision 1.54 diff -u -r1.54 Splash.java --- core/src/org/netbeans/core/Splash.java 11 Feb 2002 12:24:18 -0000 1.54 +++ core/src/org/netbeans/core/Splash.java 26 Feb 2002 17:36:57 -0000 @@ -149,9 +149,7 @@ */ public static final void center(Window c) { c.pack(); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = c.getSize(); - c.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + c.setBounds(Utilities.getCenterBounds(c.getSize())); } /** @return splash image */ Index: core/src/org/netbeans/core/windows/MainWindow.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/MainWindow.java,v retrieving revision 1.35 diff -u -r1.35 MainWindow.java --- core/src/org/netbeans/core/windows/MainWindow.java 25 Jan 2002 09:27:39 -0000 1.35 +++ core/src/org/netbeans/core/windows/MainWindow.java 26 Feb 2002 17:36:58 -0000 @@ -37,6 +37,7 @@ import org.openide.util.NbBundle; import org.openide.util.RequestProcessor; import org.openide.util.SharedClassObject; +import org.openide.util.Utilities; import org.openide.util.actions.*; import org.openide.windows.Workspace; import org.openide.windows.TopComponent; @@ -312,10 +313,10 @@ /** Returns preferredSize as the preferred height and the width of the screen */ public Dimension getPreferredSize() { if (WindowUtils.isMdi()) { - return org.openide.util.Utilities.getScreenSize(); + return Utilities.getUsableScreenBounds(Utilities.getCurrentGraphicsConfiguration()).getSize(); } else { return new Dimension( - org.openide.util.Utilities.getScreenSize().width, + Utilities.getUsableScreenBounds(Utilities.getCurrentGraphicsConfiguration()).getSize().width, super.getPreferredSize().height ); } Index: core/src/org/netbeans/core/windows/WorkspaceBoundsManager.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/WorkspaceBoundsManager.java,v retrieving revision 1.8 diff -u -r1.8 WorkspaceBoundsManager.java --- core/src/org/netbeans/core/windows/WorkspaceBoundsManager.java 10 Jan 2002 15:22:10 -0000 1.8 +++ core/src/org/netbeans/core/windows/WorkspaceBoundsManager.java 26 Feb 2002 17:36:58 -0000 @@ -26,6 +26,7 @@ import javax.swing.SwingUtilities; +import org.openide.util.Utilities; import org.openide.windows.Mode; import org.openide.windows.TopComponent; @@ -204,19 +205,18 @@ mainBounds.height = mainWindow.getPreferredSize().height; Rectangle workingSpace = null; - int bottomSpace = WindowUtils.getTaskbarHeight(); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Rectangle screenBounds = Utilities.getUsableScreenBounds( + Utilities.getCurrentGraphicsConfiguration()); - if (mainBounds.y < (screenSize.height / 2)) { + if (mainBounds.y < (screenBounds.y + screenBounds.height / 2)) { workingSpace = new Rectangle( - 0, mainBounds.y + mainBounds.height, - screenSize.width, - screenSize.height - bottomSpace - (mainBounds.y + mainBounds.height) - ); + screenBounds.x, + mainBounds.y + mainBounds.height, + screenBounds.width, + screenBounds.height - (mainBounds.y + mainBounds.height) + ); } else { - workingSpace = new Rectangle( - 0, 0, screenSize.width, mainBounds.y - ); + workingSpace = new Rectangle(screenBounds); } return workingSpace; } Index: core/src/org/netbeans/core/windows/frames/DefaultContainerImpl.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/frames/DefaultContainerImpl.java,v retrieving revision 1.45 diff -u -r1.45 DefaultContainerImpl.java --- core/src/org/netbeans/core/windows/frames/DefaultContainerImpl.java 20 Feb 2002 17:46:16 -0000 1.45 +++ core/src/org/netbeans/core/windows/frames/DefaultContainerImpl.java 26 Feb 2002 17:36:58 -0000 @@ -23,8 +23,10 @@ import java.awt.Image; import java.awt.Point; import java.awt.Dimension; -import java.awt.Toolkit; +import java.awt.Rectangle; import java.awt.Window; +import java.awt.Toolkit; + import java.awt.event.ComponentListener; import java.awt.event.FocusEvent; import java.awt.event.AWTEventListener; @@ -53,6 +55,7 @@ import org.openide.util.actions.CallableSystemAction; import org.openide.awt.JPopupMenuPlus; import org.openide.util.WeakListener; +import org.openide.util.Utilities; import org.netbeans.core.windows.*; import org.netbeans.core.windows.util.WindowUtils; @@ -709,18 +712,18 @@ /** Shows given popup on given coordinations and takes care about the * situation when menu can exceed screen limits */ - protected static void showPopupMenu (JPopupMenu popup, Point p, Component comp) { + protected void showPopupMenu (JPopupMenu popup, Point p, Component comp) { SwingUtilities.convertPointToScreen (p, comp); Dimension popupSize = popup.getPreferredSize (); - Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize (); - int yCorrection = WindowUtils.getTaskbarHeight(); - - if (p.x + popupSize.width > screenSize.width) { - p.x = screenSize.width - popupSize.width; + Rectangle screenBounds = Utilities.getUsableScreenBounds(getGraphicsConfiguration()); + + if (p.x + popupSize.width > screenBounds.x + screenBounds.width) { + p.x = screenBounds.x + screenBounds.width - popupSize.width; } - if (p.y + popupSize.height > screenSize.height - yCorrection) { - p.y = screenSize.height - popupSize.height - yCorrection; + if (p.y + popupSize.height > screenBounds.y + screenBounds.height) { + p.y = screenBounds.y + screenBounds.height - popupSize.height; } + SwingUtilities.convertPointFromScreen (p, comp); popup.show(comp, p.x, p.y); } Index: core/src/org/netbeans/core/windows/util/WindowUtils.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/util/WindowUtils.java,v retrieving revision 1.33 diff -u -r1.33 WindowUtils.java --- core/src/org/netbeans/core/windows/util/WindowUtils.java 17 Jan 2002 15:46:10 -0000 1.33 +++ core/src/org/netbeans/core/windows/util/WindowUtils.java 26 Feb 2002 17:36:58 -0000 @@ -69,27 +69,6 @@ private WindowUtils () { } - /** @return the height of the taskbar which should be substracted from the - * screen height when we calculate the default layout - */ - - public static int getTaskbarHeight() { - int taskbarHeight = 0; - - String str = System.getProperty("netbeans.taskbar.height"); // NOI18N - if (str != null) { - try { - taskbarHeight = Integer.parseInt(str); - } - catch (NumberFormatException ex) { - } - } - if (taskbarHeight == 0 && Utilities.isWindows ()) { - taskbarHeight = Utilities.TYPICAL_WINDOWS_TASKBAR_HEIGHT; - } - return taskbarHeight; - } - /** Simple transformation to scale given rectangle between dimensions */ public static void convertRectangle (Rectangle rect, Dimension oldDimension, Dimension newDimension) { @@ -236,23 +215,6 @@ return rootPane; } - public static Dimension getMaximizedSize(java.awt.Container c) { -// Dimension screen = org.openide.util.Utilities.getScreenSize(); - Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); - Dimension max = null; - if (org.openide.util.Utilities.isWindows()) { - Insets borders = c.getInsets(); - max = new Dimension( - screen.width + borders.left + borders.right, - screen.height + 2 * borders.bottom // top border size includes window caption - ); - } - else - max = screen; - - return max; - } - /** @return true if gf contains field with given fieldName */ //Bugfix #10993, in JDK 1.2.2 method ObjectStreamClass.getField() returns always null //whereas getFields() returns correct array so we must use getFields() instead of Index: form/manifest.mf =================================================================== RCS file: /cvs/form/manifest.mf,v retrieving revision 1.47 diff -u -r1.47 manifest.mf --- form/manifest.mf 18 Feb 2002 13:49:56 -0000 1.47 +++ form/manifest.mf 26 Feb 2002 17:37:02 -0000 @@ -3,7 +3,7 @@ OpenIDE-Module-Specification-Version: 1.8 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Install: org/netbeans/modules/form/FormEditorModule.class -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1, org.netbeans.core/1 > 1.0 OpenIDE-Module-Layer: org/netbeans/modules/form/resources/layer.xml Class-Path: ext/AbsoluteLayout.jar Index: form/src/org/netbeans/modules/form/actions/TestAction.java =================================================================== RCS file: /cvs/form/src/org/netbeans/modules/form/actions/TestAction.java,v retrieving revision 1.8 diff -u -r1.8 TestAction.java --- form/src/org/netbeans/modules/form/actions/TestAction.java 26 Feb 2002 09:59:44 -0000 1.8 +++ form/src/org/netbeans/modules/form/actions/TestAction.java 26 Feb 2002 17:37:03 -0000 @@ -126,14 +126,7 @@ } else frame.pack(); - // set location - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension frameSize = frame.getSize(); - frame.setLocation(screenSize.width+20 > frameSize.width ? - (screenSize.width - frameSize.width) / 2 : 0, - screenSize.height+20 > frameSize.height ? - (screenSize.height - frameSize.height) / 2 : 0); - // show it + frame.setBounds(org.openide.util.Utilities.getCenterBounds(frame.getSize())); frame.show(); } catch (Exception ex) { Index: jarpackager/manifest.mf =================================================================== RCS file: /cvs/jarpackager/manifest.mf,v retrieving revision 1.46 diff -u -r1.46 manifest.mf --- jarpackager/manifest.mf 18 Feb 2002 13:49:56 -0000 1.46 +++ jarpackager/manifest.mf 26 Feb 2002 17:37:03 -0000 @@ -1,7 +1,7 @@ OpenIDE-Module: org.netbeans.modules.jarpackager/2 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jarpackager/Bundle.properties OpenIDE-Module-Display-Category: Tools -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.31 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE] OpenIDE-Module-Specification-Version: 1.10 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ Index: jarpackager/src/org/netbeans/modules/jarpackager/util/ProgressDialog.java =================================================================== RCS file: /cvs/jarpackager/src/org/netbeans/modules/jarpackager/util/ProgressDialog.java,v retrieving revision 1.10 diff -u -r1.10 ProgressDialog.java --- jarpackager/src/org/netbeans/modules/jarpackager/util/ProgressDialog.java 1 May 2001 19:40:25 -0000 1.10 +++ jarpackager/src/org/netbeans/modules/jarpackager/util/ProgressDialog.java 26 Feb 2002 17:37:03 -0000 @@ -88,9 +88,7 @@ /** Places dialog into the center of the screen */ public void center() { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = getSize(); - setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + setBounds(org.openide.util.Utilities.getCenterBounds(getSize())); } /** Increments value by 1 */ Index: javacvs/manifest.mf =================================================================== RCS file: /cvs/javacvs/manifest.mf,v retrieving revision 1.20 diff -u -r1.20 manifest.mf --- javacvs/manifest.mf 29 Nov 2001 15:56:55 -0000 1.20 +++ javacvs/manifest.mf 26 Feb 2002 17:37:04 -0000 @@ -4,7 +4,7 @@ OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Layer: org/netbeans/modules/cvsclient/layer.xml OpenIDE-Module-Install: org/netbeans/modules/cvsclient/JavaCvsModuleInstall.class -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1 Class-Path: ext/cvslib.jar Index: javacvs/src/org/netbeans/modules/cvsclient/customizer/NbJavaCvsCustomizer.java =================================================================== RCS file: /cvs/javacvs/src/org/netbeans/modules/cvsclient/customizer/NbJavaCvsCustomizer.java,v retrieving revision 1.9 diff -u -r1.9 NbJavaCvsCustomizer.java --- javacvs/src/org/netbeans/modules/cvsclient/customizer/NbJavaCvsCustomizer.java 18 Nov 2001 22:05:42 -0000 1.9 +++ javacvs/src/org/netbeans/modules/cvsclient/customizer/NbJavaCvsCustomizer.java 26 Feb 2002 17:37:04 -0000 @@ -407,8 +407,6 @@ } public static void centerWindow (Window w) { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = w.getSize(); - w.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + w.setBounds(org.openide.util.Utilities.getCenterBounds(w.getSize())); } } Index: javacvs/src/org/netbeans/modules/javacvs/customizers/CommitParamInput.java =================================================================== RCS file: /cvs/javacvs/src/org/netbeans/modules/javacvs/customizers/CommitParamInput.java,v retrieving revision 1.11 diff -u -r1.11 CommitParamInput.java --- javacvs/src/org/netbeans/modules/javacvs/customizers/CommitParamInput.java 13 Nov 2001 17:08:01 -0000 1.11 +++ javacvs/src/org/netbeans/modules/javacvs/customizers/CommitParamInput.java 26 Feb 2002 17:37:05 -0000 @@ -480,8 +480,6 @@ public static void centerWindow(Window w) { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = w.getSize(); - w.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + w.setBounds(org.openide.util.Utilities.getCenterBounds(w.getSize())); } } Index: javadoc/manifest.mf =================================================================== RCS file: /cvs/javadoc/manifest.mf,v retrieving revision 1.47 diff -u -r1.47 manifest.mf --- javadoc/manifest.mf 4 Feb 2002 13:46:20 -0000 1.47 +++ javadoc/manifest.mf 26 Feb 2002 17:37:05 -0000 @@ -5,7 +5,7 @@ OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.7 OpenIDE-Module-Specification-Version: 1.8 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 Name: org/netbeans/modules/javadoc/GenerateDocAction.class OpenIDE-Module-Class: Action Index: javadoc/src/org/netbeans/modules/javadoc/comments/NewTagDialog.java =================================================================== RCS file: /cvs/javadoc/src/org/netbeans/modules/javadoc/comments/NewTagDialog.java,v retrieving revision 1.11 diff -u -r1.11 NewTagDialog.java --- javadoc/src/org/netbeans/modules/javadoc/comments/NewTagDialog.java 22 Nov 2001 08:56:58 -0000 1.11 +++ javadoc/src/org/netbeans/modules/javadoc/comments/NewTagDialog.java 26 Feb 2002 17:37:05 -0000 @@ -23,12 +23,8 @@ import org.openide.src.ClassElement; import org.openide.src.JavaDocTag; import org.openide.src.JavaDocSupport; +import org.openide.util.Utilities; -/** - * - * @author - * @version - */ public class NewTagDialog extends javax.swing.JDialog implements JavaTagNames { private ButtonGroup bgroup; @@ -102,9 +98,7 @@ customRadioButton.getModel().setActionCommand( TAG_CUSTOM ); customRadioButton.setMnemonic(org.openide.util.NbBundle.getBundle(NewTagDialog.class).getString("NewTagDialog.customRadioButton_Mnemonic").charAt(0)); // NOI18N - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = this.getSize(); - this.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + setBounds(Utilities.getCenterBounds(getSize())); if ( element instanceof ConstructorElement ) { paramRadioButton.setVisible( true ); Index: objectbrowser/src/org/netbeans/modules/objectbrowser/ObjectBrowser.java =================================================================== RCS file: /cvs/objectbrowser/src/org/netbeans/modules/objectbrowser/ObjectBrowser.java,v retrieving revision 1.35 diff -u -r1.35 ObjectBrowser.java --- objectbrowser/src/org/netbeans/modules/objectbrowser/ObjectBrowser.java 5 Sep 2001 12:44:30 -0000 1.35 +++ objectbrowser/src/org/netbeans/modules/objectbrowser/ObjectBrowser.java 26 Feb 2002 17:37:06 -0000 @@ -200,8 +200,7 @@ add (jSplitPane1, "Center"); // NOI18N - java.awt.Dimension d = java.awt.Toolkit.getDefaultToolkit ().getScreenSize (); - setPreferredSize (new java.awt.Dimension (d.width / 2, (d.height * 2) / 5)); + setPreferredSize (new java.awt.Dimension (600, 400)); } public static void main(java.lang.String[] args) { Index: openide/api/doc/changes/apichanges.xml =================================================================== RCS file: /cvs/openide/api/doc/changes/apichanges.xml,v retrieving revision 1.46 diff -u -r1.46 apichanges.xml --- openide/api/doc/changes/apichanges.xml 20 Feb 2002 16:39:43 -0000 1.46 +++ openide/api/doc/changes/apichanges.xml 26 Feb 2002 17:37:07 -0000 @@ -110,6 +110,31 @@ + + + + Added helper methods to aid module developers to write code which works correctly with multiple monitors + + + + + + The added methods are +
+        public static GraphicsConfiguration getCurrentGraphicsConfiguration();
+        public static Rectangle getUsableScreenBounds(GraphicsConfiguration gconf);
+        public static Rectangle getCenterBounds(Dimension componentSize);
+        public static Rectangle getCenterBounds(GraphicsConfiguration gconf, Dimension componentSize);
+        
+ + One should use these methods instead of calling + Toolkit.getScreenSize(). For the same reason + Utilities.getScreenSize() is now deprecated. +
+ + +
+ Constructor DefaultPropertyModel (bean, propertyDescriptor) added Index: openide/src/org/openide/awt/HtmlBrowser.java =================================================================== RCS file: /cvs/openide/src/org/openide/awt/HtmlBrowser.java,v retrieving revision 1.69 diff -u -r1.69 HtmlBrowser.java --- openide/src/org/openide/awt/HtmlBrowser.java 11 Feb 2002 12:24:20 -0000 1.69 +++ openide/src/org/openide/awt/HtmlBrowser.java 26 Feb 2002 17:37:07 -0000 @@ -74,13 +74,10 @@ static final long serialVersionUID = 2912844785502987960L; /** Preferred width of the browser */ - public static final int DEFAULT_WIDTH = java.awt.Toolkit. - getDefaultToolkit ().getScreenSize (). - width / 2; + public static final int DEFAULT_WIDTH = org.openide.util.Utilities.getCurrentGraphicsConfiguration().getBounds().width / 2; /** Preferred height of the browser */ - public static final int DEFAULT_HEIGHT = java.awt.Toolkit. - getDefaultToolkit ().getScreenSize (). - height / 2; + public static final int DEFAULT_HEIGHT = org.openide.util.Utilities.getCurrentGraphicsConfiguration().getBounds().height / 2; + /** current implementation of html browser */ private static Factory browserFactory; /** home page URL */ Index: openide/src/org/openide/awt/JInlineMenu.java =================================================================== RCS file: /cvs/openide/src/org/openide/awt/JInlineMenu.java,v retrieving revision 1.30 diff -u -r1.30 JInlineMenu.java --- openide/src/org/openide/awt/JInlineMenu.java 13 Nov 2001 15:21:40 -0000 1.30 +++ openide/src/org/openide/awt/JInlineMenu.java 26 Feb 2002 17:37:07 -0000 @@ -280,12 +280,4 @@ JPopupMenuUtils.dynamicChange(p, usedToBeContained); } } - - public java.awt.Dimension getPreferredSize () { - if (isVisible ()) { - return new java.awt.Dimension (0,0); - } else { - return Toolkit.getDefaultToolkit ().getScreenSize (); - } - } } Index: openide/src/org/openide/awt/JPopupMenuUtils.java =================================================================== RCS file: /cvs/openide/src/org/openide/awt/JPopupMenuUtils.java,v retrieving revision 1.13 diff -u -r1.13 JPopupMenuUtils.java --- openide/src/org/openide/awt/JPopupMenuUtils.java 7 Sep 2001 14:50:46 -0000 1.13 +++ openide/src/org/openide/awt/JPopupMenuUtils.java 26 Feb 2002 17:37:07 -0000 @@ -15,13 +15,8 @@ import java.util.StringTokenizer; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Frame; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.Toolkit; -import java.awt.Window; +import java.awt.*; + import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JPopupMenu; @@ -316,9 +311,8 @@ if (screenRect != null) { return screenRect; } - Dimension screenSize = Utilities.getScreenSize(); - screenRect = new Rectangle(0, 0, screenSize.width, screenSize.height); - return screenRect; + Dimension screen = Utilities.getScreenSize(); + return new Rectangle(0, 0, screen.width, screen.height); } /* Index: openide/src/org/openide/explorer/view/ListView.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/view/ListView.java,v retrieving revision 1.49 diff -u -r1.49 ListView.java --- openide/src/org/openide/explorer/view/ListView.java 21 Jan 2002 16:41:35 -0000 1.49 +++ openide/src/org/openide/explorer/view/ListView.java 26 Feb 2002 17:37:07 -0000 @@ -601,11 +601,14 @@ java.awt.Point p = getViewport().getViewPosition(); p.x = xpos - p.x; p.y = ypos - p.y; + SwingUtilities.convertPointToScreen(p, ListView.this); Dimension popupSize = popup.getPreferredSize (); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - if (p.x + popupSize.width > screenSize.width) p.x = screenSize.width - popupSize.width; - if (p.y + popupSize.height > screenSize.height) p.y = screenSize.height - popupSize.height; + Rectangle screenBounds = Utilities.getUsableScreenBounds(getGraphicsConfiguration()); + if (p.x + popupSize.width > screenBounds.x + screenBounds.width) + p.x = screenBounds.x + screenBounds.width - popupSize.width; + if (p.y + popupSize.height > screenBounds.y + screenBounds.height) + p.y = screenBounds.y + screenBounds.height - popupSize.height; SwingUtilities.convertPointFromScreen(p, ListView.this); popup.show(this, p.x, p.y); } Index: openide/src/org/openide/explorer/view/MenuView.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/view/MenuView.java,v retrieving revision 1.40 diff -u -r1.40 MenuView.java --- openide/src/org/openide/explorer/view/MenuView.java 22 Nov 2001 13:56:33 -0000 1.40 +++ openide/src/org/openide/explorer/view/MenuView.java 26 Feb 2002 17:37:07 -0000 @@ -30,6 +30,7 @@ import org.openide.util.Mutex; import org.openide.util.NbBundle; import org.openide.util.HelpCtx; +import org.openide.util.Utilities; import org.openide.util.actions.SystemAction; import org.openide.awt.JPopupMenuUtils; @@ -139,9 +140,11 @@ p.y = e.getY() - p.y; SwingUtilities.convertPointToScreen (p, e.getComponent ()); Dimension popupSize = popupMenu.getPreferredSize (); - Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize (); - if (p.x + popupSize.width > screenSize.width) p.x = screenSize.width - popupSize.width; - if (p.y + popupSize.height > screenSize.height) p.y = screenSize.height - popupSize.height; + Rectangle screenBounds = Utilities.getUsableScreenBounds(getGraphicsConfiguration()); + if (p.x + popupSize.width > screenBounds.x + screenBounds.width) + p.x = screenBounds.x + screenBounds.width - popupSize.width; + if (p.y + popupSize.height > screenBounds.y + screenBounds.height) + p.y = screenBounds.y + screenBounds.height - popupSize.height; SwingUtilities.convertPointFromScreen (p, e.getComponent ()); popupMenu.show(e.getComponent (), p.x, p.y); } Index: openide/src/org/openide/explorer/view/TreeView.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/view/TreeView.java,v retrieving revision 1.80 diff -u -r1.80 TreeView.java --- openide/src/org/openide/explorer/view/TreeView.java 21 Jan 2002 16:41:35 -0000 1.80 +++ openide/src/org/openide/explorer/view/TreeView.java 26 Feb 2002 17:37:07 -0000 @@ -38,6 +38,7 @@ import org.openide.util.Lookup; import org.openide.util.RequestProcessor; import org.openide.util.WeakListener; +import org.openide.util.Utilities; import org.openide.util.actions.CallbackSystemAction; import org.openide.util.actions.SystemAction; import org.openide.util.actions.ActionPerformer; @@ -837,9 +838,11 @@ SwingUtilities.convertPointToScreen (p, TreeView.this); Dimension popupSize = popup.getPreferredSize (); - Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize (); - if (p.x + popupSize.width > screenSize.width) p.x = screenSize.width - popupSize.width; - if (p.y + popupSize.height > screenSize.height) p.y = screenSize.height - popupSize.height; + Rectangle screenBounds = Utilities.getUsableScreenBounds(getGraphicsConfiguration()); + if (p.x + popupSize.width > screenBounds.x + screenBounds.width) + p.x = screenBounds.x + screenBounds.width - popupSize.width; + if (p.y + popupSize.height > screenBounds.y + screenBounds.height) + p.y = screenBounds.y + screenBounds.height - popupSize.height; SwingUtilities.convertPointFromScreen (p, TreeView.this); popup.show(TreeView.this, p.x, p.y); } Index: openide/src/org/openide/nodes/IndexedCustomizer.java =================================================================== RCS file: /cvs/openide/src/org/openide/nodes/IndexedCustomizer.java,v retrieving revision 1.28 diff -u -r1.28 IndexedCustomizer.java --- openide/src/org/openide/nodes/IndexedCustomizer.java 15 Nov 2001 12:08:29 -0000 1.28 +++ openide/src/org/openide/nodes/IndexedCustomizer.java 26 Feb 2002 17:37:08 -0000 @@ -240,9 +240,8 @@ //dropSupport = new IndexedDropTarget(this, dragSupport); if (closeButton) { pack(); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = getSize(); - setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + setBounds(org.openide.util.Utilities.getCenterBounds(getSize())); + buttonClose.requestFocus (); // to get shortcuts to work buttonClose.getAccessibleContext().setAccessibleDescription(Node.getString("ACSD_Button_close")); Index: openide/src/org/openide/util/Utilities.java =================================================================== RCS file: /cvs/openide/src/org/openide/util/Utilities.java,v retrieving revision 1.84 diff -u -r1.84 Utilities.java --- openide/src/org/openide/util/Utilities.java 20 Feb 2002 09:15:42 -0000 1.84 +++ openide/src/org/openide/util/Utilities.java 26 Feb 2002 17:37:08 -0000 @@ -41,6 +41,9 @@ import java.util.HashSet; import org.openide.util.enum.SingletonEnumeration; +import org.openide.modules.Dependency; +import org.openide.modules.SpecificationVersion; + /** Otherwise uncategorized useful static methods. * * @author Jan Palka, Ian Formanek, Jaroslav Tulach @@ -1332,11 +1335,152 @@ return m; } + /** + * Finds out the monitor where the user currently has the input focus. + * This method is usually used to help the client code to figure out on + * which monitor it should place newly created windows/frames/dialogs. + * + * @return the GraphicsConfiguration of the monitor which currently has the + * input focus + * + * @since 2.5 + */ + public static GraphicsConfiguration getCurrentGraphicsConfiguration() { + Frame[] frames = Frame.getFrames(); + + for (int i = 0; i < frames.length; i++) { + if (javax.swing.SwingUtilities.findFocusOwner(frames[i]) != null) { + return frames[i].getGraphicsConfiguration(); + } + } + return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); + } + + /** + * Returns the usable area of the screen where applications can place its + * windows. The method subtracts from the screen the area of taskbars, + * system menus and the like. + * + * @param gconf the GraphicsConfiguration of the monitor + * @return the rectangle of the screen where one can place windows + * + * @since 2.5 + */ + public static Rectangle getUsableScreenBounds(GraphicsConfiguration gconf) { + if (gconf == null) + gconf = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); + + Rectangle bounds = new Rectangle(gconf.getBounds()); + + String str; + + str = System.getProperty("netbeans.screen.insets"); // NOI18N + if (str != null) { + StringTokenizer st = new StringTokenizer(str, ", "); // NOI18N + if (st.countTokens() == 4) { + try { + bounds.y = Integer.parseInt(st.nextToken()); + bounds.x = Integer.parseInt(st.nextToken()); + bounds.height -= bounds.y + Integer.parseInt(st.nextToken()); + bounds.width -= bounds.x + Integer.parseInt(st.nextToken()); + } + catch (NumberFormatException ex) { + ErrorManager.getDefault().notify(ErrorManager.WARNING, ex); + } + } + return bounds; + } + + str = System.getProperty("netbeans.taskbar.height"); // NOI18N + if (str != null) { + bounds.height -= Integer.getInteger(str, 0).intValue(); + return bounds; + } + + // if JDK 1.4 or later + + if (Dependency.JAVA_SPEC.compareTo(new SpecificationVersion("1.4")) >= 0) { // NOI18N + try { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Method m = Toolkit.class.getMethod("getScreenInsets", // NOI18N + new Class[] { GraphicsConfiguration.class }); + if (m == null) + return bounds; + + Insets insets = (Insets) m.invoke(toolkit, new Object[] { gconf }); + bounds.y += insets.top; + bounds.x += insets.left; + bounds.height -= insets.top + insets.bottom; + bounds.width -= insets.left + insets.right; + } + catch (Exception ex) { + ErrorManager.getDefault().notify(ErrorManager.WARNING, ex); + } + return bounds; + } + + if (Utilities.isWindows ()) { + bounds.height -= Utilities.TYPICAL_WINDOWS_TASKBAR_HEIGHT; + return bounds; + } + + if ((getOperatingSystem() & OS_MAC) != 0) { + bounds.height -= TYPICAL_MACOSX_MENU_HEIGHT; + return bounds; + } + + return bounds; + } + + /** + * Helps client code place components on the center of the screen. It + * handles multiple monitor configuration correctly + * + * @param componentSize the size of the component + * @return bounds of the centered component + * + * @since 2.5 + */ + public static Rectangle getCenterBounds(Dimension componentSize) { + return getCenterBounds(getCurrentGraphicsConfiguration(), + componentSize); + } + + /** + * Helps client code place components on the center of the screen. It + * handles multiple monitor configuration correctly + * + * @param gconf the GraphicsConfiguration of the monitor + * @param componentSize the size of the component + * @return bounds of the centered component + * + * @since 2.5 + */ + public static Rectangle getCenterBounds(GraphicsConfiguration gconf, + Dimension componentSize) { + if (gconf == null) + gconf = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); + + Rectangle bounds = gconf.getBounds(); + return new Rectangle(bounds.x + (bounds.width - componentSize.width) / 2, + bounds.y + (bounds.height - componentSize.height) / 2, + componentSize.width, + componentSize.height); + } + /** @return size of the screen. The size is modified for Windows OS * - some pointes are subtracted to reflect a presence of the taskbar + * + * @deprecated this method is almost useless in multiple monitor configuration + * + * @see #getCurrentGraphicsConfiguration + * @see #getUsableScreenBounds(GraphicsConfiguration) + * @see #getCenterBounds(Dimension) + * @see #getCenterBounds(GraphicsConfiguration, Dimension) */ public static final Dimension getScreenSize() { - Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + if (isWindows() && !Boolean.getBoolean ("netbeans.no.taskbar")) { screenSize.height -= TYPICAL_WINDOWS_TASKBAR_HEIGHT; } else if ((getOperatingSystem() & OS_MAC) != 0) @@ -1382,7 +1526,8 @@ contentPane.add(chooser, BorderLayout.CENTER); dialog.pack(); - dialog.setLocationRelativeTo(parent); + dialog.setBounds(getCenterBounds(parent.getGraphicsConfiguration(), + dialog.getSize())); chooser.rescanCurrentDirectory(); final int[] retValue = new int[] { javax.swing.JFileChooser.CANCEL_OPTION }; Index: properties/manifest.mf =================================================================== RCS file: /cvs/properties/manifest.mf,v retrieving revision 1.45 diff -u -r1.45 manifest.mf --- properties/manifest.mf 29 Nov 2001 15:56:55 -0000 1.45 +++ properties/manifest.mf 26 Feb 2002 17:37:10 -0000 @@ -3,7 +3,7 @@ OpenIDE-Module-Specification-Version: 1.8 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Layer: org/netbeans/modules/properties/Layer.xml -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 Name: org/netbeans/modules/properties/PropertiesDataLoader.class OpenIDE-Module-Class: Loader Index: properties/src/org/netbeans/modules/properties/BundleEditPanel.java =================================================================== RCS file: /cvs/properties/src/org/netbeans/modules/properties/BundleEditPanel.java,v retrieving revision 1.43 diff -u -r1.43 BundleEditPanel.java --- properties/src/org/netbeans/modules/properties/BundleEditPanel.java 16 Nov 2001 08:43:22 -0000 1.43 +++ properties/src/org/netbeans/modules/properties/BundleEditPanel.java 26 Feb 2002 17:37:10 -0000 @@ -657,7 +657,9 @@ * minimal width of column is 1/10 of screen width. */ private void adjustColumnWidths() { // The least initial width of column (1/10 of screen witdh). - int columnWidth = Toolkit.getDefaultToolkit().getScreenSize().width/10; + Rectangle screenBounds = org.openide.util.Utilities.getUsableScreenBounds( + org.openide.util.Utilities.getCurrentGraphicsConfiguration()); + int columnWidth = screenBounds.width / 10; // Try to set widths according parent (viewport) width. int totalWidth = 0; Index: vcscore/manifest.mf =================================================================== RCS file: /cvs/vcscore/manifest.mf,v retrieving revision 1.25 diff -u -r1.25 manifest.mf --- vcscore/manifest.mf 29 Nov 2001 15:56:56 -0000 1.25 +++ vcscore/manifest.mf 26 Feb 2002 17:37:13 -0000 @@ -4,7 +4,7 @@ OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Layer: org/netbeans/modules/vcscore/resources/mf-layer.xml OpenIDE-Module-Install: org/netbeans/modules/vcscore/VcsCoreModuleInstall.class -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.28 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Module-Dependencies: org.openidex.util/2, org.netbeans.modules.editor/1 > 1.7 OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE] Index: vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java =================================================================== RCS file: /cvs/vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java,v retrieving revision 1.19 diff -u -r1.19 VcsUtilities.java --- vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java 18 Nov 2001 12:49:22 -0000 1.19 +++ vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java 26 Feb 2002 17:37:13 -0000 @@ -462,9 +462,7 @@ //------------------------------------------- public static void centerWindow (Window w) { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - Dimension dialogSize = w.getSize(); - w.setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2); + w.setBounds(org.openide.util.Utilities.getCenterBounds(w.getSize())); } public static boolean deleteRecursive (File dir) { Index: vcsgeneric/manifest.mf =================================================================== RCS file: /cvs/vcsgeneric/manifest.mf,v retrieving revision 1.49 diff -u -r1.49 manifest.mf --- vcsgeneric/manifest.mf 29 Nov 2001 15:56:56 -0000 1.49 +++ vcsgeneric/manifest.mf 26 Feb 2002 17:37:13 -0000 @@ -3,7 +3,7 @@ OpenIDE-Module-Install: org/netbeans/modules/vcs/advanced/CommandLineVcsModule.class OpenIDE-Module-Specification-Version: 1.6 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ -OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4 OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1 OpenIDE-Module-Layer: org/netbeans/modules/vcs/advanced/config/mf-layer.xml OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE] Index: vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java =================================================================== RCS file: /cvs/vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java,v retrieving revision 1.68 diff -u -r1.68 VcsCustomizer.java --- vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java 10 Feb 2002 17:18:03 -0000 1.68 +++ vcsgeneric/src/org/netbeans/modules/vcs/advanced/VcsCustomizer.java 26 Feb 2002 17:37:13 -0000 @@ -1627,7 +1627,10 @@ gridBagConstraints1.gridy = 1; panel.add (advancedPanel, gridBagConstraints1); - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Rectangle screenBounds = org.openide.util.Utilities.getUsableScreenBounds( + org.openide.util.Utilities.getCurrentGraphicsConfiguration()); + Dimension screenSize = screenBounds.getSize(); + screenSize.setSize((int) (screenSize.width*ADVANCED_DLG_WIDTH_RELATIVE), variablePanel.getPreferredSize().height+advancedPanel.getPreferredSize().height+16); panel.setPreferredSize(screenSize); Index: web/advanced/src/org/netbeans/modules/web/dd/DDChangesPanel.java =================================================================== RCS file: /cvs/web/advanced/src/org/netbeans/modules/web/dd/DDChangesPanel.java,v retrieving revision 1.1 diff -u -r1.1 DDChangesPanel.java --- web/advanced/src/org/netbeans/modules/web/dd/DDChangesPanel.java 21 Dec 2001 10:42:51 -0000 1.1 +++ web/advanced/src/org/netbeans/modules/web/dd/DDChangesPanel.java 26 Feb 2002 17:37:18 -0000 @@ -87,10 +87,7 @@ } public java.awt.Dimension getPreferredSize () { - java.awt.Dimension size = super.getPreferredSize (); - size.width = Math.max (600, Math.min (size.width, java.awt.Toolkit.getDefaultToolkit ().getScreenSize ().width - 200)); - size.height = Math.max (300, Math.min (size.height, java.awt.Toolkit.getDefaultToolkit ().getScreenSize ().width - 200)); - return size; + return new java.awt.Dimension(600, 400); } synchronized void setChanges (List changes) {