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
;
12 import org
.eclipse
.swt
.events
.SelectionListener
;
14 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
23 * CollectingAreasDetailElement class.
27 * @created Oct 14, 2010
30 public class CollectingAreaDetailElement
extends
31 AbstractEntityCollectionElement
<NamedArea
> {
33 private EntitySelectionElement
<NamedArea
> selection_namedArea
;
37 * Constructor for CollectingAreasDetailElement.
41 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
44 * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
47 * a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
48 * @param removeListener
49 * a {@link org.eclipse.swt.events.SelectionListener} object.
53 public CollectingAreaDetailElement(CdmFormFactory formFactory
,
54 AbstractFormSection section
, NamedArea entity
,
55 SelectionListener removeListener
, int style
) {
56 super(formFactory
, section
, entity
, removeListener
, null, style
);
63 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#setEntity
68 public void setEntity(NamedArea entity
) {
69 selection_namedArea
.setEntity(entity
);
76 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls
77 * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
81 public void createControls(ICdmFormElement formElement
, int style
) {
82 selection_namedArea
= formFactory
.createSelectionElement(NamedArea
.class, //getConversationHolder(),
84 null, EntitySelectionElement
.NOTHING
, style
);
91 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent
96 public void handleEvent(Object eventSource
) {
97 if (eventSource
== selection_namedArea
) {
98 setEntity(selection_namedArea
.getSelection());