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