2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
;
12 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
14 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.LayoutConstants
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
26 public class SampleDesignationDetailElement
extends AbstractCdmDetailElement
<IdentifiableEntity
<?
>> {
28 private CurrentSampleDesignationDetailSection sectionCurrentSampleDesignation
;
30 private SampleDesignationHistoryDetailSection sectionSampleDesignationHistory
;
36 public SampleDesignationDetailElement(CdmFormFactory formFactory
,
37 ICdmFormElement formElement
) {
38 super(formFactory
, formElement
);
42 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)
45 protected void createControls(ICdmFormElement formElement
,
46 IdentifiableEntity
<?
> entity
, int style
) {
48 sectionCurrentSampleDesignation
= formFactory
.createCurrentSampleDesignationDetailSection(getConversationHolder(), formElement
, ExpandableComposite
.EXPANDED
);
49 sectionCurrentSampleDesignation
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
50 sectionCurrentSampleDesignation
.setEntity(entity
);
52 sectionSampleDesignationHistory
= formFactory
.createSampleDesignationHistoryDetailSection(getConversationHolder(), formElement
, ExpandableComposite
.TWISTIE
);
53 sectionSampleDesignationHistory
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
54 sectionSampleDesignationHistory
.setEntity(entity
);
59 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
62 public void handleEvent(Object eventSource
) {
63 if(eventSource
== sectionCurrentSampleDesignation
){
64 sectionSampleDesignationHistory
.refresh();