Index: src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.form
===================================================================
RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.form,v
retrieving revision 1.4
diff -u -b -r1.4 CatalogMounterPanel.form
--- src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.form 12 Mar 2002 14:38:45 -0000 1.4
+++ src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.form 28 May 2003 13:46:38 -0000
@@ -7,16 +7,13 @@
-
-
-
-
-
-
+
+
+
@@ -25,9 +22,6 @@
-
-
-
@@ -39,6 +33,11 @@
+
+
+
+
+
Index: src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.java
===================================================================
RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.java,v
retrieving revision 1.5
diff -u -b -r1.5 CatalogMounterPanel.java
--- src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.java 12 Mar 2002 14:38:45 -0000 1.5
+++ src/org/netbeans/modules/xml/catalog/CatalogMounterPanel.java 28 May 2003 13:46:38 -0000
@@ -43,6 +43,15 @@
model.addChangeListener(this);
}
+ /**
+ * Compute preffered dimension for combo with
+ * particulal number of columns
+ */
+ private Dimension comboSize(int columns) {
+ JTextField template = new JTextField();
+ template.setColumns(columns);
+ return template.getPreferredSize();
+ }
/** This method is called from within the constructor to
@@ -60,16 +69,15 @@
setLayout(new java.awt.GridBagLayout());
setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(4, 4, 4, 4)));
- setPreferredSize(new java.awt.Dimension(380, 100));
setMinimumSize(new java.awt.Dimension(380, 100));
catalogLabel.setText(Util.THIS.getString ("CatalogMounterPanel.catalogLabel.text"));
- catalogLabel.setForeground(java.awt.Color.black);
catalogLabel.setLabelFor(catalogComboBox);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
add(catalogLabel, gridBagConstraints);
+ catalogComboBox.setPreferredSize(comboSize(40));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
@@ -84,9 +92,9 @@
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
add(parentPanel, gridBagConstraints);
}//GEN-END:initComponents
@@ -94,14 +102,15 @@
private void updateCatalogPanel() {
Customizer cust = model.getCatalogCustomizer();
cust.setObject(model.getCatalog());
+ invalidate();
parentPanel.removeAll();
Component catalogPanel = (Component) cust;
parentPanel.add(catalogPanel, BorderLayout.CENTER);
+ validate();
}
public void stateChanged(ChangeEvent e) {
updateCatalogPanel();
- revalidate();
}
// Variables declaration - do not modify//GEN-BEGIN:variables
Index: src/org/netbeans/modules/xml/catalog/CatalogRootNode.java
===================================================================
RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/CatalogRootNode.java,v
retrieving revision 1.15
diff -u -b -r1.15 CatalogRootNode.java
--- src/org/netbeans/modules/xml/catalog/CatalogRootNode.java 27 Feb 2003 23:45:34 -0000 1.15
+++ src/org/netbeans/modules/xml/catalog/CatalogRootNode.java 28 May 2003 13:46:38 -0000
@@ -32,6 +32,7 @@
import org.netbeans.modules.xml.catalog.settings.CatalogSettings;
import org.openide.util.HelpCtx;
import java.awt.event.ActionEvent;
+import javax.swing.*;
/**
* Node representing catalog root in the Runtime tab. It retrieves all
@@ -103,7 +104,23 @@
// }
// });
- myDialog.setSize(450, 250); //^ packing never creates bigger window :-(
+ // set dialog size to 60x10 characters
+ JTextArea template = new JTextArea();
+ template.setColumns(60);
+ template.setRows(8 + 2); // 8 lines, 2 bottom line with buttons
+ Dimension dimension = template.getPreferredSize();
+
+ //#33996 this is insets size as prescribed by UI guidelines
+ final int insets = 12;
+
+ // small fonts have problems that insets are times more important
+ // then font size, include also insets
+ int heightInsets = dimension.height + 10 * insets; // 10 lines * 12 inset size
+ int widthInsets = dimension.width + 4 * insets;
+ Dimension fullDimension = new Dimension(widthInsets, heightInsets);
+ myDialog.setSize(fullDimension); //^ packing never creates bigger window :-(
+
+
myDialog.show();
}
Index: src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form
===================================================================
RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form,v
retrieving revision 1.5
diff -u -b -r1.5 XCatalogCustomizer.form
--- src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form 12 Mar 2002 14:38:46 -0000 1.5
+++ src/org/netbeans/modules/xml/catalog/impl/XCatalogCustomizer.form 28 May 2003 13:46:38 -0000
@@ -1,9 +1,9 @@