3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
;
12 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
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
;
26 public class OriginalLabelDataSection
extends AbstractCdmDetailSection
<DerivedUnitFacade
> implements IDerivedUnitFacadeDetailSection
{
31 * @param parentElement
32 * @param selectionProvider
35 public OriginalLabelDataSection(CdmFormFactory formFactory
,
36 ConversationHolder conversation
, ICdmFormElement parentElement
,
37 ISelectionProvider selectionProvider
, int style
) {
38 super(formFactory
, conversation
, parentElement
, selectionProvider
, style
);
42 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
45 public String
getHeading() {
46 return "Original Label Data: ";
50 * @see org.eclipse.ui.forms.widgets.ExpandableComposite#setText(java.lang.String)
53 public void setText(String title
) {
54 String text
= getHeading();
55 if(getEntity()!=null){// && getEntity().getOriginalLabelData!=null){
56 String titleCache
= getEntity().getTitleCache();
57 text
+= titleCache
.substring(0, Math
.min(10, titleCache
.length()));
69 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
72 protected AbstractCdmDetailElement
<DerivedUnitFacade
> createCdmDetailElement(AbstractCdmDetailSection
<DerivedUnitFacade
> parentElement
, int style
) {
73 return formFactory
.createOriginalLabelDataController(parentElement
);