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
.api
.conversation
.ConversationHolder
;
15 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
16 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
.NomenclaturalAuthorTeamSelectionDialog
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
22 * NomenclaturalAuthorTeamSelectionElement class.
26 * @created Jun 22, 2010
29 public class NomenclaturalAuthorTeamSelectionElement
extends
30 EntitySelectionElement
<Team
> {
32 public static final int DEFAULT
= EDITABLE
| SELECTABLE
| DELETABLE
;
36 * Constructor for NomenclaturalAuthorTeamSelectionElement.
40 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
43 * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
45 * @param parentElement
46 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
49 * a {@link java.lang.String} object.
51 * a {@link eu.etaxonomy.cdm.model.agent.Team} object.
55 public NomenclaturalAuthorTeamSelectionElement(CdmFormFactory formFactory
,
56 ConversationHolder conversation
, ICdmFormElement parentElement
,
57 String labelString
, Team entity
, int mode
, int style
) {
58 super(formFactory
, conversation
, 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(), entity
);
73 setSelectionInternal(newSelection
);