private List<Classification> classifications;
private Classification selectedClassification;
+
private Label classificationLabel;
private ExportConfiguratorBase configurator;
if(csvExport || csvPrintExport || outputModelExport|| csvNameExport || dwcaExport){
+
+// Label comboBoxLabel = new Label(composite, SWT.NONE);
+// comboBoxLabel.setText("Classification");
+ Composite selectNodeOrClassification = new Composite(composite, SWT.NONE);
+ GridLayout grid = new GridLayout();
+ grid.numColumns = 1;
+ selectNodeOrClassification.setLayout(grid);
if ((outputModelExport || dwcaExport)&& !configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()){
- Composite selectNodeOrClassification = new Composite(composite, SWT.NONE);
- GridLayout grid = new GridLayout();
- grid.numColumns = 1;
- selectNodeOrClassification.setLayout(grid);
checkUseSelectedtaxonNode= new Button(selectNodeOrClassification, SWT.RADIO);
String taxonStr = "";
node = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(configurator.getTaxonNodeFilter().getSubtreeFilter().get(0).getUuid());
GridData data = (GridData) classificationSelectionCombo.getLayoutData();
data.exclude = b.getSelection();
classificationSelectionCombo.setVisible(!data.exclude);
- classificationLabel.setVisible(!data.exclude);
+
}
});
checkUseSelectedtaxonNode.setSelection(true);
GridData data = (GridData) classificationSelectionCombo.getLayoutData();
data.exclude = b.getSelection();
classificationSelectionCombo.setVisible(data.exclude);
- classificationLabel.setVisible(data.exclude);
+
}
});
}
if (node!= null){
selectedClassification = node.getClassification();
}
- createClassificationSelectionCombo(composite);
+ createClassificationSelectionCombo(selectNodeOrClassification);
+
+
- classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
- true, false, 2, 1));
if (checkUseSelectedtaxonNode != null){
if (checkUseSelectedtaxonNode.getSelection()){
classificationSelectionCombo.setVisible(false);
- classificationLabel.setVisible(false);
+
}
+ }else{
+ classificationSelectionCombo.setVisible(true);
+ classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
+ true, false, 2, 1));
}
}
private void createClassificationSelectionCombo(Composite parent){
- Composite classificationSelection = new Composite(parent, SWT.NULL);
- classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-
- GridLayout layout = new GridLayout();
- classificationSelection.setLayout(layout);
-
- classificationLabel = new Label(classificationSelection, SWT.NULL);
- // TODO not working is not really true but leave it here to remind everyone that this is under construction
- classificationLabel.setText("Export complete classification");
+// Composite classificationSelection = new Composite(parent, SWT.NULL);
+// classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
- classificationSelectionCombo = new Combo(classificationSelection, SWT.BORDER | SWT.READ_ONLY);
- classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2,1));
+// GridLayout layout = new GridLayout();
+// classificationSelection.setLayout(layout);
+ GridData gridData = new GridData();
+ gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
+ gridData.horizontalIndent = 5;
+// classificationSelection.setLayoutData(gridData);
+ classificationSelectionCombo = new Combo(parent, SWT.BORDER| SWT.READ_ONLY);
+ classificationSelectionCombo.setLayoutData(gridData);
for(Classification tree : classifications){
classificationSelectionCombo.add(tree.getName().getText(), classifications.indexOf(tree));