Ignore:
Timestamp:
13/08/10 16:34:17 (22 months ago)
Author:
Stephen Rankin
Message:

Bulk Load working but not really tested. Fixed various bugs fixed, but single file validation is not working now! Close all files function added. Check for NEXUS/HDF files added. Added threads for file loading actions. Some refactoring of code. refs #236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXLoadFilesDialog.java

    r1498 r1504  
    2121 
    2222    private File nxs = null; 
    23     private File nxdc = null; 
     23    private File nxdl = null; 
    2424    private boolean OKButtonUsed = false; 
    2525    /** Creates new form NXLoadFilesDialog */ 
     
    4343        nxsTextField = new javax.swing.JTextField(); 
    4444        openButton1 = new javax.swing.JButton(); 
    45         nxdcLabel = new javax.swing.JLabel(); 
     45        nxdlLabel = new javax.swing.JLabel(); 
    4646        nxdcTextField = new javax.swing.JTextField(); 
    4747        openButton2 = new javax.swing.JButton(); 
     
    6666        }); 
    6767 
    68         nxdcLabel.setText("Load NXDC:"); 
     68        nxdlLabel.setText("Load NXDL:"); 
    6969 
    7070        nxdcTextField.setEditable(false); 
     
    101101                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    102102                            .addComponent(nxsLabel) 
    103                             .addComponent(nxdcLabel)) 
     103                            .addComponent(nxdlLabel)) 
    104104                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    105105                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
     
    109109                .addGap(15, 15, 15) 
    110110                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    111                     .addGroup(jPanel1Layout.createSequentialGroup() 
    112                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    113                         .addComponent(openButton1) 
    114                         .addContainerGap()) 
    115                     .addGroup(jPanel1Layout.createSequentialGroup() 
    116                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    117                         .addComponent(openButton2) 
    118                         .addContainerGap()) 
    119                     .addGroup(jPanel1Layout.createSequentialGroup() 
    120                         .addComponent(OKButton) 
    121                         .addContainerGap()))) 
     111                    .addComponent(openButton1) 
     112                    .addComponent(openButton2) 
     113                    .addComponent(OKButton)) 
     114                .addContainerGap()) 
    122115        ); 
    123116        jPanel1Layout.setVerticalGroup( 
     
    131124                .addGap(28, 28, 28) 
    132125                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    133                     .addComponent(nxdcLabel) 
     126                    .addComponent(nxdlLabel) 
    134127                    .addComponent(nxdcTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    135128                    .addComponent(openButton2)) 
     
    179172 
    180173            if (returnVal == jFileChooser1.APPROVE_OPTION) { 
    181                 nxdc = jFileChooser1.getSelectedFile(); 
    182                 nxdcTextField.setText(nxdc.getAbsolutePath()); 
    183                 nxdcTextField.setToolTipText(nxdc.getAbsolutePath()); 
     174                nxdl = jFileChooser1.getSelectedFile(); 
     175                nxdcTextField.setText(nxdl.getAbsolutePath()); 
     176                nxdcTextField.setToolTipText(nxdl.getAbsolutePath()); 
    184177            } else { 
    185                 nxdc = null; 
     178                nxdl = null; 
    186179            } 
    187180 
     
    207200        return nxs; 
    208201    } 
    209     public File getNXDCFile(){ 
    210         return nxdc; 
     202    public File getNXDLFile(){ 
     203        return nxdl; 
    211204    } 
    212205 
     
    237230    private javax.swing.JFileChooser jFileChooser1; 
    238231    private javax.swing.JPanel jPanel1; 
    239     private javax.swing.JLabel nxdcLabel; 
    240232    private javax.swing.JTextField nxdcTextField; 
     233    private javax.swing.JLabel nxdlLabel; 
    241234    private javax.swing.JLabel nxsLabel; 
    242235    private javax.swing.JTextField nxsTextField; 
Note: See TracChangeset for help on using the changeset viewer.