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 org
.eclipse
.swt
.events
.SelectionListener
;
13 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
18 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
22 * @created Oct 14, 2010
24 public class CollectingAreaDetailElement
extends
25 AbstractEntityCollectionElement
<NamedArea
> {
27 private EntitySelectionElement
<NamedArea
> selection_namedArea
;
31 * Constructor for CollectingAreasDetailElement.
35 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
38 * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
41 * a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
42 * @param removeListener
43 * a {@link org.eclipse.swt.events.SelectionListener} object.
47 public CollectingAreaDetailElement(CdmFormFactory formFactory
,
48 AbstractFormSection section
, NamedArea entity
,
49 SelectionListener removeListener
, int style
) {
50 super(formFactory
, section
, entity
, removeListener
, null, style
);
54 public void setEntity(NamedArea entity
) {
55 selection_namedArea
.setEntity(entity
);
59 public void createControls(ICdmFormElement formElement
, int style
) {
60 selection_namedArea
= formFactory
.createSelectionElement(NamedArea
.class, //getConversationHolder(),
62 null, EntitySelectionElement
.NOTHING
, style
);
66 public void handleEvent(Object eventSource
) {
67 if (eventSource
== selection_namedArea
) {
68 setEntity(selection_namedArea
.getSelection());