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 org
.eclipse
.swt
.events
.SelectionListener
;
15 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
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
.section
.AbstractEntityCollectionElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NamedAreaSelectionElement
;
24 * CollectingAreasDetailElement class.
28 * @created Oct 14, 2010
31 public class NamedAreaDetailElement
extends
32 AbstractEntityCollectionElement
<NamedArea
> {
34 private NamedAreaSelectionElement selection_namedArea
;
38 * Constructor for CollectingAreasDetailElement.
42 * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
45 * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
48 * a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
49 * @param removeListener
50 * a {@link org.eclipse.swt.events.SelectionListener} object.
54 public NamedAreaDetailElement(CdmFormFactory formFactory
,
55 AbstractFormSection section
, NamedArea entity
,
56 SelectionListener removeListener
, int style
) {
57 super(formFactory
, section
, entity
, removeListener
, null, style
);
64 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#setEntity
69 public void setEntity(NamedArea entity
) {
70 selection_namedArea
.setEntity(entity
);
77 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls
78 * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
82 public void createControls(ICdmFormElement element
, int style
) {
83 selection_namedArea
= formFactory
.createNamedAreaSelectionElement(
84 element
, getConversationHolder(), "Area", null, style
);
91 * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent
96 public void handleEvent(Object eventSource
) {
97 if (eventSource
== selection_namedArea
) {
98 setEntity(selection_namedArea
.getSelection());