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 eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.GatheringEventUnitElement
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.TextWithLabelElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
23 * GatheringEventDetailElement class.
27 * @created Jun 24, 2010
30 public class GatheringEventDetailElement
extends
31 AbstractCdmDetailElement
<DerivedUnitFacade
> {
33 private GatheringEventUnitElement element_elevation
;
35 private GatheringEventUnitElement element_distToGround
;
37 private GatheringEventUnitElement element_distToWater
;
39 private TextWithLabelElement text_collectingMethod
;
41 private TextWithLabelElement text_gatheringEventDescription
;
45 * Constructor for GatheringEventDetailElement.
49 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
52 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
55 public GatheringEventDetailElement(CdmFormFactory formFactory
,
56 ICdmFormElement formElement
) {
57 super(formFactory
, formElement
);
62 protected void createControls(ICdmFormElement formElement
, DerivedUnitFacade entity
, int style
) {
63 text_collectingMethod
= formFactory
.createTextWithLabelElement(formElement
, "Collecting Method", entity
.getCollectingMethod(), style
);
65 text_gatheringEventDescription
= formFactory
.createTextWithLabelElement(
66 formElement
, "Gathering Event Description", entity
.getGatheringEventDescription(), style
);
68 element_distToGround
= formFactory
.createGatheringEventUnitElement(
69 formElement
, "Dist. To Ground : ", entity
, MinMaxTextSection
.UnitType
.DIST_TO_GROUND
, style
);
71 element_distToWater
= formFactory
.createGatheringEventUnitElement(
72 formElement
, "Dist. To Watersurface : ", entity
, MinMaxTextSection
.UnitType
.DIST_TO_WATER
, style
);
78 public void handleEvent(Object eventSource
) {
79 if (eventSource
== text_collectingMethod
) {
80 getEntity().setCollectingMethod(text_collectingMethod
.getText());
81 } else if (eventSource
== text_gatheringEventDescription
) {
82 getEntity().setGatheringEventDescription(
83 text_gatheringEventDescription
.getText());