Revision da38b436
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java | ||
---|---|---|
120 | 120 |
private ExportConfiguratorBase configurator; |
121 | 121 |
private Button checkUseSelectedtaxonNode; |
122 | 122 |
|
123 |
private Button checkUseSelectedClassification; |
|
124 |
|
|
123 | 125 |
/** |
124 | 126 |
* @param pageName |
125 | 127 |
* @param selection |
... | ... | |
317 | 319 |
// comboBoxLabel.setText("Classification"); |
318 | 320 |
|
319 | 321 |
if ((outputModelExport || dwcaExport)&& !configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()){ |
320 |
checkUseSelectedtaxonNode= new Button(composite, SWT.CHECK); |
|
321 |
String taxonStr = ""; |
|
322 |
TaxonNode node = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(configurator.getTaxonNodeFilter().getSubtreeFilter().get(0).getUuid()); |
|
323 |
if (node.hasTaxon()){ |
|
324 |
taxonStr = node.getTaxon().getName().getTitleCache(); |
|
325 |
} |
|
326 |
checkUseSelectedtaxonNode.setText("Export selected subtree ("+ taxonStr+")"); |
|
327 |
checkUseSelectedtaxonNode.addListener(SWT.Selection, new Listener() { |
|
322 |
Composite selectNodeOrClassification = new Composite(composite, SWT.NONE); |
|
323 |
GridLayout grid = new GridLayout(); |
|
324 |
grid.numColumns = 1; |
|
325 |
selectNodeOrClassification.setLayout(grid); |
|
326 |
checkUseSelectedtaxonNode= new Button(selectNodeOrClassification, SWT.RADIO); |
|
327 |
String taxonStr = ""; |
|
328 |
TaxonNode node = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(configurator.getTaxonNodeFilter().getSubtreeFilter().get(0).getUuid()); |
|
329 |
if (node.hasTaxon()){ |
|
330 |
taxonStr = node.getTaxon().getName().getTitleCache(); |
|
331 |
} |
|
332 |
checkUseSelectedtaxonNode.setText("Export selected subtree ("+ taxonStr+")"); |
|
333 |
checkUseSelectedtaxonNode.addListener(SWT.Selection, new Listener() { |
|
334 |
@Override |
|
335 |
public void handleEvent(Event e) { |
|
336 |
Button b = (Button) e.widget; |
|
337 |
GridData data = (GridData) classificationSelectionCombo.getLayoutData(); |
|
338 |
data.exclude = b.getSelection(); |
|
339 |
classificationSelectionCombo.setVisible(!data.exclude); |
|
340 |
classificationLabel.setVisible(!data.exclude); |
|
341 |
} |
|
342 |
}); |
|
343 |
checkUseSelectedClassification= new Button(selectNodeOrClassification, SWT.RADIO); |
|
344 |
checkUseSelectedClassification.setText("Export selected classification"); |
|
345 |
checkUseSelectedClassification.addListener(SWT.Selection, new Listener() { |
|
328 | 346 |
@Override |
329 |
public void handleEvent(Event e) { |
|
330 |
Button b = (Button) e.widget;
|
|
347 |
public void handleEvent(Event e) {
|
|
348 |
Button b = (Button) e.widget;
|
|
331 | 349 |
GridData data = (GridData) classificationSelectionCombo.getLayoutData(); |
332 | 350 |
data.exclude = b.getSelection(); |
333 |
classificationSelectionCombo.setVisible(!data.exclude); |
|
334 |
classificationLabel.setVisible(!data.exclude); |
|
335 |
|
|
336 |
} |
|
337 |
}); |
|
351 |
classificationSelectionCombo.setVisible(data.exclude); |
|
352 |
classificationLabel.setVisible(data.exclude); |
|
353 |
} |
|
354 |
}); |
|
338 | 355 |
} |
339 |
|
|
340 | 356 |
createClassificationSelectionCombo(composite); |
341 | 357 |
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, |
342 | 358 |
true, false, 2, 1)); |
Also available in: Unified diff
add radio buttons for selection of export classification or subtree