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
|
package eu.etaxonomy.taxeditor.ui.section.occurrence;
|
10
|
|
11
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
12
|
|
13
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
14
|
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
|
15
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
16
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
17
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
18
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
|
19
|
|
20
|
/**
|
21
|
* @author n.hoffmann
|
22
|
* @created May 11, 2011
|
23
|
*/
|
24
|
public class DeterminationDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection {
|
25
|
|
26
|
public DeterminationDetailSection(CdmFormFactory formFactory,
|
27
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
28
|
ISelectionProvider selectionProvider, int style) {
|
29
|
super(formFactory, conversation, parentElement, selectionProvider, style);
|
30
|
}
|
31
|
|
32
|
@Override
|
33
|
public String getHeading() {
|
34
|
String sectionTitle = "Determinations";
|
35
|
if(getEntity()!=null && getEntity().getDeterminations().size()>0){
|
36
|
return sectionTitle+" +";
|
37
|
}
|
38
|
return sectionTitle;
|
39
|
}
|
40
|
|
41
|
@Override
|
42
|
protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
|
43
|
return formFactory.createDeterminationDetailElement(parentElement);
|
44
|
}
|
45
|
}
|