Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    *
    * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    *
    * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    * Other names may be trademarks of their respective owners.
    *
    * The contents of this file are subject to the terms of either the GNU
   * General Public License Version 2 only ("GPL") or the Common
   * Development and Distribution License("CDDL") (collectively, the
   * "License"). You may not use this file except in compliance with the
   * License. You can obtain a copy of the License at
   * http://www.netbeans.org/cddl-gplv2.html
   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   * specific language governing permissions and limitations under the
   * License.  When distributing the software, include this License Header
   * Notice in each file and include the License file at
   * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   * particular file as subject to the "Classpath" exception as provided
   * by Oracle in the GPL Version 2 section of the License file that
   * accompanied this code. If applicable, add the following below the
   * License Header, with the fields enclosed by brackets [] replaced by
   * your own identifying information:
   * "Portions Copyrighted [year] [name of copyright owner]"
   *
   * Contributor(s):
   *
   * The Original Software is NetBeans. The Initial Developer of the Original
   * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   * Microsystems, Inc. All Rights Reserved.
   *
   * If you wish your version of this file to be governed by only the CDDL
   * or only the GPL Version 2, indicate your decision by adding
   * "[Contributor] elects to include this software in this distribution
   * under the [CDDL or GPL Version 2] license." If you do not indicate a
   * single choice of license, a recipient has the option to distribute
   * your version of this file under either the CDDL, the GPL Version 2 or
   * to extend the choice of license to its licensees as provided above.
   * However, if you add GPL Version 2 code and therefore, elected the GPL
   * Version 2 license, then the option applies only if the new code is
   * made subject to such option by the copyright holder.
   */
  
  package org.netbeans.modules.xml.jaxb.ui;
  
  import java.awt.Dialog;
  import java.awt.Insets;
  import java.io.File;
  import java.util.List;
  import java.util.Vector;
  import javax.swing.Box;

