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

Diff of /jsampler/trunk/src/org/jsampler/view/std/JSAddOrEditInstrumentDlg.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 45  import net.sf.juife.OkCancelDialog; Line 45  import net.sf.juife.OkCancelDialog;
45    
46  import org.jsampler.CC;  import org.jsampler.CC;
47  import org.jsampler.Instrument;  import org.jsampler.Instrument;
48    import org.jsampler.JSPrefs;
49    
50  import static org.jsampler.view.std.StdI18n.i18n;  import static org.jsampler.view.std.StdI18n.i18n;
51    
# Line 164  public class JSAddOrEditInstrumentDlg ex Line 165  public class JSAddOrEditInstrumentDlg ex
165                  updateState();                  updateState();
166          }          }
167                    
168            protected JSPrefs
169            preferences() { return CC.getViewConfig().preferences(); }
170            
171          private void          private void
172          updateInfo() {          updateInfo() {
173                  tfName.setText(getInstrument().getName());                  tfName.setText(getInstrument().getName());
# Line 227  public class JSAddOrEditInstrumentDlg ex Line 231  public class JSAddOrEditInstrumentDlg ex
231                  // ActionListener                  // ActionListener
232                  public void                  public void
233                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
234                          JFileChooser fc = new JFileChooser();                          String path = preferences().getStringProperty("lastInstrumentLocation");
235                            JFileChooser fc = new JFileChooser(path);
236                          int result = fc.showOpenDialog(JSAddOrEditInstrumentDlg.this);                          int result = fc.showOpenDialog(JSAddOrEditInstrumentDlg.this);
237                          if(result != JFileChooser.APPROVE_OPTION) return;                          if(result != JFileChooser.APPROVE_OPTION) return;
238                                    
239                          tfPath.setText(fc.getSelectedFile().getAbsolutePath());                          tfPath.setText(fc.getSelectedFile().getAbsolutePath());
240                            path = fc.getCurrentDirectory().getAbsolutePath();
241                            preferences().setStringProperty("lastInstrumentLocation", path);
242                  }                  }
243          }          }
244  }  }

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

  ViewVC Help
Powered by ViewVC