3 * Copyright (C) 2007 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.
11 package eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
;
13 import org
.eclipse
.ui
.forms
.widgets
.Section
;
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
.element
.CdmFormFactory
.EntityDetailType
;
19 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
23 * @created May 11, 2011
26 public class DeterminationDetailElement
extends AbstractCdmDetailElement
<DerivedUnitFacade
> {
28 private CurrentDeterminationDetailSection section_currentDetermination
;
30 private DeterminationHistoryDetailSection section_determinationHistory
;
36 public DeterminationDetailElement(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 DerivedUnitFacade entity
, int style
) {
48 section_currentDetermination
= (CurrentDeterminationDetailSection
) formFactory
49 .createEntityDetailSection(
50 EntityDetailType
.DETERMINATION_CURRENT
,
51 getConversationHolder(), formElement
, Section
.EXPANDED
);
52 section_currentDetermination
.setLayoutData(CdmFormFactory
.FILL_HORIZONTALLY(2, 1));
53 section_currentDetermination
.setEntity(entity
);
55 section_determinationHistory
= (DeterminationHistoryDetailSection
) formFactory
56 .createEntityDetailSection(
57 EntityDetailType
.DETERMINATION_HISTORY
,
58 getConversationHolder(), formElement
, Section
.TWISTIE
);
59 section_determinationHistory
.setLayoutData(CdmFormFactory
.FILL_HORIZONTALLY(2, 1));
60 section_determinationHistory
.setEntity(entity
);
65 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
68 public void handleEvent(Object eventSource
) {
69 if(eventSource
== section_currentDetermination
){
70 section_determinationHistory
.refresh();