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
.AgentBase
;
17 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
.AgentSelectionDialog
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
23 * AgentSelectionElement class.
27 * @created Jun 22, 2010
30 public class AgentSelectionElement
extends AbstractSelectionElement
<AgentBase
> {
32 public static final int DEFAULT
= EDITABLE
| SELECTABLE
| DELETABLE
;
36 * Constructor for AgentSelectionElement.
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.AgentBase} object.
55 public AgentSelectionElement(CdmFormFactory formFactory
,
56 ConversationHolder conversation
, ICdmFormElement parentElement
,
57 String labelString
, AgentBase entity
, int mode
, int style
) {
58 super(formFactory
, conversation
, parentElement
, labelString
, entity
,
64 public void widgetSelected(SelectionEvent e
) {
65 AgentBase newSelection
= AgentSelectionDialog
.select(getShell(),
66 getConversationHolder(), entity
);
67 setSelectionInternal(newSelection
);