updateLowerRankCombo();
comboLowerRank.addListener(SWT.Selection, this);
+ //aggregation mode viewer
Label aggregationModeLabel = new Label(control, SWT.NULL);
aggregationModeLabel.setText(Messages.DistributionAggregationWizardPage_AGGREGATION_MODE);
aggregationModeLabel.setToolTipText(Messages.DistributionAggregationWizardPage_TOOLTIP_AGGR_MODE);
}
return null;
}
-
});
List<AggregationMode> aggregationModeList = AggregationMode.list(AggregationType.StructuredDescription);
aggregationModeViewer.setInput(aggregationModeList);
aggregationModeViewer.setCheckedElements(configurator.getAggregationModes().toArray());
-
aggregationModeViewer.addCheckStateListener(new ICheckStateListener(){
@Override
public void checkStateChanged( CheckStateChangedEvent event){
comboSourceModeChildParent.setEnabled(toParentChecked);
comboSourceModeWithinTaxon.setEnabled(withinChecked);
-// AggregationSourceMode areaMode = (AggregationSourceMode)comboSourceModeSubAreaSuperArea.getData(comboSourceModeSubAreaSuperArea.getText());
- AggregationSourceMode taxonMode = (AggregationSourceMode)comboSourceModeChildParent.getData(comboSourceModeChildParent.getText());
-// getSourceTypeViewer().getTable().setEnabled(((areachecked && (areaMode.equals(AggregationSourceMode.ALL) || areaMode.equals(AggregationSourceMode.ALL_SAMEVALUE) ) )|| toParentChecked && (taxonMode.equals(AggregationSourceMode.ALL) || taxonMode.equals(AggregationSourceMode.ALL_SAMEVALUE) )) );
getWizard().getContainer().updateButtons();
- }
+ }
});
+ //source mode within taxon
Label sourceModeLabelWithin = new Label(control, SWT.NULL);
-
sourceModeLabelWithin.setText(Messages.DistributionAggregationWizardPage_SOURCEMODE_WITHIN_TAXON);
sourceModeLabelWithin.setToolTipText(Messages.DistributionAggregationWizardPage_TOOLTIP_SOURCEMODE_WITHIN_TAXON);
comboSourceModeWithinTaxon = new Combo(control, SWT.BORDER| SWT.READ_ONLY);
comboSourceModeWithinTaxon.setData(mode.getLabel(), mode);
}
- comboSourceModeWithinTaxon.setEnabled(false);
+ comboSourceModeWithinTaxon.setEnabled(configurator.getAggregationModes().contains(AggregationMode.WithinTaxon));
comboSourceModeWithinTaxon.select(0);
comboSourceModeWithinTaxon.addListener(SWT.Selection, this);
- Label sourceModeLabel = new Label(control, SWT.NULL);
- sourceModeLabel.setText(Messages.DistributionAggregationWizardPage_SOURCEMODE_CHILD_PARENT);
- sourceModeLabel.setToolTipText(Messages.DistributionAggregationWizardPage_TOOLTIP_SOURCEMODE_CHILD_PARENT);
+ //source mode child parent
+ Label sourceModeChildParentLabel = new Label(control, SWT.NULL);
+ sourceModeChildParentLabel.setText(Messages.DistributionAggregationWizardPage_SOURCEMODE_CHILD_PARENT);
+ sourceModeChildParentLabel.setToolTipText(Messages.DistributionAggregationWizardPage_TOOLTIP_SOURCEMODE_CHILD_PARENT);
comboSourceModeChildParent = new Combo(control, SWT.BORDER| SWT.READ_ONLY);
comboSourceModeChildParent.setText(Messages.DistributionAggregationWizardPage_AGGREGATION_MODE);
comboSourceModeChildParent.setData(mode.getLabel(), mode);
}
- comboSourceModeChildParent.setEnabled(false);
+ comboSourceModeChildParent.setEnabled(configurator.getAggregationModes().contains(AggregationMode.ToParent));
comboSourceModeChildParent.select(0);
comboSourceModeChildParent.addListener(SWT.Selection, this);
GridLayoutFactory.fillDefaults();
+
+ //source type
+ //TODO: distinguis within taxon and parent child source types
Label sourceTypeLabel = new Label(control, SWT.NULL);
sourceTypeLabel.setText(Messages.DistributionAggregationWizardPage_SOURCE_TYPE);
sourceTypeLabel.setToolTipText(Messages.DistributionAggregationWizardPage_TOOLTIP_SOURCE_TYPE);