2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.ui
.selection
;
12 import org
.eclipse
.swt
.events
.SelectionEvent
;
14 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
15 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
.NomenclaturalAuthorTeamSelectionDialog
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
21 * NomenclaturalAuthorTeamSelectionElement class.
25 * @created Jun 22, 2010
28 public class NomenclaturalAuthorTeamSelectionElement
extends
29 EntitySelectionElement
<Team
> {
31 public static final int DEFAULT
= EDITABLE
| SELECTABLE
| DELETABLE
;
35 * Constructor for NomenclaturalAuthorTeamSelectionElement.
39 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
42 * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
44 * @param parentElement
45 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
48 * a {@link java.lang.String} object.
50 * a {@link eu.etaxonomy.cdm.model.agent.Team} object.
54 public NomenclaturalAuthorTeamSelectionElement(CdmFormFactory formFactory
,//ConversationHolder conversation,
55 ICdmFormElement parentElement
,
56 String labelString
, Team entity
, int mode
, int style
) {
57 super(formFactory
,// conversation,
58 parentElement
, Team
.class, labelString
, entity
,
64 protected String
getTitle() {
65 return (entity
!= null) ? entity
.getNomenclaturalTitle() : "";
70 public void widgetSelected(SelectionEvent e
) {
71 Team newSelection
= NomenclaturalAuthorTeamSelectionDialog
.select(
72 getShell(), //getConversationHolder(),
74 setSelectionInternal(newSelection
);