DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
final ColumnOverrideLabelAccumulator columnLabelAccumulator =new ColumnOverrideLabelAccumulator(bodyDataLayer);
bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator);
+ propertyToLabelMap.put(TAXON_COLUMN, "Taxon");
+ propertyToLabelMap.put(COLLECTOR_COLUMN, "Collector + No");
+ propertyToLabelMap.put(IDENTIFIER_COLUMN, "Identifier");
+ propertyToLabelMap.put(COUNTRY_COLUMN, "Country");
for(int i=0;i<features.size();i++){
Feature feature = features.get(i);
- initLabels(features, columnLabelAccumulator, i, feature);
+ initLabels(columnLabelAccumulator, i, feature);
}
GlazedListsEventLayer<SpecimenDescription> eventLayer = new GlazedListsEventLayer<>(bodyDataLayer, sortedList);
parent.layout();
}
- private void initLabels(List<Feature> features, final ColumnOverrideLabelAccumulator columnLabelAccumulator,
+ private void initLabels(final ColumnOverrideLabelAccumulator columnLabelAccumulator,
int index, Feature feature) {
- propertyToLabelMap.put(TAXON_COLUMN, "Taxon");
- propertyToLabelMap.put(COLLECTOR_COLUMN, "Collector + No");
- propertyToLabelMap.put(IDENTIFIER_COLUMN, "Identifier");
- propertyToLabelMap.put(COUNTRY_COLUMN, "Country");
-
- columnLabelAccumulator.registerColumnOverrides(index+LEADING_COLUMN_COUNT, getProperty(features.get(index)));
+ columnLabelAccumulator.registerColumnOverrides(index+LEADING_COLUMN_COUNT, getProperty(feature));
indexToFeatureMap.put(index+LEADING_COLUMN_COUNT, feature);
String featureLabel = feature.getLabel();