Merge branch 'develop' into LibrAlign
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / occurrence / DerivedUnitGeneralDetailSection.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.api.facade.DerivedUnitFacade;
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 DerivedUnitGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
27
28 //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
29 private DerivedUnitGeneralDetailElement derivedUnitGeneralDetailElement;
30
31 /**
32 * @param formFactory
33 * @param conversation
34 * @param parentElement
35 * @param selectionProvider
36 * @param style
37 */
38 public DerivedUnitGeneralDetailSection(CdmFormFactory formFactory,
39 ConversationHolder conversation, ICdmFormElement parentElement,
40 ISelectionProvider selectionProvider, int style) {
41 super(formFactory, conversation, parentElement, selectionProvider, style);
42 }
43
44
45 /* (non-Javadoc)
46 * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
47 */
48 @Override
49 public String getHeading() {
50 return "General";
51 }
52
53 /* (non-Javadoc)
54 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
55 */
56 @Override
57 protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
58 derivedUnitGeneralDetailElement = formFactory.createDerivedUnitGeneralDetailElement(parentElement);
59 return derivedUnitGeneralDetailElement;
60 }
61
62 public void setShowOnlyDerivedUnitData(boolean showOnlyDerivedUnitData){
63 derivedUnitGeneralDetailElement.setShowOnlyDerivedUnitData(showOnlyDerivedUnitData);
64 }
65
66 }