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
.description
;
12 import org
.eclipse
.swt
.events
.SelectionListener
;
14 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
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 * DescriptionSourceElement class.
27 * @created Mar 18, 2010
30 public class DescriptionSourceElement
extends
31 AbstractEntityCollectionElement
<Reference
> {
33 private EntitySelectionElement
<Reference
> selection_descriptionSource
;
37 * Constructor for DescriptionSourceElement.
40 * @param cdmFormFactory
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.reference.ReferenceBase}
49 * @param removeListener
50 * a {@link org.eclipse.swt.events.SelectionListener} object.
54 public DescriptionSourceElement(CdmFormFactory cdmFormFactory
,
55 AbstractFormSection formElement
, Reference element
,
56 SelectionListener removeListener
, int style
) {
57 super(cdmFormFactory
, formElement
, element
, removeListener
, null, style
);
62 public void createControls(ICdmFormElement element
, int style
) {
63 selection_descriptionSource
= formFactory
64 .createSelectionElement(Reference
.class,
66 null, EntitySelectionElement
.ALL
, style
);
71 public void setEntity(Reference element
) {
72 selection_descriptionSource
.setEntity(element
);
77 public void handleEvent(Object eventSource
) {