package eu.etaxonomy.taxeditor.ui.section.classification;
-import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.common.LanguageString;
+import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
public class ClassificationDetailElement extends
AbstractCdmDetailElement<Classification> {
- private static final Logger logger = Logger
- .getLogger(ClassificationDetailElement.class);
-
private TextWithLabelElement text_treeLabel;
- private ReferenceSelectionElement selection_reference;
+ private EntitySelectionElement<Reference> selection_reference;
private TextWithLabelElement text_microReference;
* </p>
*
* @param formFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
*/
public ClassificationDetailElement(CdmFormFactory formFactory,
text_treeLabel = formFactory.createTextWithLabelElement(formElement,
"Label", entity != null ? entity.getTitleCache() : null,
SWT.NULL);
- selection_reference = (ReferenceSelectionElement) formFactory
- .createSelectionElement(SelectionType.REFERENCE,
+ selection_reference = formFactory
+ .createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Reference",
entity != null ? entity.getReference() : null,
- ReferenceSelectionElement.DEFAULT, SWT.NULL);
+ EntitySelectionElement.ALL, SWT.NULL);
text_microReference = formFactory.createTextWithLabelElement(
formElement, "Reference Detail",
entity != null ? entity.getMicroReference() : null, SWT.NULL);
} else if (eventSource == text_microReference) {
getEntity().setMicroReference(text_microReference.getText());
}
-
- firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
}
}