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
.description
;
13 import org
.eclipse
.swt
.events
.SelectionListener
;
15 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
16 import eu
.etaxonomy
.taxeditor
.ui
.forms
.AbstractFormSection
;
17 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.SelectionType
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
21 import eu
.etaxonomy
.taxeditor
.ui
.selection
.AbstractSelectionElement
;
24 * <p>DerivedUnitElement class.</p>
27 * @created Sep 16, 2010
30 public class DerivedUnitElement
extends AbstractEntityCollectionElement
<SpecimenOrObservationBase
> {
32 private AbstractSelectionElement selection_derivedUnit
;
35 * <p>Constructor for DerivedUnitElement.</p>
37 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
38 * @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
39 * @param entity a {@link eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase} object.
40 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
43 public DerivedUnitElement(CdmFormFactory formFactory
,
44 AbstractFormSection section
, SpecimenOrObservationBase entity
,
45 SelectionListener removeListener
, int style
) {
46 super(formFactory
, section
, entity
, removeListener
, null, style
);
50 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls(eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
54 public void createControls(ICdmFormElement element
, int style
) {
55 selection_derivedUnit
= formFactory
.createSelectionElement(SelectionType
.DERIVED_UNIT
, getConversationHolder(), element
, "Specimen", null, style
);
59 * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent(java.lang.Object)
63 public void handleEvent(Object eventSource
) {
69 public void setEntity(SpecimenOrObservationBase entity
) {