70 |
new JCheckBox(i18n.getLabel("JSAddDbInstrumentsFromDirDlg.checkScanSubdirs")); |
new JCheckBox(i18n.getLabel("JSAddDbInstrumentsFromDirDlg.checkScanSubdirs")); |
71 |
private final JCheckBox checkFlat = |
private final JCheckBox checkFlat = |
72 |
new JCheckBox(i18n.getLabel("JSAddDbInstrumentsFromDirDlg.checkFlat")); |
new JCheckBox(i18n.getLabel("JSAddDbInstrumentsFromDirDlg.checkFlat")); |
73 |
|
private final JCheckBox checkInstrDirs = |
74 |
|
new JCheckBox(i18n.getLabel("JSAddDbInstrumentsFromDirDlg.checkInstrDirs")); |
75 |
|
|
76 |
private final JComboBox cbDest = StdUtils.createPathComboBox(); |
private final JComboBox cbDest = StdUtils.createPathComboBox(); |
77 |
private JButton btnBrowseDb; |
private JButton btnBrowseDb; |
131 |
p2.setAlignmentX(LEFT_ALIGNMENT); |
p2.setAlignmentX(LEFT_ALIGNMENT); |
132 |
|
|
133 |
p.add(p2); |
p.add(p2); |
134 |
|
|
135 |
|
p2 = new JPanel(); |
136 |
|
p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS)); |
137 |
|
p2.add(checkInstrDirs); |
138 |
|
p2.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3)); |
139 |
|
p2.setAlignmentX(LEFT_ALIGNMENT); |
140 |
|
p.add(p2); |
141 |
|
|
142 |
String s = i18n.getLabel("JSAddDbInstrumentsFromDirDlg.source"); |
String s = i18n.getLabel("JSAddDbInstrumentsFromDirDlg.source"); |
143 |
p.setBorder(BorderFactory.createTitledBorder(s)); |
p.setBorder(BorderFactory.createTitledBorder(s)); |
267 |
String fsDir = cbSource.getSelectedItem().toString(); |
String fsDir = cbSource.getSelectedItem().toString(); |
268 |
boolean recursive = checkScanSubdirs.isSelected(); |
boolean recursive = checkScanSubdirs.isSelected(); |
269 |
boolean flat = !checkFlat.isSelected(); |
boolean flat = !checkFlat.isSelected(); |
270 |
if(recursive) runTask(new InstrumentsDb.AddInstruments(dbDir, fsDir, flat)); |
boolean insDir = checkInstrDirs.isSelected(); |
271 |
else runTask(new InstrumentsDb.AddInstrumentsNonrecursive(dbDir, fsDir)); |
if(recursive) runTask(new InstrumentsDb.AddInstruments(dbDir, fsDir, flat, insDir)); |
272 |
|
else runTask(new InstrumentsDb.AddInstrumentsNonrecursive(dbDir, fsDir, insDir)); |
273 |
|
|
274 |
StdUtils.updateRecentElements("recentDirectories", fsDir); |
StdUtils.updateRecentElements("recentDirectories", fsDir); |
275 |
StdUtils.updateRecentElements("recentDbDirectories", dbDir); |
StdUtils.updateRecentElements("recentDbDirectories", dbDir); |