merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / occurrence / CollectingAreasDetailSection.java
index d1fc2a0ff8c614ae99c82e80801c336457a76e86..aa30aea549eb058df1a701281ff9a5a2e48a9906 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* 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.
 */
@@ -12,23 +12,27 @@ package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
 import java.util.Collection;
 
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.NamedAreaSelectionDialog;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
 /**
- * <p>CollectingAreasDetailSection class.</p>
+ * <p>
+ * CollectingAreasDetailSection class.
+ * </p>
  *
  * @author n.hoffmann
  * @created Oct 14, 2010
  * @version 1.0
  */
-public class CollectingAreasDetailSection extends
-               AbstractEntityCollectionSection<DerivedUnitFacade, NamedArea> {
+public class CollectingAreasDetailSection extends AbstractEntityCollectionSection<DerivedUnitFacade, NamedArea> {
 
        /**
         * <p>Constructor for CollectingAreasDetailSection.</p>
@@ -59,7 +63,7 @@ public class CollectingAreasDetailSection extends
        @Override
        public NamedArea createNewElement() {
                NamedArea selection = NamedAreaSelectionDialog.select(getLayoutComposite().getShell(), getConversationHolder(), null);
-               
+
                return selection;
        }
 
@@ -99,4 +103,12 @@ public class CollectingAreasDetailSection extends
                return "Add a collecting area";
        }
 
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#createElementComposite(java.lang.Object, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.graphics.Color)
+        */
+       @Override
+       protected void createElementComposite(NamedArea element, SelectionListener removeListener, Color backgroundColor) {
+           formFactory.createNamedAreaFieldController(this, element, removeListener);
+       }
+
 }