9 |
9 |
|
10 |
10 |
package eu.etaxonomy.taxeditor.io.wizard;
|
11 |
11 |
|
|
12 |
import java.awt.Checkbox;
|
12 |
13 |
import java.text.SimpleDateFormat;
|
13 |
14 |
import java.util.Calendar;
|
14 |
15 |
import java.util.Collections;
|
... | ... | |
16 |
17 |
import java.util.List;
|
17 |
18 |
import java.util.UUID;
|
18 |
19 |
|
|
20 |
import org.apache.commons.lang.StringUtils;
|
19 |
21 |
import org.eclipse.jface.wizard.WizardPage;
|
20 |
22 |
import org.eclipse.swt.SWT;
|
21 |
23 |
import org.eclipse.swt.events.SelectionAdapter;
|
... | ... | |
28 |
30 |
import org.eclipse.swt.widgets.Composite;
|
29 |
31 |
import org.eclipse.swt.widgets.Control;
|
30 |
32 |
import org.eclipse.swt.widgets.DirectoryDialog;
|
|
33 |
import org.eclipse.swt.widgets.Event;
|
31 |
34 |
import org.eclipse.swt.widgets.Label;
|
32 |
35 |
import org.eclipse.swt.widgets.Listener;
|
33 |
36 |
import org.eclipse.swt.widgets.Text;
|
... | ... | |
109 |
112 |
private List<Classification> classifications;
|
110 |
113 |
|
111 |
114 |
private Classification selectedClassification;
|
|
115 |
private Label classificationLabel;
|
112 |
116 |
|
113 |
117 |
private ExportConfiguratorBase configurator;
|
|
118 |
private Button checkUseSelectedtaxonNode;
|
114 |
119 |
|
115 |
120 |
/**
|
116 |
121 |
* @param pageName
|
... | ... | |
304 |
309 |
if(csvExport || csvPrintExport || outputModelExport|| csvNameExport){
|
305 |
310 |
// Label comboBoxLabel = new Label(composite, SWT.NONE);
|
306 |
311 |
// comboBoxLabel.setText("Classification");
|
307 |
|
|
308 |
|
createClassificationSelectionCombo(composite);
|
309 |
|
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
|
310 |
|
true, false, 2, 1));
|
|
312 |
|
|
313 |
if (outputModelExport && !((CdmLightExportConfigurator)configurator).getTaxonNodeFilter().getTaxonNodesFilter().isEmpty()){
|
|
314 |
checkUseSelectedtaxonNode= new Button(composite, SWT.CHECK);
|
|
315 |
checkUseSelectedtaxonNode.setText("Use selected Taxon Node (or whole Classification)");
|
|
316 |
checkUseSelectedtaxonNode.addListener(SWT.Selection, new Listener() {
|
|
317 |
@Override
|
|
318 |
public void handleEvent(Event e) {
|
|
319 |
Button b = (Button) e.widget;
|
|
320 |
GridData data = (GridData) classificationSelectionCombo.getLayoutData();
|
|
321 |
data.exclude = b.getSelection();
|
|
322 |
classificationSelectionCombo.setVisible(!data.exclude);
|
|
323 |
classificationLabel.setVisible(!data.exclude);
|
|
324 |
|
|
325 |
}
|
|
326 |
});
|
|
327 |
}
|
|
328 |
|
|
329 |
createClassificationSelectionCombo(composite);
|
|
330 |
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
|
|
331 |
true, false, 2, 1));
|
|
332 |
|
311 |
333 |
}
|
312 |
334 |
|
313 |
335 |
|
... | ... | |
421 |
443 |
private void createClassificationSelectionCombo(Composite parent){
|
422 |
444 |
// classifications = CdmStore.getTaxonTreeService().list(null, null, null, null, null);
|
423 |
445 |
|
424 |
|
// Composite classificationSelection = new Composite(parent, SWT.NULL);
|
425 |
|
// classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
|
|
446 |
Composite classificationSelection = new Composite(parent, SWT.NULL);
|
|
447 |
classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
|
426 |
448 |
|
427 |
|
// GridLayout layout = new GridLayout();
|
428 |
|
// classificationSelection.setLayout(layout);
|
|
449 |
GridLayout layout = new GridLayout();
|
|
450 |
classificationSelection.setLayout(layout);
|
429 |
451 |
|
430 |
|
Label label = new Label(parent, SWT.NULL);
|
|
452 |
classificationLabel = new Label(classificationSelection, SWT.NULL);
|
431 |
453 |
// TODO not working is not really true but leave it here to remind everyone that this is under construction
|
432 |
|
label.setText("Select Classification");
|
|
454 |
classificationLabel.setText("Select Classification");
|
433 |
455 |
|
434 |
|
classificationSelectionCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
|
|
456 |
classificationSelectionCombo = new Combo(classificationSelection, SWT.BORDER | SWT.READ_ONLY);
|
435 |
457 |
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2,1));
|
436 |
458 |
|
437 |
459 |
for(Classification tree : classifications){
|
... | ... | |
469 |
491 |
|
470 |
492 |
return selectedClassification.getUuid();
|
471 |
493 |
}
|
|
494 |
|
|
495 |
public boolean getCheckUseSelectedTaxonNode() {
|
|
496 |
return checkUseSelectedtaxonNode.getSelection();
|
|
497 |
}
|
|
498 |
|
|
499 |
|
472 |
500 |
|
473 |
501 |
|
474 |
502 |
|
adapt export configurator for taxonnode filter (at first only for cdm light)