eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitFacadeDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationEventDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationHistoryDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitGeneralDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitGeneralDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailElement.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventWizardPage.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralWizardPage.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/IDerivedUnitFacadeDetailSection.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/NamedAreaDetailElement.java -text
// $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.actions.CompoundContributionItem;
import org.eclipse.ui.handlers.IHandlerService;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
public class DynamicNewObjectMenu extends CompoundContributionItem {
private static final Logger logger = Logger
.getLogger(DynamicNewObjectMenu.class);
-
- private IHandlerService handlerService = (IHandlerService) BulkEditorUtil.getService(IHandlerService.class);
+
+ private final IHandlerService handlerService = (IHandlerService) BulkEditorUtil.getService(IHandlerService.class);
private Map<Object, String> classLabelPairs;
/* (non-Javadoc)
* @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
/** {@inheritDoc} */
@Override
protected IContributionItem[] getContributionItems() {
-
+
classLabelPairs = getClassLabelPairs();
-
+
return new IContributionItem[] {
new ContributionItem() {
- public void fill(Menu menu, int index){
+ @Override
+ public void fill(Menu menu, int index){
for(final Object key : classLabelPairs.keySet()){
createMenuItem(menu, key);
- }
+ }
}
}
};
menuItem.setText(classLabelPairs.get(key));
menuItem.addSelectionListener(new SelectionListener(){
- public void widgetDefaultSelected(SelectionEvent e) {}
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent ev) {
+ @Override
+ public void widgetSelected(SelectionEvent ev) {
Event event = new Event();
event.data = key;
event.text = classLabelPairs.get(key);
logger.error("Error executing command", e);
throw new RuntimeException("Error executing command", e);
}
- }
+ }
});
-
- //FIXME:3.3MC Need corresponding Details Viewer section for FieldUnit
- if(key == SpecimenOrObservationType.FieldUnit){
- menuItem.setEnabled(false);
- }
}
-
+
/**
* Get class label pairs from Annotated Line Editor's entity creator.
* @return
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor != null){
IEditorInput input = editor.getEditorInput();
-
+
if(input instanceof AbstractBulkEditorInput){
IEntityCreator<?> entityCreator = ((AbstractBulkEditorInput) input).getEntityCreator();
return entityCreator.getKeyLabelPairs();
}
}
-
+
return null;
- }
+ }
}
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitFacadeDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitFacadeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationEventDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationHistoryDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.NamedAreaDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement;
return section;
}
- public GeneralDetailSection createGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ public FieldUnitGeneralDetailSection createFieldUnitGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FieldUnitGeneralDetailSection section = new FieldUnitGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitGeneralDetailSection createDerivedUnitGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitGeneralDetailSection section = new DerivedUnitGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
return section;
}
- public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ public DerivedUnitGeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitGeneralDetailSection section = new DerivedUnitGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
}
- public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){
- GeneralDetailElement element = new GeneralDetailElement(this, parentElement);
+ public FieldUnitGeneralDetailElement createFieldUnitGeneralDetailElement(ICdmFormElement parentElement){
+ FieldUnitGeneralDetailElement element = new FieldUnitGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DerivedUnitGeneralDetailElement createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement){
+ DerivedUnitGeneralDetailElement element = new DerivedUnitGeneralDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
private final DerivedUnitFacadeConfigurator configurator;
- private GeneralDetailSection section_general;
+ private DerivedUnitGeneralDetailSection section_general;
private GatheringEventDetailSection section_gatheringEvent;
private DerivedUnitBaseDetailSection section_derivedUnitBase;
private FieldUnitDetailSection section_fieldUnit;
protected void createControls(ICdmFormElement formElement,
DerivedUnit entity, int style) {
- section_general = formFactory.createGeneralDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ section_general = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
section_general.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_general);
addElement(section_general);
* @created Dec 16, 2010
* @version 1.0
*/
-public class GeneralDetailElement extends
+public class DerivedUnitGeneralDetailElement extends
AbstractCdmDetailElement<DerivedUnitFacade> {
private ToggleableTextElement toggleableText_titleCache;
* @param formFactory
* @param formElement
*/
- public GeneralDetailElement(CdmFormFactory formFactory,
+ public DerivedUnitGeneralDetailElement(CdmFormFactory formFactory,
ICdmFormElement formElement) {
super(formFactory, formElement);
}
* @created Dec 16, 2010
* @version 1.0
*/
-public class GeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
+public class DerivedUnitGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
/**
* @param formFactory
* @param selectionProvider
* @param style
*/
- public GeneralDetailSection(CdmFormFactory formFactory,
+ public DerivedUnitGeneralDetailSection(CdmFormFactory formFactory,
ConversationHolder conversation, ICdmFormElement parentElement,
ISelectionProvider selectionProvider, int style) {
super(formFactory, conversation, parentElement, selectionProvider, style);
*/
@Override
protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
- return formFactory.createGeneralDetailElement(parentElement);
+ return formFactory.createDerivedUnitGeneralDetailElement(parentElement);
}
}
--- /dev/null
+// $Id$
+/**
+ * Copyright (C) 2013 EDIT
+ * 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.
+ */
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.PointElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
+import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author pplitzner
+ * @date 05.11.2013
+ *
+ */
+public class FieldUnitGeneralDetailElement extends AbstractCdmDetailElement<DerivedUnitFacade> {
+
+ private ToggleableTextElement toggleableText_titleCache;
+ private EnumComboElement<SpecimenOrObservationType> combo_specorobstype;
+ private EntitySelectionElement<NamedArea> selection_country;
+ private LanguageStringWithLabelElement languageText_locality;
+ private PointElement element_point;
+ private NumberWithLabelElement number_elevation;
+ private TimePeriodElement element_date;
+ private EntitySelectionElement<AgentBase> selection_collector;
+ private TextWithLabelElement text_collectingNumber;
+
+ /**
+ * @param formFactory
+ * @param formElement
+ */
+ public FieldUnitGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
+ super(formFactory, formElement);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
+ * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
+ */
+ @Override
+ protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
+ toggleableText_titleCache = formFactory.createToggleableTextField(formElement, "Title Cache",
+ entity.getTitleCache(), entity.isProtectedTitleCache(), style);
+ combo_specorobstype = formFactory.createEnumComboElement(SpecimenOrObservationType.class, formElement, style);
+ combo_specorobstype.setSelection(entity.getType());
+ selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(), formElement,
+ "Country", entity.getCountry(), EntitySelectionElement.NOTHING, style);
+ languageText_locality = formFactory.createLanguageStringWithLabelElement(formElement, "Locality",
+ entity.getLocality(), style);
+ element_point = formFactory.createPointElement(formElement, entity.getExactLocation(), style);
+ element_date = formFactory.createTimePeriodElement(formElement, "Date", entity.getGatheringPeriod(), style);
+ selection_collector = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement,
+ "Collector", entity.getCollector(), EntitySelectionElement.ALL, style);
+ text_collectingNumber = formFactory.createTextWithLabelElement(formElement, "Collecting number",
+ entity.getFieldNumber(), style);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
+ * .lang.Object)
+ */
+ @Override
+ public void handleEvent(Object eventSource) {
+ if (eventSource == toggleableText_titleCache) {
+ getEntity().setTitleCache(toggleableText_titleCache.getText(), toggleableText_titleCache.getState());
+ } else if (eventSource == selection_country) {
+ getEntity().setCountry(selection_country.getSelection());
+ } else if (eventSource == languageText_locality) {
+ LanguageString locality = languageText_locality.getLanguageString();
+ getEntity().setLocality(locality);
+ } else if (eventSource == element_point) {
+ getEntity().setExactLocation(element_point.getPoint());
+ } else if (eventSource == number_elevation) {
+ getEntity().setAbsoluteElevation(number_elevation.getInteger());
+ } else if (eventSource == element_date) {
+ getEntity().setGatheringPeriod(element_date.getTimePeriod());
+ } else if (eventSource == selection_collector) {
+ getEntity().setCollector(selection_collector.getSelection());
+ } else if (eventSource == text_collectingNumber) {
+ getEntity().setFieldNumber(text_collectingNumber.getText());
+ } else if (eventSource == combo_specorobstype) {
+ getEntity().setType(combo_specorobstype.getSelection());
+ }
+
+ if (eventSource != toggleableText_titleCache) {
+ toggleableText_titleCache.setText(getEntity().getTitleCache());
+ }
+ }
+}
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* 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.
+*/
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author pplitzner
+ * @date 05.11.2013
+ *
+ */
+public class FieldUnitGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
+
+ /**
+ * @param formFactory
+ * @param conversation
+ * @param parentElement
+ * @param selectionProvider
+ * @param style
+ */
+ public FieldUnitGeneralDetailSection(CdmFormFactory formFactory,
+ ConversationHolder conversation, ICdmFormElement parentElement,
+ ISelectionProvider selectionProvider, int style) {
+ super(formFactory, conversation, parentElement, selectionProvider, style);
+ }
+
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
+ */
+ @Override
+ public String getHeading() {
+ return "General";
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
+ */
+ @Override
+ protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
+ return formFactory.createFieldUnitGeneralDetailElement(parentElement);
+ }
+
+}
*/
@Override
public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
- GeneralDetailElement detailElement = formFactory.createGeneralDetailElement(rootElement);
+ DerivedUnitGeneralDetailElement detailElement = formFactory.createDerivedUnitGeneralDetailElement(rootElement);
detailElement.setEntity(getEntity());
checkComplete();
return detailElement;
// $Id$
/**
* Copyright (C) 2011 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.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
+import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-
import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
/**
- *
+ *
* The DetailsViewer handles the content of the details view (
* {@link DetailsViewPart}).<br>
* Depending on the type of the selected element the section of the details view
* <p>
* Constructor for DetailsViewer.
* </p>
- *
+ *
* @param parent
* a {@link org.eclipse.swt.widgets.Composite} object.
* @param viewPart
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
* .lang.Object)
AbstractUtility.error(getClass(), e);
}
}
+ else if(input instanceof FieldUnit){
+ input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
+ }
super.setInput(input);
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.Viewer#refresh()
*/
/** {@inheritDoc} */
if (((DescriptionBase) input).isImageGallery()) {
createImageGallerySection(rootElement);
- } else if (isUseDescription) {
+ } else if (isUseDescription) {
createUseDescriptionSection(rootElement);
} else {
createDescriptionSection(rootElement);
isUseDescription = true;
}
}
-
+
if (isUseDescription == true && input instanceof CategoricalData) {
createUseRecordSection(rootElement);
} else {
createMediaElementSection(rootElement);
} else if (input instanceof DerivedUnitFacade) {
- createDerivedUnitBaseElementSection(rootElement);
+ if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
+ createFieldUnitSection(rootElement);
+ }
+ else{
+ createDerivedUnitBaseElementSection(rootElement);
+ }
+
+ } else if (input instanceof FieldUnit) {
+ createFieldUnitSection(rootElement);
} else if (input instanceof FeatureNodeContainer) {
createFeatureDistributionSection(rootElement);
layout();
}
-
+
/**
* @param rootElement
*/
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.Viewer#getSelection()
*/
/** {@inheritDoc} */
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
* .ISelection, boolean)
addPart(teamDetailSection);
}
-
+
/**
* createPersonDetailSection
*
// addPart(descriptionSourceSection);
addPart(scopeSection);
}
-
+
/**
* Creates the use Description section
*
addPart(descriptionDetailSection);
addPart(descriptionSourceSection);
-
+
}
addPart(descriptionDetailSection);
}
-
+
/**
* createMediaElementSection
*
private void createDerivedUnitBaseElementSection(RootElement parent) {
destroySections();
- GeneralDetailSection generalDetailSection = formFactory.createGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(generalDetailSection);
+ addPart(derivedUnitGeneralDetailSection);
addPart(gatheringEventDetailSection);
addPart(fieldUnitDetailSection);
addPart(derivedUnitBaseDetailSection);
}
+ /**
+ * createDerivedUnitBaseElementSection
+ *
+ * @param parent
+ */
+ private void createFieldUnitSection(RootElement parent) {
+ destroySections();
+
+ FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+
+ addPart(fielUnitGeneralDetailSection);
+ addPart(gatheringEventDetailSection);
+ addPart(fieldUnitDetailSection);
+ }
+
/**
* @param rootElement
*/
destroySections();
PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
-
+
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+
PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(taxonomicScopeSection);
}
-
+
/**
* create the UseRecordSection
*
UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+
addPart(descriptionUseRecordSection);
-
-
+
+
}
/**
addPart(definedTermDetailSection);
}
- private void createFODetailsView(RootElement parent) {
- destroySections();
-
- GeneralDetailSection generalDetailSection = formFactory.createFOSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFODetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
- addPart(generalDetailSection);
- addPart(gatheringEventDetailSection);
- addPart(fieldUnitDetailSection);
- }
}