import java.util.Arrays;
import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
+import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.taxeditor.model.AuthorHelper;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
/**
AbstractIdentifiableEntityDetailElement<NonViralName> implements
IEnableableFormElement {
- private AbstractSelectionElement selection_exBasionymAuthorTeam;
- private AbstractSelectionElement selection_basionymAuthorTeam;
- private AbstractSelectionElement selection_exCombinationAuthorTeam;
- private AbstractSelectionElement selection_combinationAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_exBasionymAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_basionymAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_exCombinationAuthorTeam;
+ private NomenclaturalAuthorTeamSelectionElement selection_combinationAuthorTeam;
/**
* <p>
toggleable_cache = formFactory.createToggleableTextField(this,
"Authorship Cache", entity.getAuthorshipCache(),
entity.isProtectedAuthorshipCache(), style);
-
- selection_combinationAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_combinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Author",
AuthorHelper.getAuthor(entity.getCombinationAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_combinationAuthorTeam);
- selection_exCombinationAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_exCombinationAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Ex Author",
AuthorHelper.getAuthor(entity.getExCombinationAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_exCombinationAuthorTeam);
- selection_basionymAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_basionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Basionym Author",
AuthorHelper.getAuthor(entity.getBasionymAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_basionymAuthorTeam);
- selection_exBasionymAuthorTeam = formFactory.createSelectionElement(
- SelectionType.AUTHOR_TEAM, getConversationHolder(),
+ selection_exBasionymAuthorTeam = formFactory.createNomenclaturalAuthorTeamSelectionElement(
+ getConversationHolder(),
formElement, "Ex Basionym Author",
AuthorHelper.getAuthor(entity.getExBasionymAuthorTeam()),
- NomenclaturalAuthorTeamSelectionElement.DEFAULT, style);
+ EntitySelectionElement.ALL, style);
addElement(selection_exBasionymAuthorTeam);
}
if (getEntity() == null) {
setEntity(NonViralName.NewInstance(null));
}
- NonViralName nonViralName = getEntity();
-
+
super.updateContent();
toggleable_cache.setEnabled(getEntity().isProtectedAuthorshipCache());