Index: src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.form =================================================================== RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.form,v retrieving revision 1.5 diff -u -b -r1.5 SystemCatalogCustomizer.form --- src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.form 12 Mar 2002 14:38:46 -0000 1.5 +++ src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.form 28 May 2003 15:17:25 -0000 @@ -1,39 +1,37 @@
- - - + + + - - + - - - + + + + + - - - - - - + + + + - Index: src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.java =================================================================== RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.java,v retrieving revision 1.5 diff -u -b -r1.5 SystemCatalogCustomizer.java --- src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.java 12 Mar 2002 14:38:46 -0000 1.5 +++ src/org/netbeans/modules/xml/catalog/impl/SystemCatalogCustomizer.java 28 May 2003 15:17:25 -0000 @@ -48,15 +48,16 @@ setLayout(new java.awt.GridBagLayout()); - jTextArea1.setWrapStyleWord(true); - jTextArea1.setLineWrap(true); + jTextArea1.setColumns(40); jTextArea1.setEditable(false); - jTextArea1.setForeground(new java.awt.Color(102, 102, 153)); jTextArea1.setFont(javax.swing.UIManager.getFont ("Label.font")); + jTextArea1.setForeground(new java.awt.Color(102, 102, 153)); + jTextArea1.setLineWrap(true); + jTextArea1.setRows(4); jTextArea1.setText(Util.THIS.getString ("SystemCatalogCustomizer.readOnly.text")); - jTextArea1.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground")); - jTextArea1.setPreferredSize(new java.awt.Dimension(300, 50)); + jTextArea1.setWrapStyleWord(true); jTextArea1.setBorder(null); + jTextArea1.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground")); jTextArea1.setEnabled(false); jTextArea1.setOpaque(false); gridBagConstraints = new java.awt.GridBagConstraints(); Index: src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.form =================================================================== RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.form,v retrieving revision 1.6 diff -u -b -r1.6 CatalogCustomizer.form --- src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.form 10 Apr 2002 13:41:22 -0000 1.6 +++ src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.form 28 May 2003 15:17:25 -0000 @@ -1,23 +1,20 @@ - - - + + + - - + + - - - @@ -27,12 +24,11 @@ - + - + - @@ -49,7 +45,6 @@ - @@ -68,7 +63,6 @@ - @@ -80,6 +74,7 @@ + @@ -88,6 +83,7 @@ + Index: src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.java =================================================================== RCS file: /cvs/xml/catalog/src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.java,v retrieving revision 1.7 diff -u -b -r1.7 CatalogCustomizer.java --- src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.java 10 Apr 2002 13:41:22 -0000 1.7 +++ src/org/netbeans/modules/xml/catalog/impl/sun/CatalogCustomizer.java 28 May 2003 15:17:25 -0000 @@ -61,26 +61,18 @@ preferCheckBox = new javax.swing.JCheckBox(); descTextArea = new javax.swing.JTextArea(); + FormListener formListener = new FormListener(); + setLayout(new java.awt.GridBagLayout()); - locationLabel.setForeground(java.awt.Color.black); - locationLabel.setText(Util.THIS.getString ("CatalogCustomizer.locationLabel.text")); locationLabel.setLabelFor(locationTextField); + locationLabel.setText(Util.THIS.getString ("CatalogCustomizer.locationLabel.text")); add(locationLabel, new java.awt.GridBagConstraints()); - locationTextField.setColumns(20); - locationTextField.setPreferredSize(new java.awt.Dimension(220, 20)); - locationTextField.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - locationTextFieldActionPerformed(evt); - } - }); - - locationTextField.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusLost(java.awt.event.FocusEvent evt) { - locationTextFieldFocusLost(evt); - } - }); + locationTextField.setColumns(40); + locationTextField.setPreferredSize(new java.awt.Dimension(440, 20)); + locationTextField.addActionListener(formListener); + locationTextField.addFocusListener(formListener); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; @@ -89,11 +81,7 @@ add(locationTextField, gridBagConstraints); selectButton.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("PROP_choose_file")); - selectButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - selectButtonActionPerformed(evt); - } - }); + selectButton.addActionListener(formListener); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; @@ -102,11 +90,7 @@ preferCheckBox.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/xml/catalog/impl/sun/Bundle").getString("LBL_preference")); preferCheckBox.setToolTipText(Util.THIS.getString("HINT_pp")); - preferCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - preferCheckBoxStateChanged(evt); - } - }); + preferCheckBox.addChangeListener(formListener); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; @@ -116,10 +100,12 @@ gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11); add(preferCheckBox, gridBagConstraints); + descTextArea.setColumns(40); descTextArea.setEditable(false); descTextArea.setFont(javax.swing.UIManager.getFont ("Label.font")); descTextArea.setForeground(new java.awt.Color(102, 102, 153)); descTextArea.setLineWrap(true); + descTextArea.setRows(4); descTextArea.setText(Util.THIS.getString("DESC_catalog_fmts")); descTextArea.setWrapStyleWord(true); descTextArea.setDisabledTextColor(javax.swing.UIManager.getColor ("Label.foreground")); @@ -134,6 +120,34 @@ gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); add(descTextArea, gridBagConstraints); + } + + // Code for dispatching events from components to event handlers. + + private class FormListener implements java.awt.event.ActionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener { + public void actionPerformed(java.awt.event.ActionEvent evt) { + if (evt.getSource() == locationTextField) { + CatalogCustomizer.this.locationTextFieldActionPerformed(evt); + } + else if (evt.getSource() == selectButton) { + CatalogCustomizer.this.selectButtonActionPerformed(evt); + } + } + + public void focusGained(java.awt.event.FocusEvent evt) { + } + + public void focusLost(java.awt.event.FocusEvent evt) { + if (evt.getSource() == locationTextField) { + CatalogCustomizer.this.locationTextFieldFocusLost(evt); + } + } + + public void stateChanged(javax.swing.event.ChangeEvent evt) { + if (evt.getSource() == preferCheckBox) { + CatalogCustomizer.this.preferCheckBoxStateChanged(evt); + } + } }//GEN-END:initComponents private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed @@ -184,11 +198,11 @@ } // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea descTextArea; private javax.swing.JLabel locationLabel; private javax.swing.JTextField locationTextField; private javax.swing.JCheckBox preferCheckBox; private javax.swing.JButton selectButton; - private javax.swing.JTextArea descTextArea; // End of variables declaration//GEN-END:variables }