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.
9 package eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
;
11 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
12 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
13 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.LayoutConstants
;
16 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
20 * @created May 11, 2011
22 public class DeterminationDetailElement
extends AbstractCdmDetailElement
<SpecimenOrObservationBase
> {
24 private CurrentDeterminationDetailSection section_currentDetermination
;
26 private DeterminationHistoryDetailSection section_determinationHistory
;
28 public DeterminationDetailElement(CdmFormFactory formFactory
,
29 ICdmFormElement formElement
) {
30 super(formFactory
, formElement
);
34 protected void createControls(ICdmFormElement formElement
,
35 SpecimenOrObservationBase entity
, int style
) {
37 section_currentDetermination
= formFactory
.createCurrentDeterminationDetailSection(
38 getConversationHolder(), formElement
, StoreUtil
.getSectionStyle(CurrentDeterminationDetailSection
.class, entity
.getClass().getCanonicalName(), true));
39 section_currentDetermination
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
40 section_currentDetermination
.setEntity(entity
);
42 section_determinationHistory
= formFactory
.createDeterminationHistoryDetailSection(
43 getConversationHolder(), formElement
, StoreUtil
.getSectionStyle(DeterminationHistoryDetailSection
.class, entity
.getClass().getCanonicalName()));
44 section_determinationHistory
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
45 section_determinationHistory
.setEntity(entity
);
49 public void handleEvent(Object eventSource
) {
50 if(eventSource
== section_currentDetermination
){
51 section_determinationHistory
.refresh();