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

Diff of /jsampler/trunk/src/org/jsampler/view/std/JSAddDbInstrumentsFromDirDlg.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 197  public class JSAddDbInstrumentsFromDirDl Line 198  public class JSAddDbInstrumentsFromDirDl
198                  });                  });
199          }          }
200                    
201            protected JSPrefs
202            preferences() { return CC.getViewConfig().preferences(); }
203            
204          private void          private void
205          onBrowse() {          onBrowse() {
206                  JFileChooser fc = new JFileChooser();                  String path = preferences().getStringProperty("lastInstrumentLocation");
207                    JFileChooser fc = new JFileChooser(path);
208                  fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);                  fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
209                  int result = fc.showOpenDialog(this);                  int result = fc.showOpenDialog(this);
210                  if(result != JFileChooser.APPROVE_OPTION) return;                  if(result != JFileChooser.APPROVE_OPTION) return;
211                                    
212                  tfSource.setText(fc.getSelectedFile().getPath());                  tfSource.setText(fc.getSelectedFile().getPath());
213                    path = fc.getCurrentDirectory().getAbsolutePath();
214                    preferences().setStringProperty("lastInstrumentLocation", path);
215          }          }
216                    
217          private void          private void

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

  ViewVC Help
Powered by ViewVC