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
.section
.AbstractEntityCollectionElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
24 * DescriptionSourceElement class.
28 * @created Mar 18, 2010
31 public class DescriptionSourceElement
extends
32 AbstractEntityCollectionElement
<Reference
> {
34 private EntitySelectionElement
<Reference
> selection_descriptionSource
;
38 * Constructor for DescriptionSourceElement.
41 * @param cdmFormFactory
42 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
45 * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
48 * a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
50 * @param removeListener
51 * a {@link org.eclipse.swt.events.SelectionListener} object.
55 public DescriptionSourceElement(CdmFormFactory cdmFormFactory
,
56 AbstractFormSection formElement
, Reference element
,
57 SelectionListener removeListener
, int style
) {
58 super(cdmFormFactory
, formElement
, element
, removeListener
, null, style
);
63 public void createControls(ICdmFormElement element
, int style
) {
64 selection_descriptionSource
= formFactory
65 .createSelectionElement(Reference
.class,
66 getConversationHolder(), element
, "Description Source",
67 null, EntitySelectionElement
.ALL
, style
);
72 public void setEntity(Reference element
) {
73 selection_descriptionSource
.setEntity(element
);
78 public void handleEvent(Object eventSource
) {