merged model adaptions to cdmlib 3.2.4 from campanula branch
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / GatheringEventUnitElement.java
index b144231fe421e24b24f5df528952931cd5b47b6e..5e1651d2918cfb0acee23b0f50ee051dd1d65fb4 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.
  */
@@ -16,20 +16,18 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.widgets.Section;
 
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.cdm.model.common.TimePeriod;
-import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
 
 /**
  * <p>
  * GatheringEventUnitElement class.
  * </p>
- * 
+ *
  * @author c.mathew
  * @created 23 Jul. 2013
  * @version 1.0
  */
 public class GatheringEventUnitElement extends AbstractCdmFormElement implements ISelectable {
-       
+
        private final Label label;
        private final MinMaxTextSection section_minMaxText;
 
@@ -37,7 +35,7 @@ public class GatheringEventUnitElement extends AbstractCdmFormElement implements
         * <p>
         * Constructor for TimePeriodElement.
         * </p>
-        * 
+        *
         * @param style
         *            a int.
         * @param formFactory
@@ -52,9 +50,9 @@ public class GatheringEventUnitElement extends AbstractCdmFormElement implements
         *            a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
         */
        public GatheringEventUnitElement(CdmFormFactory formFactory,
-                       ICdmFormElement parentElement, 
+                       ICdmFormElement parentElement,
                        String labelString,
-                       DerivedUnitFacade gatheringEvent, 
+                       DerivedUnitFacade gatheringEvent,
                        MinMaxTextSection.UnitType unitType,
                        final int style) {
                super(formFactory, parentElement);
@@ -65,11 +63,11 @@ public class GatheringEventUnitElement extends AbstractCdmFormElement implements
                section_minMaxText = formFactory.createMinMaxTextSection(this,
                                unitType,
                                Section.TWISTIE);
-               
-               addControl(section_minMaxText); 
+
+               addControl(section_minMaxText);
 
                section_minMaxText.setEntity(gatheringEvent);
-               
+
                formFactory.addPropertyChangeListener(this);
        }
 
@@ -88,7 +86,7 @@ public class GatheringEventUnitElement extends AbstractCdmFormElement implements
        }
 
        private void handleEvent(Object eventSource) {
-               if (eventSource == section_minMaxText) {                        
+               if (eventSource == section_minMaxText) {
                        firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
                }
        }
@@ -99,7 +97,7 @@ public class GatheringEventUnitElement extends AbstractCdmFormElement implements
                label.setBackground(color);
                section_minMaxText.setBackground(color);
        }
-       
+
        @Override
        public void setSelected(boolean selected) {
                setBackground(selected ? SELECTED : getPersistentBackground());