Revision 566e18a2
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistLabelProvider.java | ||
---|---|---|
122 | 122 |
} |
123 | 123 |
PresenceAbsenceTerm term = distribution.getStatus(); |
124 | 124 |
Representation rep = distribution.getStatus().getPreferredRepresentation(CdmStore.getDefaultLanguage()); |
125 |
String label = rep.getAbbreviatedLabel(); |
|
126 |
if (label == null){ |
|
127 |
label = rep.getLabel(); |
|
128 |
} |
|
125 |
String label = rep.getLabel(); |
|
126 |
|
|
129 | 127 |
if (label == null){ |
130 | 128 |
distribution.getStatus().getTitleCache(); |
131 | 129 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/ChecklistEditorE4.java | ||
---|---|---|
142 | 142 |
private ChecklistEditorFilter filter; |
143 | 143 |
|
144 | 144 |
private Label statusLabel; |
145 |
private Label statusLabelSourceReference; |
|
145 | 146 |
|
146 | 147 |
private ChecklistLabelProvider labelProvider; |
147 | 148 |
|
... | ... | |
252 | 253 |
parent.setLayout(gridLayout); |
253 | 254 |
|
254 | 255 |
searchText = createSearchBar(parent); |
255 |
// createSetDefaultReferenceButton(parent); |
|
256 | 256 |
|
257 |
// getSite().setSelectionProvider(viewer); |
|
258 | 257 |
|
259 | 258 |
} |
260 | 259 |
|
... | ... | |
316 | 315 |
Button button1 = new Button(parent, SWT.PUSH ); |
317 | 316 |
GridData gridData2 = new GridData(); |
318 | 317 |
gridData2.horizontalSpan = 1; |
318 |
gridData2.horizontalAlignment = SWT.RIGHT; |
|
319 | 319 |
button1.setLayoutData(gridData2); |
320 | 320 |
|
321 | 321 |
|
... | ... | |
348 | 348 |
@Override |
349 | 349 |
public void widgetSelected(SelectionEvent event) { |
350 | 350 |
defaultSource = ReferenceSelectionDialog.select(AbstractUtility.getShell(), null); |
351 |
|
|
351 |
statusLabelSourceReference.setText("Default Source Reference: " + defaultSource.getAbbrevTitleCache()); |
|
352 |
button2.setBackground(EditorUtil.getColor(Resources.COLOR_CONTROL_SELECTED)); |
|
352 | 353 |
} |
353 | 354 |
|
354 | 355 |
}); |
... | ... | |
395 | 396 |
@Override |
396 | 397 |
public void widgetSelected(SelectionEvent event) { |
397 | 398 |
defaultSource = ReferenceSelectionDialog.select(AbstractUtility.getShell(), null); |
399 |
statusLabelSourceReference.setText("Default Source Reference: " + defaultSource.getAbbrevTitle() != null? defaultSource.getAbbrevTitle() : defaultSource.getAbbrevTitleCache()); |
|
400 |
|
|
398 | 401 |
} |
399 | 402 |
}); |
400 | 403 |
|
... | ... | |
405 | 408 |
|
406 | 409 |
private void createStatusBar(Composite composite) { |
407 | 410 |
GridData gridData = new GridData(); |
408 |
gridData.horizontalSpan = 3;
|
|
411 |
gridData.horizontalSpan = 1;
|
|
409 | 412 |
gridData.grabExcessHorizontalSpace = true; |
410 | 413 |
gridData.horizontalAlignment = GridData.FILL; |
411 | 414 |
|
412 | 415 |
statusLabel = new Label(composite, SWT.LEFT); |
413 | 416 |
statusLabel.setText(ELEMENT_COUNT + (countNodes != null ? countNodes : UNKNOWN)); |
414 | 417 |
statusLabel.setLayoutData(gridData); |
418 |
|
|
419 |
statusLabelSourceReference = new Label(composite, SWT.RIGHT); |
|
420 |
statusLabelSourceReference.setLayoutData(gridData); |
|
421 |
if (defaultSource != null){ |
|
422 |
statusLabelSourceReference.setText("Default Source Reference: " + defaultSource.getAbbrevTitle() != null? defaultSource.getAbbrevTitle() : defaultSource.getAbbrevTitleCache()); |
|
423 |
|
|
424 |
} |
|
415 | 425 |
} |
416 | 426 |
|
417 | 427 |
private void createTable() { |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditingSupportE4.java | ||
---|---|---|
3 | 3 |
import java.util.ArrayList; |
4 | 4 |
import java.util.Arrays; |
5 | 5 |
import java.util.Collection; |
6 |
import java.util.Collections; |
|
6 | 7 |
import java.util.Comparator; |
7 | 8 |
import java.util.List; |
8 | 9 |
import java.util.Map; |
... | ... | |
104 | 105 |
Collection<DefinedTermBase> input = CdmStore.getTermManager().getPreferredTerms(TermType.PresenceAbsenceTerm); |
105 | 106 |
List<DefinedTermBase> inputList = new ArrayList(input); |
106 | 107 |
Comparator<DefinedTermBase> comp = new OrderedTermComparator<>(); |
107 |
// Collections.sort(inputList, comp); |
|
108 |
Collections.sort(inputList, comp); |
|
109 |
Collections.sort(inputList, Collections.reverseOrder()); |
|
110 |
|
|
108 | 111 |
inputAll.addAll(1,inputList); |
109 | 112 |
|
110 | 113 |
|
... | ... | |
138 | 141 |
|
139 | 142 |
} |
140 | 143 |
|
141 |
//fireStateChanged(distributionForColumn);
|
|
144 |
//fireStateChanged(); |
|
142 | 145 |
return null; |
143 | 146 |
} |
144 | 147 |
return null; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
140 | 140 |
if (preference == null){ |
141 | 141 |
return null; |
142 | 142 |
} else{ |
143 |
// int index = StringUtils.lastIndexOf(preference.getValue(), "."); |
|
144 |
// UUID uuid = UUID.fromString(preference.getValue().substring(index +1, preference.getValue().length())); |
|
145 |
// preferredCode = NomenclaturalCode.getByUuid(uuid); |
|
146 |
|
|
147 | 143 |
getPreferenceStore().setValue(PREFERRED_NOMENCLATURAL_CODE_KEY, |
148 | 144 |
preferenceKey); |
149 | 145 |
getPreferenceStore().setValue(ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY,preference.isAllowOverride()); |
... | ... | |
1639 | 1635 |
if(!prefStore.getBoolean(SHOW_IO_MENU) || !preference.isAllowOverride()){ |
1640 | 1636 |
prefStore.setValue(SHOW_IO_MENU, preference.getValue()); |
1641 | 1637 |
} |
1638 |
}else{ |
|
1639 |
prefStore.setValue(SHOW_IO_MENU, true); |
|
1642 | 1640 |
} |
1643 | 1641 |
|
1644 | 1642 |
preference = getPreferenceFromDB(PreferencePredicate.ShowMediaView); |
... | ... | |
1646 | 1644 |
if(!prefStore.getBoolean(SHOW_MEDIA) || !preference.isAllowOverride()){ |
1647 | 1645 |
prefStore.setValue(SHOW_MEDIA, preference.getValue()); |
1648 | 1646 |
} |
1647 |
}else{ |
|
1648 |
prefStore.setValue(SHOW_MEDIA, true); |
|
1649 | 1649 |
} |
1650 | 1650 |
|
1651 | 1651 |
preference = getPreferenceFromDB(PreferencePredicate.ShowChecklistPerspective); |
Also available in: Unified diff
presenceAbsence terms in distribution editor are sorted, labels instead of abbrevLabels for areas