3 * Copyright (C) 2013 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
.media
;
12 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
14 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
15 import eu
.etaxonomy
.cdm
.model
.occurrence
.MediaSpecimen
;
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 import eu
.etaxonomy
.taxeditor
.view
.derivateSearch
.DerivateLabelProvider
;
27 public class MediaSpecimenGeneralDetailSection
extends AbstractCdmDetailSection
<MediaSpecimen
> {
32 * @param parentElement
33 * @param selectionProvider
36 public MediaSpecimenGeneralDetailSection(CdmFormFactory formFactory
,
37 ConversationHolder conversation
, ICdmFormElement parentElement
,
38 ISelectionProvider selectionProvider
, int style
) {
39 super(formFactory
, conversation
, parentElement
, selectionProvider
, style
);
44 * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
47 public String
getHeading() {
48 return "General Media Specimen";
52 * @see org.eclipse.ui.forms.widgets.ExpandableComposite#setText(java.lang.String)
55 public void setText(String title
) {
57 if(getEntity()!=null && getEntity().getKindOfUnit()!=null){
58 if(getEntity().getKindOfUnit().equals(DerivateLabelProvider
.getArtworkTerm())){
61 else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider
.getLivingPlantPhotoTerm())){
62 text
= "Living Plant Photo";
64 else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider
.getSpecimenScanTerm())){
65 text
= "Specimen Scan";
67 else if(getEntity().getKindOfUnit().equals(DerivateLabelProvider
.getDetailImageTerm())){
68 text
= "Detail Image";
80 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
83 protected AbstractCdmDetailElement
<MediaSpecimen
> createCdmDetailElement(AbstractCdmDetailSection
<MediaSpecimen
> parentElement
, int style
) {
84 return formFactory
.createMediaSpecimenGeneralDetailElement(parentElement
);