automated build configuration is on its way
[taxeditor.git] / 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.forms.AbstractFormSection;
17 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
18 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
19 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
20 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
21 import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
22
23 /**
24 * <p>DescriptionSourceElement class.</p>
25 *
26 * @author n.hoffmann
27 * @created Mar 18, 2010
28 * @version 1.0
29 */
30 public class DescriptionSourceElement extends AbstractEntityCollectionElement<Reference> {
31
32 private ReferenceSelectionElement selection_descriptionSource;
33
34 /**
35 * <p>Constructor for DescriptionSourceElement.</p>
36 *
37 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
38 * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
39 * @param element a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
40 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
41 * @param style a int.
42 */
43 public DescriptionSourceElement(CdmFormFactory cdmFormFactory,
44 AbstractFormSection formElement, Reference element,
45 SelectionListener removeListener, int style) {
46 super(cdmFormFactory, formElement, element, removeListener, null, style);
47 }
48
49 /** {@inheritDoc} */
50 @Override
51 public void createControls(ICdmFormElement element, int style) {
52 selection_descriptionSource = (ReferenceSelectionElement) formFactory.createSelectionElement(SelectionType.REFERENCE, getConversationHolder(), element, "Description Source", null, style);
53 }
54
55 /** {@inheritDoc} */
56 @Override
57 public void setEntity(Reference element) {
58 selection_descriptionSource.setEntity(element);
59 }
60
61 /** {@inheritDoc} */
62 @Override
63 public void handleEvent(Object eventSource) {
64
65 }
66 }