From: Patric Plitzner
- * createEntityDetailSection - *
- * - * @param entityDetailType - * a - * {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType} - * object. - * @param style - * a int. - * @param conversation - * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} - * object. - * @param parentElement - * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} - * object. - * @return a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} - * object. - */ - public AbstractFormSection createEntityDetailSection(EntityDetailType entityDetailType, - ConversationHolder conversation, ICdmFormElement parentElement, int style) { - AbstractFormSection section = null; - -// System.out.println("EntityDetailSection: " + entityDetailType); - switch (entityDetailType) { - case TEAM: - // TODO this is not an AbstractEntityCollectionSection - section = new TeamDetailSection(this, conversation, parentElement, null, style); - break; - case TEAMMEMBER: - section = new TeamMemberSection(this, conversation, parentElement, style); - break; - case ANNOTATION: - section = new AnnotationSection(this, conversation, parentElement, style); - break; - case CREDIT: - section = new CreditSection(this, conversation, parentElement, style); - break; - case DESCRIPTIONELEMENTSOURCE: - section = new DescriptionElementSourceSection(this, conversation, parentElement, style); - break; - case EXTENSION: - section = new ExtensionSection(this, conversation, parentElement, style); - break; - case MARKER: - section = new MarkerSection(this, conversation, parentElement, style); - break; - case MEDIA: - section = new MediaSection(this, conversation, parentElement, style); - break; - case DESCRIPTIONELEMENTMEDIA: - section = new DescriptionElementMediaSection(this, conversation, parentElement, style); - break; - case MEDIAREPRESENTATION: - section = new MediaRepresentationSection(this, conversation, parentElement, style); - break; - case MEDIAREPRESENTATIONPART: - section = new MediaRepresentationPartSection(this, conversation, parentElement, style); - break; - case MODIFIER: - section = new ModifierSection(this, conversation, parentElement, style); - break; - case NOMENCLATURALSTATUS: - section = new NomenclaturalStatusSection(this, conversation, parentElement, style); - break; - case NAME_RELATIONSHIP: - section = new NameRelationshipDetailSection(this, conversation, parentElement, style); - break; - case PROTOLOG: - section = new ProtologueSection(this, conversation, parentElement, style); - break; - case RIGHTS: - section = new RightsSection(this, conversation, parentElement, style); - break; - case SOURCE: - section = new SourceSection(this, conversation, parentElement, style); - break; - case SCOPE: - section = new ScopeSection(this, conversation, parentElement, style); - break; - case DESCRIPTIONSOURCE: - section = new DescriptionSourceSection(this, conversation, parentElement, style); - break; - case TYPEDESIGNATION: - section = new TypeDesignationSection(this, conversation, parentElement, style); - break; - case STATE_DATA: - section = new StateDataSection(this, conversation, parentElement, style); - break; - case STATISTICAL_MEASUREMENT_VALUE: - section = new StatisticalMeasurementValueSection(this, conversation, parentElement, style); - break; - case DESCRIBED_SPECIMEN: - section = new DescribedSpecimenSection(this, conversation, parentElement, style); - break; - case COLLECTING_AREA: - section = new CollectingAreasDetailSection(this, conversation, parentElement, style); - break; - case DETERMINATION_CURRENT: - section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style); - break; - case DETERMINATION_HISTORY: - section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style); - break; - case SPECIMEN_COLLECTION: - section = new SpecimenCollectionDetailSection(this, conversation, parentElement, style); - break; - case IDENTIFIABLE_SOURCE_COLLECTION: - section = new SourceCollectionDetailSection(this, conversation, parentElement, style); - break; - case GEOGRAPHICAL_SCOPE: - section = new GeographicalScopeDetailSection(this, conversation, parentElement, style); - break; - case SCOPE_RESTRICTION: - section = new ScopeRestrictionSection(this, conversation, parentElement, style); - break; - case MEMBER: - section = new MemberDetailSection(this, conversation, parentElement, style); - break; - case GRANTED_AUTHORITY: - section = new GrantedAuthorityDetailSection(this, conversation, parentElement, style); - break; - case GROUPS_BY_USER: - section = new GroupsByUserDetailSection(this, conversation, parentElement, style); - break; - case TAXONOMIC_SCOPE: - section = new TaxonomicScopeSection(this, conversation, parentElement, style); - break; - } - parentElement.addElement(section); - adapt(section); + public AnnotationSection createAnnotationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + AnnotationSection section = new AnnotationSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public CreditSection createCreditSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + CreditSection section = new CreditSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public DescriptionElementSourceSection createDescriptionElementSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public ExtensionSection createExtensionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + ExtensionSection section = new ExtensionSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public MarkerSection createMarkerSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + MarkerSection section = new MarkerSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public MediaSection createMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + MediaSection section = new MediaSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public DescriptionElementMediaSection createDescriptionElementMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + DescriptionElementMediaSection section = new DescriptionElementMediaSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public MediaRepresentationSection createMediaRepresentationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + MediaRepresentationSection section = new MediaRepresentationSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public MediaRepresentationPartSection createMediaRepresentationPartSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + MediaRepresentationPartSection section = new MediaRepresentationPartSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public ModifierSection createModifierSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + ModifierSection section = new ModifierSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public NomenclaturalStatusSection createNomenclaturalStatusSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + NomenclaturalStatusSection section = new NomenclaturalStatusSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public NameRelationshipDetailSection createNameRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + NameRelationshipDetailSection section = new NameRelationshipDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public RightsSection createRightsSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + RightsSection section = new RightsSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public SourceSection createSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + SourceSection section = new SourceSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public ScopeSection createScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + ScopeSection section = new ScopeSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public DescriptionSourceSection createDescriptionSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + DescriptionSourceSection section = new DescriptionSourceSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public TypeDesignationSection createTypeDesignationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + TypeDesignationSection section = new TypeDesignationSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public StateDataSection createStateDataSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + StateDataSection section = new StateDataSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public StatisticalMeasurementValueSection createStatisticalMeasurementValueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + StatisticalMeasurementValueSection section = new StatisticalMeasurementValueSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public DescribedSpecimenSection createDescribedSpecimenSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + DescribedSpecimenSection section = new DescribedSpecimenSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public CollectingAreasDetailSection createCollectingAreasDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + CollectingAreasDetailSection section = new CollectingAreasDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public SpecimenCollectionDetailSection createSpecimenCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + SpecimenCollectionDetailSection section = new SpecimenCollectionDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public SourceCollectionDetailSection createSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + SourceCollectionDetailSection section = new SourceCollectionDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + 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); + return section; + } + + public MemberDetailSection createMemberDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + MemberDetailSection section = new MemberDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public GrantedAuthorityDetailSection createGrantedAuthorityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + GrantedAuthorityDetailSection section = new GrantedAuthorityDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public GroupsByUserDetailSection createGroupsByUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + GroupsByUserDetailSection section = new GroupsByUserDetailSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); + return section; + } + + public TaxonomicScopeSection createTaxonomicScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ + TaxonomicScopeSection section = new TaxonomicScopeSection(this, conversation, parentElement, style); + addAndAdaptSection(parentElement, section); return section; } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java index 2462dd3c9..f338bc217 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/TeamDetailElement.java @@ -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. */ @@ -12,7 +12,7 @@ package eu.etaxonomy.taxeditor.ui.section.agent; import java.util.Arrays; -import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.forms.widgets.ExpandableComposite; import eu.etaxonomy.cdm.model.agent.Team; import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; @@ -20,14 +20,13 @@ import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent; import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; import eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement; -import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType; import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement; /** ** TeamDetailElement class. *
- * + * * @author n.hoffmann * @created Apr 26, 2010 * @version 1.0 @@ -42,7 +41,7 @@ public class TeamDetailElement extends AbstractIdentifiableEntityDetailElementConstructor for CategoricalDataDetailElement.
* @@ -42,11 +41,11 @@ public class CategoricalDataDetailElement extends AbstractDetailedDescriptionDet protected void createControls(ICdmFormElement formElement, CategoricalData entity, int style) { checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style); - section_stateData = (StateDataSection) formFactory.createEntityDetailSection(EntityDetailType.STATE_DATA, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED); + section_stateData = formFactory.createStateDataSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); section_stateData.setEntity(entity); section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); } - + /** {@inheritDoc} */ @Override public void setEntity(CategoricalData entity) { diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java index 11cbe80cf..1315a206d 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java @@ -1,16 +1,15 @@ /** - * + * */ package eu.etaxonomy.taxeditor.ui.section.description.detail; -import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.forms.widgets.ExpandableComposite; import eu.etaxonomy.cdm.model.description.MeasurementUnit; import eu.etaxonomy.cdm.model.description.QuantitativeData; import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; -import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType; import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueSection; @@ -25,7 +24,7 @@ public class QuantitativeDataDetailElement extends private TermComboElementConstructor for QuantitativeDataDetailElement.
* @@ -44,11 +43,11 @@ public class QuantitativeDataDetailElement extends protected void createControls(ICdmFormElement formElement, QuantitativeData entity, int style) { combo_mesaurementUnit = formFactory.createTermComboElement(MeasurementUnit.class, formElement, "Measurement Unit", entity.getUnit(), style); - section_statisticalMeasurementValues = (StatisticalMeasurementValueSection) formFactory.createEntityDetailSection(EntityDetailType.STATISTICAL_MEASUREMENT_VALUE, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED); + section_statisticalMeasurementValues = formFactory.createStatisticalMeasurementValueSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); section_statisticalMeasurementValues.setEntity(entity); section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); } - + /* (non-Javadoc) * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java.lang.Object) */ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java index 1d49eae84..299bd27b4 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java @@ -1,5 +1,5 @@ /** - * + * */ package eu.etaxonomy.taxeditor.ui.section.media; @@ -13,7 +13,6 @@ import eu.etaxonomy.cdm.model.media.Media; import eu.etaxonomy.taxeditor.store.CdmStore; import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; -import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType; import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; @@ -25,7 +24,7 @@ import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; ** MediaElement class. *
- * + * * @author n.hoffmann * @created Nov 17, 2009 * @version 1.0 @@ -41,7 +40,7 @@ public class MediaElement extends AbstractEntityCollectionElement* Constructor for MediaElement. *
- * + * * @param formElement * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} * object. @@ -63,28 +62,19 @@ public class MediaElement extends AbstractEntityCollectionElement* DerivedUnitBaseDetailElement class. *
- * + * * @author n.hoffmann * @created Jun 24, 2010 * @version 1.0 @@ -59,7 +58,7 @@ public class DerivedUnitBaseDetailElement extends ** Constructor for DerivedUnitBaseDetailElement. *
- * + * * @param formFactory * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} * object. @@ -74,57 +73,39 @@ public class DerivedUnitBaseDetailElement extends /** {@inheritDoc} */ @Override - protected void createControls(ICdmFormElement formElement, - DerivedUnitFacade entity, int style) { - // Disable for now - // text_derivedUnitDefinitions = - // formFactory.createTextWithLabelElement(formElement, - // "Specimen Definition", - // facade.getDerivedUnitDefinition(CdmStore.getDefaultLanguage()), - // style); - text_barcode = formFactory.createTextWithLabelElement(formElement, - "Barcode", entity.getBarcode(), style); - text_catalogNumber = formFactory - .createTextWithLabelElement(formElement, "Catalog Number", - entity.getCatalogNumber(), style); - - try { - combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class, - formElement, "Preservation Method", - entity.getPreservationMethod(), style); - } catch (MethodNotSupportedByDerivedUnitTypeException e) { - // we ignore this - StoreUtil.info(e.getMessage()); - } - selection_storedUnder = formFactory - .createSelectionElement(TaxonNameBase.class, - getConversationHolder(), formElement, "Stored Under", - entity.getStoredUnder(), EntitySelectionElement.ALL, - style); - - try { - text_exsicatum = formFactory.createTextWithLabelElement( - formElement, "Exsiccatum", entity.getExsiccatum(), style); - } catch (MethodNotSupportedByDerivedUnitTypeException e) { - // we ignore this - StoreUtil.info(e.getMessage()); - } - - section_duplicates = (SpecimenCollectionDetailSection) formFactory - .createEntityDetailSection( - EntityDetailType.SPECIMEN_COLLECTION, - getConversationHolder(), formElement, Section.TWISTIE); - section_duplicates - .setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); - section_duplicates.setEntity(entity); - - section_source = (SourceCollectionDetailSection) formFactory - .createEntityDetailSection( - EntityDetailType.IDENTIFIABLE_SOURCE_COLLECTION, - getConversationHolder(), formElement, Section.TWISTIE); - section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); - section_source.setEntity(entity); - } + protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) { + // Disable for now + // text_derivedUnitDefinitions = + // formFactory.createTextWithLabelElement(formElement, + // "Specimen Definition", + // facade.getDerivedUnitDefinition(CdmStore.getDefaultLanguage()), + // style); + text_barcode = formFactory.createTextWithLabelElement(formElement, "Barcode", entity.getBarcode(), style); + text_catalogNumber = formFactory.createTextWithLabelElement(formElement, "Catalog Number", entity.getCatalogNumber(), style); + + try { + combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class, formElement, "Preservation Method", entity.getPreservationMethod(), style); + } catch (MethodNotSupportedByDerivedUnitTypeException e) { + // we ignore this + AbstractUtility.info(e.getMessage()); + } + selection_storedUnder = formFactory.createSelectionElement(TaxonNameBase.class, getConversationHolder(), formElement, "Stored Under", entity.getStoredUnder(), EntitySelectionElement.ALL, style); + + try { + text_exsicatum = formFactory.createTextWithLabelElement(formElement, "Exsiccatum", entity.getExsiccatum(), style); + } catch (MethodNotSupportedByDerivedUnitTypeException e) { + // we ignore this + AbstractUtility.info(e.getMessage()); + } + + section_duplicates = formFactory.createSpecimenCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE); + section_duplicates.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); + section_duplicates.setEntity(entity); + + section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE); + section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); + section_source.setEntity(entity); + } /** {@inheritDoc} */ @Override @@ -142,7 +123,7 @@ public class DerivedUnitBaseDetailElement extends getEntity().setPreservationMethod( combo_preservationMethod.getSelection()); } catch (MethodNotSupportedByDerivedUnitTypeException e) { - StoreUtil + AbstractUtility .errorDialog( "MethodNotSupportedByDerivedUnitTypeException", this, @@ -155,7 +136,7 @@ public class DerivedUnitBaseDetailElement extends try { getEntity().setExsiccatum(text_exsicatum.getText()); } catch (Exception e) { - StoreUtil.error(this.getClass(), e); + AbstractUtility.error(this.getClass(), e); } } } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java index 7fdfd02f1..ea4d184a0 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DeterminationDetailElement.java @@ -1,21 +1,20 @@ // $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. */ package eu.etaxonomy.taxeditor.ui.section.occurrence; -import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.forms.widgets.ExpandableComposite; 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.element.CdmFormFactory.EntityDetailType; import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; @@ -27,9 +26,9 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; public class DeterminationDetailElement extends AbstractCdmDetailElement