(no commit message)
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / selection / SynonymSelectionElement.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10
11 package eu.etaxonomy.taxeditor.ui.selection;
12
13 import org.eclipse.swt.events.SelectionEvent;
14
15 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 import eu.etaxonomy.cdm.model.taxon.Synonym;
17 import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
18 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
20
21 /**
22 * @author n.hoffmann
23 * @created Dec 9, 2010
24 * @version 1.0
25 */
26 public class SynonymSelectionElement extends AbstractSelectionElement<Synonym> {
27
28 public static final int DEFAULT = SELECTABLE | DELETABLE;
29
30 /**
31 * @param formFactory
32 * @param conversation
33 * @param parentElement
34 * @param labelString
35 * @param entity
36 * @param isEditable
37 * @param isSelectable
38 * @param isDeletable
39 * @param style
40 */
41 public SynonymSelectionElement(CdmFormFactory formFactory,
42 ConversationHolder conversation, ICdmFormElement parentElement,
43 String labelString, Synonym entity, int mode, int style) {
44 super(formFactory, conversation, parentElement, labelString, entity,
45 mode, style);
46 }
47
48 /*
49 * (non-Javadoc)
50 *
51 * @see
52 * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
53 * .events.SelectionEvent)
54 */
55 @Override
56 public void widgetSelected(SelectionEvent e) {
57 Synonym newSelection = TaxonBaseSelectionDialog.selectSynonym(
58 getShell(), getConversationHolder());
59 setSelectionInternal(newSelection);
60 }
61
62 }