merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / description / DescriptionSourceElement.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10
11 package eu.etaxonomy.taxeditor.ui.section.description;
12
13 import org.eclipse.swt.events.SelectionListener;
14
15 import eu.etaxonomy.cdm.model.reference.Reference;
16 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
17 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
18 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
20 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
21
22 /**
23 * <p>
24 * DescriptionSourceElement class.
25 * </p>
26 *
27 * @author n.hoffmann
28 * @created Mar 18, 2010
29 * @version 1.0
30 */
31 public class DescriptionSourceElement extends
32 AbstractEntityCollectionElement<Reference> {
33
34 private EntitySelectionElement<Reference> selection_descriptionSource;
35
36 /**
37 * <p>
38 * Constructor for DescriptionSourceElement.
39 * </p>
40 *
41 * @param cdmFormFactory
42 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
43 * object.
44 * @param formElement
45 * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
46 * object.
47 * @param element
48 * a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
49 * object.
50 * @param removeListener
51 * a {@link org.eclipse.swt.events.SelectionListener} object.
52 * @param style
53 * a int.
54 */
55 public DescriptionSourceElement(CdmFormFactory cdmFormFactory,
56 AbstractFormSection formElement, Reference element,
57 SelectionListener removeListener, int style) {
58 super(cdmFormFactory, formElement, element, removeListener, null, style);
59 }
60
61 /** {@inheritDoc} */
62 @Override
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);
68 }
69
70 /** {@inheritDoc} */
71 @Override
72 public void setEntity(Reference element) {
73 selection_descriptionSource.setEntity(element);
74 }
75
76 /** {@inheritDoc} */
77 @Override
78 public void handleEvent(Object eventSource) {
79
80 }
81 }