// $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.
*/
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;
* <p>
* Constructor for TimePeriodElement.
* </p>
- *
+ *
* @param style
* a int.
* @param formFactory
* 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);
section_minMaxText = formFactory.createMinMaxTextSection(this,
unitType,
Section.TWISTIE);
-
- addControl(section_minMaxText);
+
+ addControl(section_minMaxText);
section_minMaxText.setEntity(gatheringEvent);
-
+
formFactory.addPropertyChangeListener(this);
}
}
private void handleEvent(Object eventSource) {
- if (eventSource == section_minMaxText) {
+ if (eventSource == section_minMaxText) {
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
}
}
label.setBackground(color);
section_minMaxText.setBackground(color);
}
-
+
@Override
public void setSelected(boolean selected) {
setBackground(selected ? SELECTED : getPersistentBackground());