import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.element.RootElement;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
private final CdmFormFactory formFactory;
- private NameSelectionElement selection_relatedTo;
+ private EntitySelectionElement<TaxonNameBase> selection_relatedTo;
private TermComboElement<NameRelationshipType> combo_relationshipType;
- private final NameRelationshipDetailSection callingSection;
-
private final TaxonNameBase entity;
private NameRelationshipType type;
super("NameRelationshipWizardPage");
setTitle("New Name Relationship");
setDescription(callingSection.getEntity().getTitleCache());
- this.callingSection = callingSection;
this.entity = callingSection.getEntity();
this.formFactory = callingSection.getFormFactory();
Composite control = formFactory.createComposite(parent);
- control.setLayout(CdmFormFactory.LAYOUT(2, false));
+ control.setLayout(LayoutConstants.LAYOUT(2, false));
rootElement = new RootElement(formFactory, control);
combo_relationshipType = formFactory.createTermComboElement(NameRelationshipType.class,
rootElement, "Name Relationship Type", null, SWT.NULL);
- selection_relatedTo = (NameSelectionElement) formFactory
- .createSelectionElement(SelectionType.NAME,
+ selection_relatedTo = formFactory
+ .createSelectionElement(TaxonNameBase.class,
((NameRelationshipWizard) getWizard())
.getConversationHolder(), rootElement,
- "Related to", null, NameSelectionElement.DEFAULT,
+ "Related to", null, EntitySelectionElement.ALL,
SWT.NULL);
setControl(control);