Ignore:
Timestamp:
17/08/10 15:17:39 (21 months ago)
Author:
Stephen Rankin
Message:

Single file load working again. Added shortcuts and also added a cancel button on bulk load. refs #236.

File:
1 edited

Legend:

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

    r1504 r1505  
    99 * Created on 16-Jun-2010, 11:56:31 
    1010 */ 
    11  
    1211package org.nexusformat.nxvalidate; 
    1312 
     
    1615/** 
    1716 * 
    18  * @author ser65 
     17 * @author Stephen Rankin 
    1918 */ 
    2019public class NXLoadFilesDialog extends javax.swing.JDialog { 
     
    2322    private File nxdl = null; 
    2423    private boolean OKButtonUsed = false; 
     24 
    2525    /** Creates new form NXLoadFilesDialog */ 
    2626    public NXLoadFilesDialog(java.awt.Frame parent, boolean modal) { 
     
    150150    private void openButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButton1ActionPerformed 
    151151 
    152         if(evt.getSource() == openButton1){ 
     152        if (evt.getSource() == openButton1) { 
    153153 
    154154            int returnVal = jFileChooser1.showOpenDialog(this); 
     
    167167    private void openButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButton2ActionPerformed 
    168168 
    169         if(evt.getSource() == openButton2){ 
     169        if (evt.getSource() == openButton2) { 
    170170 
    171171            int returnVal = jFileChooser1.showOpenDialog(this); 
     
    183183 
    184184    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed 
    185         if(evt.getSource() == cancelButton){ 
     185        if (evt.getSource() == cancelButton) { 
    186186            OKButtonUsed = false; 
    187187            this.setVisible(false); 
     
    190190 
    191191    private void OKButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OKButtonActionPerformed 
    192  
    193         if(evt.getSource() == OKButton){ 
     192        if (evt.getSource() == OKButton) { 
    194193            OKButtonUsed = true; 
    195194            this.setVisible(false); 
     
    197196    }//GEN-LAST:event_OKButtonActionPerformed 
    198197 
    199     public File getNXSFile(){ 
     198    public File getNXSFile() { 
    200199        return nxs; 
    201200    } 
    202     public File getNXDLFile(){ 
     201 
     202    public File getNXDLFile() { 
    203203        return nxdl; 
    204204    } 
    205205 
    206     public boolean OKButtonUsed(){ 
     206    public boolean OKButtonUsed() { 
    207207        return OKButtonUsed; 
    208208    } 
    209209 
    210210    /** 
    211     * @param args the command line arguments 
    212     */ 
     211     * @param args the command line arguments 
     212     */ 
    213213    public static void main(String args[]) { 
    214214        java.awt.EventQueue.invokeLater(new Runnable() { 
     215 
    215216            public void run() { 
    216217                NXLoadFilesDialog dialog = new NXLoadFilesDialog(new javax.swing.JFrame(), true); 
    217218                dialog.addWindowListener(new java.awt.event.WindowAdapter() { 
     219 
    218220                    public void windowClosing(java.awt.event.WindowEvent e) { 
    219221                        System.exit(0); 
     
    224226        }); 
    225227    } 
    226  
    227228    // Variables declaration - do not modify//GEN-BEGIN:variables 
    228229    private javax.swing.JButton OKButton; 
     
    237238    private javax.swing.JButton openButton2; 
    238239    // End of variables declaration//GEN-END:variables 
    239  
    240240} 
Note: See TracChangeset for help on using the changeset viewer.