From 713fff1d0889570d984bf8e6c7b84a7a482dcdb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20M=C3=BCller?= Date: Mon, 29 Jun 2020 12:58:26 +0200 Subject: [PATCH] cleanup --- .../ui/section/AbstractCdmDetailElement.java | 20 ----------- .../AbstractEventDetailElement.java | 1 - ...actSpecimenOrObservationDetailElement.java | 10 ++++-- .../CollectingAreaDetailElement.java | 31 ---------------- .../CollectingAreasDetailSection.java | 36 ------------------- .../occurrence/CollectionDetailElement.java | 24 ------------- .../occurrence/CollectionWizardPage.java | 10 ------ 7 files changed, 8 insertions(+), 124 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java index f913508c2..69d248196 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java @@ -43,7 +43,6 @@ import eu.etaxonomy.taxeditor.ui.element.LabelElement; import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; /** - * * @author n.hoffmann * @created Feb 26, 2010 */ @@ -77,9 +76,6 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement /** * Sets the entity and updates controls - * - * @param entity - * a T object. */ @Override public void setEntity(T entity) { @@ -171,13 +167,11 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement } } - /** {@inheritDoc} */ @Override public void setEnabled(boolean enabled) { setEnabled(enabled, null); } - /** {@inheritDoc} */ @Override public void setIrrelevant(boolean irrelevant) { this.irrelevant = irrelevant; @@ -186,19 +180,10 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement /** * Create all content elements - * - * @param formElement - * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} - * object. - * @param entity - * a T object. - * @param style - * a int. */ protected abstract void createControls(ICdmFormElement formElement, T entity, int style); - /** {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent event) { if (event == null) { @@ -253,9 +238,6 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement /** * Gets called when the source of the event is a child widget of this * widget. - * - * @param eventSource - * a {@link java.lang.Object} object. */ public abstract void handleEvent(Object eventSource); @@ -278,7 +260,6 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement "Parent element should be IConversationEnabled"); } - /** {@inheritDoc} */ @Override public void update(CdmDataChangeMap changeEvents) { } @@ -290,7 +271,6 @@ public abstract class AbstractCdmDetailElement extends AbstractCdmFormElement } } - protected void updateControlStates(){ Collection except = new ArrayList(); for(ICdmFormElement formElement:getElements()){ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java index 8868fdf90..7eb029ea1 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java @@ -6,7 +6,6 @@ * 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.swt.events.SelectionListener; diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractSpecimenOrObservationDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractSpecimenOrObservationDetailElement.java index 724bd82f6..30e611c7a 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractSpecimenOrObservationDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractSpecimenOrObservationDetailElement.java @@ -1,3 +1,11 @@ +/** + * Copyright (C) 2007 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; @@ -21,7 +29,6 @@ public abstract class AbstractSpecimenOrObservationDetailElement extends Abstrac // TODO Auto-generated constructor stub } - /** {@inheritDoc} */ @Override protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) { @@ -32,7 +39,6 @@ public abstract class AbstractSpecimenOrObservationDetailElement extends Abstrac combo_sex = formFactory.createDefinedTermComboElement(TermType.Sex, formElement, "Sex", entity.getSex(),style); } - /** {@inheritDoc} */ @Override public void handleEvent(Object eventSource) { if(eventSource == combo_kindOfUnit){ diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreaDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreaDetailElement.java index 5f6e4d1d5..767fe11e3 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreaDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreaDetailElement.java @@ -6,7 +6,6 @@ * 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.swt.events.SelectionListener; @@ -19,13 +18,8 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; /** - *

- * CollectingAreasDetailElement class. - *

- * * @author n.hoffmann * @created Oct 14, 2010 - * @version 1.0 */ public class CollectingAreaDetailElement extends AbstractEntityCollectionElement { @@ -56,27 +50,11 @@ public class CollectingAreaDetailElement extends super(formFactory, section, entity, removeListener, null, style); } - /* - * (non-Javadoc) - * - * @see - * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#setEntity - * (java.lang.Object) - */ - /** {@inheritDoc} */ @Override public void setEntity(NamedArea entity) { selection_namedArea.setEntity(entity); } - /* - * (non-Javadoc) - * - * @see - * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls - * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int) - */ - /** {@inheritDoc} */ @Override public void createControls(ICdmFormElement formElement, int style) { selection_namedArea = formFactory.createSelectionElement(NamedArea.class, //getConversationHolder(), @@ -84,19 +62,10 @@ public class CollectingAreaDetailElement extends null, EntitySelectionElement.NOTHING, style); } - /* - * (non-Javadoc) - * - * @see - * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent - * (java.lang.Object) - */ - /** {@inheritDoc} */ @Override public void handleEvent(Object eventSource) { if (eventSource == selection_namedArea) { setEntity(selection_namedArea.getSelection()); } } - } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java index f5fabf873..fb17ab5f5 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java @@ -23,13 +23,8 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection; import eu.etaxonomy.taxeditor.ui.section.DefaultCdmBaseComparator; /** - *

- * CollectingAreasDetailSection class. - *

- * * @author n.hoffmann * @created Oct 14, 2010 - * @version 1.0 */ public class CollectingAreasDetailSection extends AbstractEntityCollectionSection { @@ -46,10 +41,6 @@ public class CollectingAreasDetailSection extends AbstractEntityCollectionSectio super(formFactory, conversation, parentElement, "Collecting Areas", style); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getCollection(java.lang.Object) - */ - /** {@inheritDoc} */ @Override public Collection getCollection(DerivedUnitFacade entity) { return entity.getCollectingAreas(); @@ -60,10 +51,6 @@ public class CollectingAreasDetailSection extends AbstractEntityCollectionSectio return new DefaultCdmBaseComparator<>(); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#createNewElement() - */ - /** {@inheritDoc} */ @Override public NamedArea createNewElement() { NamedArea selection = NamedAreaSelectionDialog.select(getLayoutComposite().getShell(), //getConversationHolder(), @@ -72,56 +59,33 @@ public class CollectingAreasDetailSection extends AbstractEntityCollectionSectio return selection; } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#addElement(eu.etaxonomy.cdm.model.common.IVersionableEntity) - */ - /** {@inheritDoc} */ @Override public void addElement(NamedArea element) { getEntity().addCollectingArea(element); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#removeElement(eu.etaxonomy.cdm.model.common.IVersionableEntity) - */ - /** {@inheritDoc} */ @Override public void removeElement(NamedArea element) { getEntity().removeCollectingArea(element); } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getEmptyString() - */ - /** {@inheritDoc} */ @Override public String getEmptyString() { return "No collecting areas yet."; } - /* (non-Javadoc) - * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString() - */ - /** {@inheritDoc} */ @Override protected String getTooltipString() { return "Add a collecting area"; } - /** - * {@inheritDoc} - */ @Override public NamedArea addExisting() { return null; } - /** - * {@inheritDoc} - */ @Override public boolean allowAddExisting() { return false; } - } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionDetailElement.java index f4a12cb1e..b4a0c868c 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionDetailElement.java @@ -19,13 +19,8 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; /** - *

- * CollectionDetailElement class. - *

- * * @author n.hoffmann * @created Oct 13, 2010 - * @version 1.0 */ public class CollectionDetailElement extends AbstractCdmDetailElement { @@ -61,15 +56,6 @@ public class CollectionDetailElement extends super(formFactory, formElement); } - /* - * (non-Javadoc) - * - * @see - * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls - * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, - * eu.etaxonomy.cdm.model.common.IAnnotatableEntity, int) - */ - /** {@inheritDoc} */ @Override protected void createControls(ICdmFormElement formElement, Collection entity, int style) { @@ -98,14 +84,6 @@ public class CollectionDetailElement extends EntitySelectionElement.ALL, style); } - /* - * (non-Javadoc) - * - * @see - * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java - * .lang.Object) - */ - /** {@inheritDoc} */ @Override public void handleEvent(Object eventSource) { if (eventSource == text_titleCache) { @@ -128,7 +106,5 @@ public class CollectionDetailElement extends if (eventSource != text_titleCache) { text_titleCache.setText(getEntity().getTitleCache()); } - } - } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionWizardPage.java index 654fff7f7..d875d3529 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionWizardPage.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectionWizardPage.java @@ -6,7 +6,6 @@ * 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.conversation.ConversationHolder; @@ -21,7 +20,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; * * @author n.hoffmann * @created Oct 13, 2010 - * @version 1.0 */ public class CollectionWizardPage extends AbstractCdmEntityWizardPage { @@ -38,23 +36,15 @@ public class CollectionWizardPage extends AbstractCdmEntityWizardPage createElement(ICdmFormElement rootElement) { CollectionDetailElement collectionDetailElement = formFactory.createCollectionDetailElement(rootElement); collectionDetailElement.setEntity(entity); return collectionDetailElement; } - } -- 2.34.1