// $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 eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopeDetailSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
* ClassificationDetailElement class.
* </p>
- *
+ *
* @author n.hoffmann
* @created Sep 27, 2010
* @version 1.0
private TextWithLabelElement text_microReference;
+ private TimePeriodElement element_date;
+
+ private GeoScopeDetailSection section_collectingAreas;
+
+
+
+
/**
* <p>
* Constructor for ClassificationDetailElement.
* </p>
- *
+ *
* @param formFactory
* a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
* (eu.etaxonomy.taxeditor.forms.ICdmFormElement,
/** {@inheritDoc} */
@Override
protected void createControls(ICdmFormElement formElement,
- Classification entity, int style) {
- text_treeLabel = formFactory.createTextWithLabelElement(formElement,
- "Label", entity != null ? entity.getTitleCache() : null,
- SWT.NULL);
- selection_reference = formFactory
- .createSelectionElement(Reference.class,
- getConversationHolder(), formElement, "Reference",
- entity != null ? entity.getReference() : null,
- EntitySelectionElement.ALL, SWT.NULL);
- text_microReference = formFactory.createTextWithLabelElement(
- formElement, "Reference Detail",
- entity != null ? entity.getMicroReference() : null, SWT.NULL);
+ Classification entity, int style) {
+ text_treeLabel = formFactory.createTextWithLabelElement(formElement, "Label", entity != null ? entity.getTitleCache() : null, SWT.NULL);
+ selection_reference = formFactory.createSelectionElement(Reference.class, getConversationHolder(), formElement, "Reference",
+ entity != null ? entity.getReference() : null, EntitySelectionElement.ALL, SWT.NULL);
+ text_microReference = formFactory.createTextWithLabelElement(formElement, "Reference Detail",
+ entity != null ? entity.getMicroReference() : null, SWT.NULL);
+ element_date = formFactory.createTimePeriodElement(formElement, "Date",
+ entity.getTimeperiod(), style);
+ section_collectingAreas = formFactory.createGeoScopeDetailSection(getConversationHolder(), formElement, SWT.NULL);
+ section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ section_collectingAreas.setEntity(entity);
+
}
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
* .lang.Object)
getEntity().setReference(selection_reference.getEntity());
} else if (eventSource == text_microReference) {
getEntity().setMicroReference(text_microReference.getText());
+ }else if (eventSource == element_date) {
+ getEntity().setTimeperiod(element_date.getTimePeriod());
}
}
}