3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.selection
;
13 import org
.eclipse
.swt
.events
.SelectionEvent
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.agent
.Institution
;
17 import eu
.etaxonomy
.taxeditor
.ui
.dialogs
.filteredSelection
.InstitutionSelectionDialog
;
18 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
22 * <p>InstitutionSelectionElement class.</p>
25 * @created Nov 17, 2009
28 public class InstitutionSelectionElement
extends
29 AbstractSelectionElement
<Institution
> {
32 * <p>Constructor for InstitutionSelectionElement.</p>
34 * @param labelString a {@link java.lang.String} object.
35 * @param selection a {@link eu.etaxonomy.cdm.model.agent.Institution} object.
37 * @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
38 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
39 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
41 public InstitutionSelectionElement(CdmFormFactory toolkit
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
42 Institution selection
, int style
) {
43 super(toolkit
, conversation
, parentElement
, labelString
, selection
, true, true, true, style
);
47 public void widgetSelected(SelectionEvent e
) {
48 Institution newSelection
= InstitutionSelectionDialog
.select(getShell(), getConversationHolder(), entity
);
49 setSelectionInternal(newSelection
);