Moved "Original Name" field to subclass (#5133)
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / supplemental / AbstractReferencedEntityElement.java
index c77b5379e1ee2abed1c92d242b0a76eb25bc2a72..aea6e2da11ed2a136bcfafe9e08b43648ab7eb52 100644 (file)
@@ -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.
  */
@@ -23,10 +23,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
 
 /**
- * <p>
- * Abstract AbstractReferencedEntityElement class.
- * </p>
- * 
  * @author n.hoffmann
  * @created Mar 25, 2010
  * @version 1.0
@@ -37,43 +33,12 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
        protected EntitySelectionElement<Reference> selection_reference;
        protected TextWithLabelElement text_referenceDetail;
 
-       protected TextWithLabelElement text_originaleNameString;
-
-       private boolean hasOriginalNameString = false;
-
-       /**
-        * <p>
-        * Constructor for AbstractReferencedEntityElement.
-        * </p>
-        * 
-        * @param formFactory
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
-        *            object.
-        * @param section
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param entity
-        *            a T object.
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        * @param <T>
-        *            a T object.
-        */
        public AbstractReferencedEntityElement(CdmFormFactory formFactory,
                        AbstractFormSection section, T entity,
                        SelectionListener removeListener, int style) {
                super(formFactory, section, entity, removeListener, null, style);
        }
 
-       /*
-        * (non-Javadoc)
-        * 
-        * @see
-        * eu.etaxonomy.taxeditor.forms.section.AbstractEntityCollectionElement#
-        * createControls(eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
-        */
        /** {@inheritDoc} */
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
@@ -83,69 +48,14 @@ public abstract class AbstractReferencedEntityElement<T extends ReferencedEntity
                                                null, EntitySelectionElement.ALL, style);
                text_referenceDetail = formFactory.createTextWithLabelElement(
                                formElement, "Reference Detail", null, SWT.NULL);
-               if (hasOriginalNameString)
-                       text_originaleNameString = formFactory.createTextWithLabelElement(
-                                       formElement, "Original Name", null, SWT.NULL);
        }
 
-       /**
-        * <p>
-        * setEntity
-        * </p>
-        * 
-        * @param entity
-        *            a T object.
-        */
        @Override
        public void setEntity(T entity) {
                this.entity = entity;
 
                selection_reference.setEntity(entity.getCitation());
                text_referenceDetail.setText(entity.getCitationMicroReference());
-               if (hasOriginalNameString)
-                       text_originaleNameString.setText(entity.getOriginalNameString());
-               // // remove old listeners
-               // clearEditButtonSelectionListener();
-               //
-               // addEditButtonSelectionListener(new
-               // BulkEditorOpeningSelectionListener(entity.getCitation()));
-               //
-       };
-
-       //
-       // public void addEditButtonSelectionListener(SelectionListener listener){
-       // selection_reference.addEditButtonSelectionListener(listener);
-       // }
-       //
-       // public void removeEditButtonSelectionListener(SelectionListener
-       // listener){
-       // selection_reference.removeEditorButtonSelectionListener(listener);
-       // }
-       //
-       // public void clearEditButtonSelectionListener(){
-       // selection_reference.clearEditButtonSelectionListener();
-       // }
-
-       /**
-        * <p>
-        * Setter for the field <code>hasOriginalNameString</code>.
-        * </p>
-        * 
-        * @param hasOriginalNameString
-        *            a boolean.
-        */
-       public void setHasOriginalNameString(boolean hasOriginalNameString) {
-               this.hasOriginalNameString = hasOriginalNameString;
        }
 
-       /**
-        * <p>
-        * hasOriginalNameString
-        * </p>
-        * 
-        * @return a boolean.
-        */
-       public boolean hasOriginalNameString() {
-               return hasOriginalNameString;
-       }
 }