Author(s):
gpatil
  
  public class JAXBBindingInfoPnl extends javax.swing.JPanel 
          implements DocumentListener{

    
Creates new form JAXBBindingInfoPnl
  
      public JAXBBindingInfoPnl(JAXBWizBindingCfgPanel parent) {
          this. = parent;
          initComponents();
          initComponentsCustom();
      }

    
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
  
      // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
      private void initComponents() {
          java.awt.GridBagConstraints gridBagConstraints;
  
           = new javax.swing.ButtonGroup();
           = new javax.swing.JLabel();
           = new javax.swing.JLabel();
           = new javax.swing.JLabel();
           = new javax.swing.JRadioButton();
           = new javax.swing.JTextField();
           = new javax.swing.JTextField();
           = new javax.swing.JTextField();
           = new javax.swing.JButton();
          = new javax.swing.JRadioButton();
          = new javax.swing.JTextField();
          = new javax.swing.JLabel();
          = new javax.swing.JTextField();
          = new javax.swing.JLabel();
          = new javax.swing.JLabel();
          = new javax.swing.JComboBox();
          = new javax.swing.JSeparator();
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
          = new javax.swing.JButton();
          = new javax.swing.JComboBox();
          = new javax.swing.JTextField();
          = new javax.swing.JButton();
 
         setLayout(new java.awt.GridBagLayout());
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_SchemaName")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 0;
         gridBagConstraints.fill = ...;
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"A11Y_Desc_BindingName")); // NOI18N
 
         .setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Project")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 1;
         gridBagConstraints.fill = ...;
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"A11Y_Desc_Lbl_Project")); // NOI18N
 
         .setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_SchamaFile")); // NOI18N
         .setToolTipText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"TTP_SchemaLoc")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
         add(gridBagConstraints);
 
         .setSelected(true);
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_SelectFromLocalFileSystem")); // NOI18N
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
         .setMargin(new java.awt.Insets(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 3;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 15, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_rdb_SelectFromLocalFileSys")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_SelectLocal")); // NOI18N
 
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 fireChangeEvent(evt);
             }
         });
             public void focusLost(java.awt.event.FocusEvent evt) {
                 JAXBBindingInfoPnl.this.focusLost(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 0;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"A11Y_Desc_BindingNameTxt")); // NOI18N
 
         .setEditable(false);
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 1;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"A11Y_Desc_txt_Project")); // NOI18N
 
             public void focusLost(java.awt.event.FocusEvent evt) {
                 JAXBBindingInfoPnl.this.focusLost(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 4;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.anchor = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 35, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_txt_LocalSchema")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_txt_LocalSchemaPath")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Browse")); // NOI18N
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 2;
         gridBagConstraints.gridy = 4;
         gridBagConstraints.anchor = ...;
         gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_btnBrowseSchema")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_BrowseLocalSchema")); // NOI18N
 
         .add();
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_SelectFromURL")); // NOI18N
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
         .setMargin(new java.awt.Insets(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 5;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 15, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_SelectURL")); // NOI18N
 
         .setEditable(false);
         .setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_URL_Filler")); // NOI18N
         .addFocusListener(new java.awt.event.FocusAdapter() {
             public void focusLost(java.awt.event.FocusEvent evt) {
                 JAXBBindingInfoPnl.this.focusLost(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 6;
         gridBagConstraints.gridwidth = 3;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 35, 5, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_txt_URL")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_txt_SchemaURL")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_PackageName")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 8;
         gridBagConstraints.fill = ...;
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_lbl_package_name")); // NOI18N
 
         .setToolTipText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"TTP_PackageName")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 8;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_txt_PackageName")); // NOI18N
 
         .setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Options")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 9;
         gridBagConstraints.fill = ...;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_CompileOoptions")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_SchemaType")); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 7;
         gridBagConstraints.fill = ...;
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_lbl_SchemaType")); // NOI18N
 
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 schemaTypeChangeHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 7;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_cmb_SchemaType")); // NOI18N
 
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 10;
         gridBagConstraints.gridwidth = 3;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
         add(gridBagConstraints);
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_UseBindingFile")); // NOI18N
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
         .setMargin(new java.awt.Insets(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 12;
         gridBagConstraints.fill = ...;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_chkbx_UseBindingFiles")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_UseCatalogFile")); // NOI18N
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
         .setMargin(new java.awt.Insets(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 13;
         gridBagConstraints.fill = ...;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_chkbx_UseCatalog")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_UseExtension")); // NOI18N
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
         .setMargin(new java.awt.Insets(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 0;
         gridBagConstraints.gridy = 11;
         gridBagConstraints.fill = ...;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_chkbxUseXtension")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Configure")); // NOI18N
         .setEnabled(false);
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 2;
         gridBagConstraints.gridy = 12;
         gridBagConstraints.anchor = ...;
         gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_btn_Configure")); // NOI18N
 
         .setEnabled(false);
         .setPreferredSize(new java.awt.Dimension(275, 20));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 12;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_cmb_importedBindingFiles")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_cmb_ImportedBindingFiles")); // NOI18N
 
         .setEditable(false);
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 13;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASN_Catalog")); // NOI18N
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"asd_Catalog")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_BrowseCatalog")); // NOI18N
         .setEnabled(false);
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 btnSelectionHandler(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 2;
         gridBagConstraints.gridy = 13;
         gridBagConstraints.anchor = ...;
         gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
         add(gridBagConstraints);
         .getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"ASD_btnBrowseCatalog")); // NOI18N
     }// </editor-fold>//GEN-END:initComponents
 
 private void focusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_focusLost
     if (evt.getSource() == this.){
         String str = this..getText();
         if ((this. != null) && (this..equals(str))){
             //Field has not changed, skip guessing 
         } else {
             if ((str != null) && (!"".equals(str.trim()))){            
                 guessSchemaType(str);
                 this. = str;
                 str = relativizePath(str);
                 if ((str != null) && (!"".equals(str.trim()))){
                     this..setText(str);
                 }
             }
         }        
     }
     
     if (evt.getSource() == this.){
         String str = this..getText();
         if ((this. != null) && (this..equals(str))){
             //Field has not changed, skip guessing 
         } else {
             guessSchemaType(str);
             this. = str;
         }        
     }
     
     this..fireChangeEvent();
 }//GEN-LAST:event_focusLost
 
 private void fireChangeEvent(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fireChangeEvent
     this..fireChangeEvent();
 }//GEN-LAST:event_fireChangeEvent
 
     private String relativizePath(String absPath){
         File absFile = new File(absPath);
         absFile = FileUtil.normalizeFile(absFile);
         return FileSysUtil.Absolute2RelativePathStr(this.absFile);
     }
     
     private String getMsg(String msgKey){
         return org.openide.util.NbBundle.getMessage(
                 JAXBBindingInfoPnl.classmsgKey);
     }
 
     private String getMsg(String msgKeyObject params){
         return org.openide.util.NbBundle.getMessage(
                 JAXBBindingInfoPnl.classmsgKeyparams);
     }
     
     private void initComponentsCustom(){
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
          = new javax.swing.JCheckBox();
 
         this..setMargin(new Insets(5, 5, 5, 5));
         this..setMargin(new Insets(5, 5, 5, 5));
         this..setMargin(new Insets(5, 5, 5, 5));        
         this..setMargin(new Insets(5, 5, 5, 5));
         this..setMargin(new Insets(5, 5, 5, 5));        
 
         //chkbxNv.setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class, "LBL_NV")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_NV")); // NOI18N        
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
 
         //chkbxReadOnly.setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class, "LBL_ReadOnly")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_ReadOnly")); // NOI18N        
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
 
         //chkbxNpa.setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class, "LBL_NPA")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_NPA")); // NOI18N        
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
 
 
         //chkbxVerbose.setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class, "LBL_Verbose")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Verbose")); // NOI18N        
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
 
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 fireChangeEvent(evt);
             }
         });
 
 	//chkbxQuiet.setText(org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class, "LBL_Quiet")); // NOI18N
         org.openide.awt.Mnemonics.setLocalizedText(, org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.class"LBL_Quiet")); // NOI18N        
 	.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 fireChangeEvent(evt);
             }
 	});
 
         this. = Box.createHorizontalBox();
         this..add(this.);
         this..add(Box.createHorizontalStrut(10));
         this..add(this.);
         this..add(Box.createHorizontalStrut(10));
         this..add(this.);
         this..add(Box.createHorizontalStrut(10));
         this..add(this.);
         this..add(Box.createHorizontalStrut(10));
         this..add(this.);
         this..add(Box.createHorizontalStrut(10));
         
         GridBagConstraints gridBagConstraints = new GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 9;
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = ...;
         gridBagConstraints.weightx = 0.5;
         gridBagConstraints.insets = new Insets(5, 5, 5, 5);    
         add(this.gridBagConstraints);
     
         // set tooltips.
         this..setToolTipText(getMsg("TT_NV")); //NOI18N
         this..setToolTipText(getMsg("TT_ReadOnly")); //NOI18N
         this..setToolTipText(getMsg("TT_NPA")); //NOI18N
         this..setToolTipText(getMsg("TT_Verbose")); //NOI18N
         this..setToolTipText(getMsg("TT_Quiet")); //NOI18N
 
         this..setToolTipText(getMsg("TT_Extension")); //NOI18N
         this..setToolTipText(getMsg("TT_chkbxBindingFile"));//NOI18N
         this..setToolTipText(getMsg("TT_chkbxCatalogFile"));//NOI18N
         this..setToolTipText(getMsg("TT_SchemaType")); //NOI18N
         this..setToolTipText(getMsg("TT_PackageName")); //NOI18N
         this..setToolTipText(getMsg("TT_URL")); //NOI18N
         this..setToolTipText(getMsg("TT_LocalSchemaFile")); //NOI18N
         this..setToolTipText(getMsg("TT_SchemaName" )); //NOI18N
         
         this..getDocument().addDocumentListener(this);
         this..getDocument().addDocumentListener(this);
         this..getDocument().addDocumentListener(this);
     }
 
     private void localFileSelected(boolean selected){
         this..setEnabled(selected);
         this..setEditable(selected);
         this..setEnabled(!selected);
         this..setEditable(!selected);
         this..setEnabled(selected);
     }
 
     private void useBindingFileSelection(boolean selected){
         this..setEnabled(selected);
         this..setEnabled(selected);
     }
 
     private void useCatalogFileSelection(boolean selected){
         this..setEnabled(selected);
         this..setEditable(selected);
         this..setEnabled(selected);
     }
 
     private void btnSelectionHandler(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSelectionHandler
         if (evt.getSource() == this.){
             if (this..isSelected()){
                 localFileSelected(true);
             }
         }
 
         if (evt.getSource() == this.){
             if (this..isSelected()){
                 //urlSelected();
                 localFileSelected(false);
             }
         }
 
         if (evt.getSource() == this.){
             if (this..isSelected()){
                 useBindingFileSelection(true);
             } else {
                 useBindingFileSelection(false);
             }
         }
 
         if (evt.getSource() == this.){
             if (this..isSelected()){
                 useCatalogFileSelection(true);
             } else {
                 useCatalogFileSelection(false);
             }
         }
 
         if (evt.getSource() == this.){
             String filePath = selectFileFromFileSystem(this,
                     this.,
                     .);
             if (filePath != null){
                 this..setText(filePath);
 
                 if ((this. != null
                         && (this..equals(filePath))){
                     //Field has not changed, skip guessing 
                 } else {
                     guessSchemaType(filePath);
                     this. = filePath;
                 }                        
             }
         }
 
         if (evt.getSource() == this.){
             Vector<Stringfiles = new Vector<String>();
             files.addAll(getBindingFiles());
             FileListPanel flp = new FileListPanel();
             flp.setProjDir(this.);
             flp.setFiles(files);
             DialogDescriptor dd = new DialogDescriptor(flp
                     getMsg("LBL_DD_TTL_BindingFile")); //NOI18N
             Dialog dlg = DialogDisplayer.getDefault().createDialog(dd);
             dlg.setVisible(true);
             if (dd.getValue() == .){
                 files.removeAllElements();
                 files.addAll(flp.getFiles());
                 DefaultComboBoxModel model = new DefaultComboBoxModel(files);
                 this..setModel(model);
             }
         }
 
         if (evt.getSource() == this.){
             String filePath = selectFileFromFileSystem(this,
                     this.,
                     .);
             if (filePath != null){
                 this..setText(filePath);
             }
         }
 
         this..fireChangeEvent();
 }//GEN-LAST:event_btnSelectionHandler
 
     private void schemaTypeChangeHandler(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schemaTypeChangeHandler
         if (!this.isInitializing()){
             if (!.equals(this..getSelectedItem())){
                 NotifyDescriptor nd = new NotifyDescriptor.Message(
                         getMsg("MSG_SchemaTypeNotSupported"// NOI18N
                         this..getSelectedItem()),
                         .);
                 DialogDisplayer.getDefault().notify(nd);
             }
         }
     }//GEN-LAST:event_schemaTypeChangeHandler
 
     private void guessSchemaType(String str){
         if (str != null){
             str = str.toLowerCase();
             if (str.endsWith("wsdl")){ //NOI18N
                 this..setSelectedItem();
             }
 
             if (str.endsWith("xsd")){ //NOI18N
                 this..setSelectedItem();
             }
 
             if (str.endsWith("dtd")){ //NOI18N
                 this..setSelectedItem();
             }
 
             if ( str.endsWith("rng") || str.endsWith("relaxng")){ //NOI18N
                 this..setSelectedItem();
             }                
         }        
     }
     
 
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JButton btnBrowseFile;
     private javax.swing.JComboBox cmbSchemaType;
     private javax.swing.JSeparator jSeparator1;
     private javax.swing.JLabel lblOptions;
     private javax.swing.JLabel lblPackageName;
     private javax.swing.JLabel lblPrjName;
     private javax.swing.JLabel lblSchemaFile;
     private javax.swing.JLabel lblSchemaName;
     private javax.swing.JLabel lblSchemaType;
     private javax.swing.ButtonGroup schemaSource;
     private javax.swing.JTextField txtFilePath;
     private javax.swing.JTextField txtPrjName;
     private javax.swing.JTextField txtSchemaName;
     private javax.swing.JTextField txtURL;
     // End of variables declaration//GEN-END:variables
 
 
     // Custom code
     // Custom UI components
     private javax.swing.JCheckBox chkbxNpa;
     private javax.swing.JCheckBox chkbxNv;
     private javax.swing.JCheckBox chkbxQuiet;
     private javax.swing.JCheckBox chkbxReadOnly;
     private javax.swing.JCheckBox chkbxVerbose;
     private javax.swing.Box optionsBox;
 
     // Custom variables
     private static java.util.Vector<ComboElement<StringString>> SCHEMA_TYPES = null;
     private static ComboElement<StringStringSCHEMA_TYPE_WSDL = 
             new JAXBBindingInfoPnl.ComboElement<StringString>(getMessage(
             "LBL_" + .), //NOI18N
             .) ;
     private static ComboElement<StringStringSCHEMA_TYPE_XML = 
             new JAXBBindingInfoPnl.ComboElement<StringString>(getMessage(
             "LBL_" + .), //NOI18N
     private static ComboElement<StringStringSCHEMA_TYPE_RELAXNG = 
             new JAXBBindingInfoPnl.ComboElement<StringString>(getMessage(
             "LBL_" + .), //NOI18N
     private static ComboElement<StringStringSCHEMA_TYPE_RELAXNG_CMPCT = 
             new JAXBBindingInfoPnl.ComboElement<StringString>(getMessage(
             "LBL_" + .), //NOI18N
     private static ComboElement<StringStringSCHEMA_TYPE_DTD = 
             new JAXBBindingInfoPnl.ComboElement<StringString>(getMessage(
             "LBL_" + .), //NOI18N
             .) ;
     
     private static java.util.Map<StringFileLAST_BROWSED_DIRS = new java.util.HashMap<StringFile>();
     private JAXBWizBindingCfgPanel wizPanel = null;
     private Vector<StringorigBindingFiles = new Vector<String>();
     private String prevSchemaPath = null;
     private String prevSchemaURL = null;    
     private File projDir = null;
     private boolean initializing = false;
             
     private static String getMessage(String key){
         return org.openide.util.NbBundle.getMessage(JAXBBindingInfoPnl.classkey);
     }
 
     private static synchronized java.util.Vector<ComboElement<StringString>>
             getSchemaTypes(){
         if ( == null){
              = new java.util.Vector<ComboElement<StringString>>();
             .add();
             .add();
             .add();
             .add();
             .add();
         }
         return ;
     }
 
     private static synchronized File getLastBrowsedDir(String type){
         return .get(type);
     }
 
     private static synchronized void setLastBrowsedDir(String typeFile dir){
         .put(typedir);
     }
 
     protected static String selectFileFromFileSystem(JPanel panel,
             File projDir,
             String type){
         File file = null;
         String ret = null;
         File lastBrowsed = getLastBrowsedDir(type);
         JFileChooser jfc = new JFileChooser();
         if (lastBrowsed != null){
             jfc.setCurrentDirectory(lastBrowsed);
         }
 
         jfc.setMultiSelectionEnabled(false);
         jfc.setFileSelectionMode.  );
         int iRt = jfc.showOpenDialog(panel);
         if ( iRt == . ) {
             file = jfc.getSelectedFile();
             file = FileUtil.normalizeFile(file);
         }
         File currDir = jfc.getCurrentDirectory();
         if (currDir != null){
             setLastBrowsedDir(typecurrDir);
         }
         
         if (file != null){
             String absPath = file.getAbsolutePath();
             ret = FileSysUtil.Absolute2RelativePathStr(projDir
                     file.getAbsoluteFile());
             if (ret == null){
                 //This can happen in Windows where Project and Files are in 
                 // different drives.
                 ret = absPath;
             }
         }        
 
         return ret;
     }
 
     private synchronized boolean isInitializing(){
         return this.;
     }
 
     public synchronized void setInitializing(boolean ini){
         this. = ini;
     }
     
         javax.swing.DefaultComboBoxModel ret =
                 new javax.swing.DefaultComboBoxModel(getSchemaTypes());
         return ret;
     }
 
         javax.swing.DefaultComboBoxModel ret =
                 new javax.swing.DefaultComboBoxModel(this.);
         return ret;
     }
 
     // Getter and Setter for UI clients - start
     public void setSchemaName(String name){
         this..setText(name);
     }
 
     public void setProjectName(String pn){
         this..setText(pn);
     }
 
     public void setProjectDir(File pdir){
         this. = pdir;
     }
     
     public void setLocalSchemaFile(String fileLoc){
         this..setText(fileLoc);
     }
 
     public void setSchemaURL(String url){