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
.reference
.Reference
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
.SelectionType
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
21 import eu
.etaxonomy
.taxeditor
.ui
.selection
.ReferenceSelectionElement
;
25 * DescriptionSourceElement class.
29 * @created Mar 18, 2010
32 public class DescriptionSourceElement
extends
33 AbstractEntityCollectionElement
<Reference
> {
35 private ReferenceSelectionElement selection_descriptionSource
;
39 * Constructor for DescriptionSourceElement.
42 * @param cdmFormFactory
43 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
46 * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
49 * a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
51 * @param removeListener
52 * a {@link org.eclipse.swt.events.SelectionListener} object.
56 public DescriptionSourceElement(CdmFormFactory cdmFormFactory
,
57 AbstractFormSection formElement
, Reference element
,
58 SelectionListener removeListener
, int style
) {
59 super(cdmFormFactory
, formElement
, element
, removeListener
, null, style
);
64 public void createControls(ICdmFormElement element
, int style
) {
65 selection_descriptionSource
= (ReferenceSelectionElement
) formFactory
66 .createSelectionElement(SelectionType
.REFERENCE
,
67 getConversationHolder(), element
, "Description Source",
68 null, ReferenceSelectionElement
.DEFAULT
, style
);
73 public void setEntity(Reference element
) {
74 selection_descriptionSource
.setEntity(element
);
79 public void handleEvent(Object eventSource
) {