eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/group/MemberDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/identifier/IdentifierDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/identifier/IdentifierDetailSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/GeographicalScopeDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyNodeDetailElement.java -text
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailElement;
import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.GeographicalScopeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailElement;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailElement;
return section;
}
- public GeographicalScopeDetailSection createGeographicalScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
- GeographicalScopeDetailSection section = new GeographicalScopeDetailSection(this, conversation, parentElement, style);
- addAndAdaptSection(parentElement, section);
- return section;
- }
-
public ScopeRestrictionSection createScopeRestrictionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
ScopeRestrictionSection section = new ScopeRestrictionSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
// $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());
}
}
}
// $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.
*/
SelectionListener removeListener, int style) {
super(formFactory, section, entity, removeListener, null, style);
}
-
+
/** {@inheritDoc} */
@Override
public void setEntity(NamedArea entity) {
-
+
}
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
-
+
}
/** {@inheritDoc} */
@Override
- public void handleEvent(Object eventSource) {
+ public void handleEvent(Object eventSource) {
}
+
+
}
+++ /dev/null
-/**
- *
- */
-package eu.etaxonomy.taxeditor.ui.section.key;
-
-import java.util.Collection;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.IIdentificationKey;
-import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
-
-/**
- * @author n.hoffmann
- *
- */
-public class GeographicalScopeDetailSection extends
- AbstractEntityCollectionSection<IIdentificationKey, NamedArea> {
-
- public GeographicalScopeDetailSection(CdmFormFactory formFactory,
- ConversationHolder conversation, ICdmFormElement parentElement, int style) {
- super(formFactory, conversation, parentElement, "Geographical Scope", style);
- }
-
- @Override
- public Collection<NamedArea> getCollection(IIdentificationKey entity) {
- return entity.getGeographicalScope();
- }
-
- @Override
- public NamedArea createNewElement() {
- return NamedArea.NewInstance();
- }
-
- @Override
- public void addElement(NamedArea element) {
- getEntity().addGeographicalScope(element);
- }
-
- @Override
- public void removeElement(NamedArea element) {
- getEntity().removeGeographicalScope(element);
- }
-
- @Override
- public String getEmptyString() {
- return "No geographical scopes yet.";
- }
-
- @Override
- protected String getTooltipString() {
- return "Add a geographical scope";
- }
-
-}