/[svn]/jsampler/trunk/src/org/jsampler/view/std/JSAddDbInstrumentsFromFileDlg.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/std/JSAddDbInstrumentsFromFileDlg.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1303 by iliev, Fri Aug 10 20:24:23 2007 UTC revision 1304 by iliev, Sun Aug 26 14:19:36 2007 UTC
# Line 54  import net.sf.juife.event.TaskEvent; Line 54  import net.sf.juife.event.TaskEvent;
54  import net.sf.juife.event.TaskListener;  import net.sf.juife.event.TaskListener;
55    
56  import org.jsampler.CC;  import org.jsampler.CC;
57    import org.jsampler.JSPrefs;
58  import org.jsampler.task.InstrumentsDb;  import org.jsampler.task.InstrumentsDb;
59    
60  import static org.jsampler.view.std.StdI18n.i18n;  import static org.jsampler.view.std.StdI18n.i18n;
# Line 218  public class JSAddDbInstrumentsFromFileD Line 219  public class JSAddDbInstrumentsFromFileD
219                  });                  });
220          }          }
221                    
222            protected JSPrefs
223            preferences() { return CC.getViewConfig().preferences(); }
224            
225          private void          private void
226          onBrowse() {          onBrowse() {
227                  JFileChooser fc = new JFileChooser();                  String path = preferences().getStringProperty("lastInstrumentLocation");
228                    JFileChooser fc = new JFileChooser(path);
229                  fc.setFileSelectionMode(JFileChooser.FILES_ONLY);                  fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
230                  int result = fc.showOpenDialog(this);                  int result = fc.showOpenDialog(this);
231                  if(result != JFileChooser.APPROVE_OPTION) return;                  if(result != JFileChooser.APPROVE_OPTION) return;
232                                    
233                  tfSource.setText(fc.getSelectedFile().getPath());                  tfSource.setText(fc.getSelectedFile().getPath());
234                    path = fc.getCurrentDirectory().getAbsolutePath();
235                    preferences().setStringProperty("lastInstrumentLocation", path);
236          }          }
237                    
238          private void          private void

Legend:
Removed from v.1303  
changed lines
  Added in v.1304

  ViewVC Help
Powered by ViewVC