Revision 0f91f78a
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java | ||
---|---|---|
169 | 169 |
DataLayer bodyDataLayer = new DataLayer(bodyDataProvider); |
170 | 170 |
final ColumnOverrideLabelAccumulator columnLabelAccumulator =new ColumnOverrideLabelAccumulator(bodyDataLayer); |
171 | 171 |
bodyDataLayer.setConfigLabelAccumulator(columnLabelAccumulator); |
172 |
propertyToLabelMap.put(TAXON_COLUMN, "Taxon"); |
|
173 |
propertyToLabelMap.put(COLLECTOR_COLUMN, "Collector + No"); |
|
174 |
propertyToLabelMap.put(IDENTIFIER_COLUMN, "Identifier"); |
|
175 |
propertyToLabelMap.put(COUNTRY_COLUMN, "Country"); |
|
172 | 176 |
for(int i=0;i<features.size();i++){ |
173 | 177 |
Feature feature = features.get(i); |
174 |
initLabels(features, columnLabelAccumulator, i, feature);
|
|
178 |
initLabels(columnLabelAccumulator, i, feature); |
|
175 | 179 |
} |
176 | 180 |
GlazedListsEventLayer<SpecimenDescription> eventLayer = new GlazedListsEventLayer<>(bodyDataLayer, sortedList); |
177 | 181 |
|
... | ... | |
285 | 289 |
parent.layout(); |
286 | 290 |
} |
287 | 291 |
|
288 |
private void initLabels(List<Feature> features, final ColumnOverrideLabelAccumulator columnLabelAccumulator,
|
|
292 |
private void initLabels(final ColumnOverrideLabelAccumulator columnLabelAccumulator, |
|
289 | 293 |
int index, Feature feature) { |
290 | 294 |
|
291 |
propertyToLabelMap.put(TAXON_COLUMN, "Taxon"); |
|
292 |
propertyToLabelMap.put(COLLECTOR_COLUMN, "Collector + No"); |
|
293 |
propertyToLabelMap.put(IDENTIFIER_COLUMN, "Identifier"); |
|
294 |
propertyToLabelMap.put(COUNTRY_COLUMN, "Country"); |
|
295 |
|
|
296 |
columnLabelAccumulator.registerColumnOverrides(index+LEADING_COLUMN_COUNT, getProperty(features.get(index))); |
|
295 |
columnLabelAccumulator.registerColumnOverrides(index+LEADING_COLUMN_COUNT, getProperty(feature)); |
|
297 | 296 |
indexToFeatureMap.put(index+LEADING_COLUMN_COUNT, feature); |
298 | 297 |
|
299 | 298 |
String featureLabel = feature.getLabel(); |
Also available in: Unified diff
ref #7095 minor refactoring