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; |
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 |