merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / description / DescriptionSourceElement.java
index 416d0e1a822bf03f31ce990f2f91e5665ffdd884..937449fd30f08cac03ccf91341b57ef619e8d471 100644 (file)
@@ -1,55 +1,70 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy 
+ * http://www.e-taxonomy.eu
+ 
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 package eu.etaxonomy.taxeditor.ui.section.description;
 
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>DescriptionSourceElement class.</p>
- *
+ * <p>
+ * DescriptionSourceElement class.
+ * </p>
+ * 
  * @author n.hoffmann
  * @created Mar 18, 2010
  * @version 1.0
  */
-public class DescriptionSourceElement extends AbstractEntityCollectionElement<Reference> {
+public class DescriptionSourceElement extends
+               AbstractEntityCollectionElement<Reference> {
 
-       private ReferenceSelectionElement selection_descriptionSource;
+       private EntitySelectionElement<Reference> selection_descriptionSource;
 
        /**
-        * <p>Constructor for DescriptionSourceElement.</p>
-        *
-        * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
-        * @param element a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
-        * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style a int.
+        * <p>
+        * Constructor for DescriptionSourceElement.
+        * </p>
+        * 
+        * @param cdmFormFactory
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
+        *            object.
+        * @param formElement
+        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
+        *            object.
+        * @param element
+        *            a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
+        *            object.
+        * @param removeListener
+        *            a {@link org.eclipse.swt.events.SelectionListener} object.
+        * @param style
+        *            a int.
         */
        public DescriptionSourceElement(CdmFormFactory cdmFormFactory,
                        AbstractFormSection formElement, Reference element,
                        SelectionListener removeListener, int style) {
                super(cdmFormFactory, formElement, element, removeListener, null, style);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement element, int style) {
-               selection_descriptionSource = (ReferenceSelectionElement) formFactory.createSelectionElement(SelectionType.REFERENCE, getConversationHolder(), element, "Description Source", null, style);
+               selection_descriptionSource = formFactory
+                               .createSelectionElement(Reference.class,
+                                               getConversationHolder(), element, "Description Source",
+                                               null, EntitySelectionElement.ALL, style);
        }
 
        /** {@inheritDoc} */
@@ -61,6 +76,6 @@ public class DescriptionSourceElement extends AbstractEntityCollectionElement<Re
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-               
+
        }
 }