Changeset 1520 for trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXLoadFilesDialog.java
- Timestamp:
- 02/09/10 18:26:36 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXLoadFilesDialog.java
r1507 r1520 28 28 29 29 import java.io.File; 30 import java.util.ResourceBundle; 30 31 31 32 /** … … 38 39 private File nxdl = null; 39 40 private boolean OKButtonUsed = false; 40 41 private CheckNexusFileType check = null; 42 private ResourceBundle bundle = null; 41 43 /** Creates new form NXLoadFilesDialog */ 42 44 public NXLoadFilesDialog(java.awt.Frame parent, boolean modal) { 43 45 super(parent, modal); 44 46 initComponents(); 47 check = new CheckNexusFileType(); 48 bundle = ResourceBundle.getBundle( 49 "org/nexusformat/nxvalidate/resources/nxvalidate"); 45 50 } 46 51 … … 55 60 56 61 jFileChooser1 = new javax.swing.JFileChooser(); 62 messageOptionPane = new javax.swing.JOptionPane(); 57 63 jPanel1 = new javax.swing.JPanel(); 58 64 nxsLabel = new javax.swing.JLabel(); … … 172 178 if (returnVal == jFileChooser1.APPROVE_OPTION) { 173 179 nxs = jFileChooser1.getSelectedFile(); 174 nxsTextField.setText(nxs.getAbsolutePath()); 175 nxsTextField.setToolTipText(nxs.getAbsolutePath()); 180 181 if(check.checkNexusFile(nxs)){ 182 nxsTextField.setText(nxs.getAbsolutePath()); 183 nxsTextField.setToolTipText(nxs.getAbsolutePath()); 184 } else{ 185 nxs = null; 186 messageOptionPane.showMessageDialog(this, 187 bundle.getString("notNXDLFileMessage")); 188 } 189 190 176 191 } else { 177 192 nxs = null; … … 189 204 if (returnVal == jFileChooser1.APPROVE_OPTION) { 190 205 nxdl = jFileChooser1.getSelectedFile(); 191 nxdcTextField.setText(nxdl.getAbsolutePath()); 192 nxdcTextField.setToolTipText(nxdl.getAbsolutePath()); 206 207 if(check.checkNXDLFile(nxdl)){ 208 nxdcTextField.setText(nxdl.getAbsolutePath()); 209 nxdcTextField.setToolTipText(nxdl.getAbsolutePath()); 210 } else{ 211 nxdl = null; 212 messageOptionPane.showMessageDialog(this, 213 bundle.getString("notNXDLFileMessage")); 214 } 215 216 193 217 } else { 194 218 nxdl = null; … … 247 271 private javax.swing.JFileChooser jFileChooser1; 248 272 private javax.swing.JPanel jPanel1; 273 private javax.swing.JOptionPane messageOptionPane; 249 274 private javax.swing.JTextField nxdcTextField; 250 275 private javax.swing.JLabel nxdlLabel;
Note: See TracChangeset
for help on using the changeset viewer.
