-// $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.taxon;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* @author n.hoffmann
* @created Mar 29, 2011
- * @version 1.0
*/
public class TaxonDetailElement extends AbstractEntityCollectionElement<Taxon> {
private EntitySelectionElement<Taxon> selection_taxon;
- /**
- * @param formFactory
- * @param section
- * @param entity
- * @param removeListener
- * @param backgroundColor
- * @param style
- */
public TaxonDetailElement(CdmFormFactory formFactory,
- AbstractFormSection section, Taxon entity,
+ AbstractFormSection<?> section, Taxon entity,
SelectionListener removeListener, int style) {
super(formFactory, section, entity, removeListener, null, style);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#setEntity
- * (java.lang.Object)
- */
@Override
public void setEntity(Taxon entity) {
selection_taxon.setEntity(entity);
}
- /*
- * (non-Javadoc)
- *
- * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#
- * createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, int)
- */
@Override
public void createControls(ICdmFormElement element, int style) {
selection_taxon = formFactory
.createSelectionElement(Taxon.class,
- getConversationHolder(), element, "Taxon", null,
- EntitySelectionElement.NOTHING, style);
+ element, "Taxon", null,
+ EntitySelectionElement.SELECTABLE, style);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#handleEvent
- * (java.lang.Object)
- */
@Override
public void handleEvent(Object eventSource) {
if (eventSource == selection_taxon) {
setEntity(selection_taxon.getSelection());
}
}
-
-}
+}
\ No newline at end of file