Revision c5066c73
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java | ||
---|---|---|
1022 | 1022 |
} |
1023 | 1023 |
|
1024 | 1024 |
Collection<RowWrapperDTO> wrappers = (Collection<RowWrapperDTO>) remotingMonitor.getResult(); |
1025 |
wrappers.forEach(wrapper->{
|
|
1026 |
CharacterMatrix.this.descriptions.add(wrapper);
|
|
1027 |
});
|
|
1025 |
if(wrappers!=null){
|
|
1026 |
wrappers.forEach(wrapper->CharacterMatrix.this.descriptions.add(wrapper));
|
|
1027 |
} |
|
1028 | 1028 |
monitor.done(); |
1029 | 1029 |
}); |
1030 | 1030 |
job.schedule(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java | ||
---|---|---|
250 | 250 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection; |
251 | 251 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement; |
252 | 252 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailSection; |
253 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenHierarchyDetailElement; |
|
254 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenHierarchyDetailSection; |
|
255 | 253 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationElement; |
256 | 254 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection; |
257 | 255 |
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailElement; |
... | ... | |
1774 | 1772 |
return section; |
1775 | 1773 |
} |
1776 | 1774 |
|
1777 |
public SpecimenHierarchyDetailSection createSpecimenHierarchyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){ |
|
1778 |
SpecimenHierarchyDetailSection section = new SpecimenHierarchyDetailSection(this, conversation, parentElement, selectionProvider, style); |
|
1779 |
addAndAdaptSection(parentElement, section); |
|
1780 |
return section; |
|
1781 |
} |
|
1782 |
|
|
1783 | 1775 |
public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){ |
1784 | 1776 |
DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style); |
1785 | 1777 |
addAndAdaptSection(parentElement, section); |
... | ... | |
2318 | 2310 |
return element; |
2319 | 2311 |
} |
2320 | 2312 |
|
2321 |
public SpecimenHierarchyDetailElement createSpecimenHierarchyDetailElement(ICdmFormElement parentElement) { |
|
2322 |
SpecimenHierarchyDetailElement element = new SpecimenHierarchyDetailElement(this, parentElement); |
|
2323 |
addAndAdaptElement(parentElement, element); |
|
2324 |
return element; |
|
2325 |
} |
|
2326 |
|
|
2327 | 2313 |
public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) { |
2328 | 2314 |
DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement); |
2329 | 2315 |
addAndAdaptElement(parentElement, element); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenHierarchyDetailElement.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.ui.section.occurrence; |
|
11 |
|
|
12 |
import java.util.Collection; |
|
13 |
import java.util.Collections; |
|
14 |
import java.util.HashSet; |
|
15 |
import java.util.UUID; |
|
16 |
|
|
17 |
import org.eclipse.jface.viewers.AbstractTreeViewer; |
|
18 |
import org.eclipse.jface.viewers.TreeViewer; |
|
19 |
import org.eclipse.swt.widgets.Tree; |
|
20 |
|
|
21 |
import eu.etaxonomy.cdm.api.service.IOccurrenceService; |
|
22 |
import eu.etaxonomy.cdm.model.occurrence.FieldUnit; |
|
23 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
|
24 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
25 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
|
26 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
|
27 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
28 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
|
29 |
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateContentProvider; |
|
30 |
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author n.hoffmann |
|
34 |
* @created Dec 16, 2010 |
|
35 |
* @version 1.0 |
|
36 |
*/ |
|
37 |
public class SpecimenHierarchyDetailElement extends AbstractCdmDetailElement<SpecimenOrObservationBase<?>> { |
|
38 |
|
|
39 |
/** |
|
40 |
* @param formFactory |
|
41 |
* @param formElement |
|
42 |
*/ |
|
43 |
public SpecimenHierarchyDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) { |
|
44 |
super(formFactory, formElement); |
|
45 |
} |
|
46 |
|
|
47 |
/* |
|
48 |
* (non-Javadoc) |
|
49 |
* |
|
50 |
* @see |
|
51 |
* eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls |
|
52 |
* (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int) |
|
53 |
*/ |
|
54 |
@Override |
|
55 |
protected void createControls(ICdmFormElement formElement, SpecimenOrObservationBase<?> entity, int style) { |
|
56 |
TreeViewer viewer = new TreeViewer(getLayoutComposite()); |
|
57 |
DerivateLabelProvider labelProvider = new DerivateLabelProvider(); |
|
58 |
Tree tree = viewer.getTree(); |
|
59 |
|
|
60 |
labelProvider.setConversation(getConversationHolder()); |
|
61 |
tree.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
62 |
viewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS); |
|
63 |
viewer.setContentProvider(new DerivateContentProvider()); |
|
64 |
viewer.setLabelProvider(labelProvider); |
|
65 |
//get root (field unit) |
|
66 |
Collection<FieldUnit> fieldUnits = CdmStore.getService(IOccurrenceService.class).getFieldUnits(entity.getUuid()); |
|
67 |
Collection<UUID> fieldUnitUuids = new HashSet<UUID>(); |
|
68 |
for (FieldUnit fieldUnit : fieldUnits) { |
|
69 |
fieldUnitUuids.add(fieldUnit.getUuid()); |
|
70 |
} |
|
71 |
viewer.setInput(Collections.singleton(fieldUnitUuids)); |
|
72 |
|
|
73 |
} |
|
74 |
|
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* |
|
78 |
* @see |
|
79 |
* eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java |
|
80 |
* .lang.Object) |
|
81 |
*/ |
|
82 |
@Override |
|
83 |
public void handleEvent(Object eventSource) { |
|
84 |
} |
|
85 |
|
|
86 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenHierarchyDetailSection.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
9 |
|
|
10 |
package eu.etaxonomy.taxeditor.ui.section.occurrence; |
|
11 |
|
|
12 |
import org.eclipse.jface.viewers.ISelectionProvider; |
|
13 |
|
|
14 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
|
15 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
|
16 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
|
17 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
|
18 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
|
19 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
|
20 |
|
|
21 |
/** |
|
22 |
* @author n.hoffmann |
|
23 |
* @created Dec 16, 2010 |
|
24 |
* @version 1.0 |
|
25 |
*/ |
|
26 |
public class SpecimenHierarchyDetailSection extends AbstractCdmDetailSection<SpecimenOrObservationBase<?>> { |
|
27 |
|
|
28 |
private SpecimenHierarchyDetailElement specimenHierarchyDetailElement; |
|
29 |
|
|
30 |
/** |
|
31 |
* @param formFactory |
|
32 |
* @param conversation |
|
33 |
* @param parentElement |
|
34 |
* @param selectionProvider |
|
35 |
* @param style |
|
36 |
*/ |
|
37 |
public SpecimenHierarchyDetailSection(CdmFormFactory formFactory, |
|
38 |
ConversationHolder conversation, ICdmFormElement parentElement, |
|
39 |
ISelectionProvider selectionProvider, int style) { |
|
40 |
super(formFactory, conversation, parentElement, selectionProvider, style); |
|
41 |
} |
|
42 |
|
|
43 |
|
|
44 |
/* (non-Javadoc) |
|
45 |
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading() |
|
46 |
*/ |
|
47 |
@Override |
|
48 |
public String getHeading() { |
|
49 |
return "Specimen Hierarchy"; |
|
50 |
} |
|
51 |
|
|
52 |
/* (non-Javadoc) |
|
53 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int) |
|
54 |
*/ |
|
55 |
@Override |
|
56 |
protected AbstractCdmDetailElement<SpecimenOrObservationBase<?>> createCdmDetailElement(AbstractCdmDetailSection<SpecimenOrObservationBase<?>> parentElement, int style) { |
|
57 |
specimenHierarchyDetailElement = formFactory.createSpecimenHierarchyDetailElement(parentElement); |
|
58 |
return specimenHierarchyDetailElement; |
|
59 |
} |
|
60 |
|
|
61 |
} |
Also available in: Unified diff
remove unused classes