Merged refactoring from development branch.
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / ui / selection / FeatureSelectionElement.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.description.Feature;
17 import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureSelectionDialog;
18 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
20
21 /**
22 * @author n.hoffmann
23 * @created Dec 3, 2010
24 * @version 1.0
25 */
26 public class FeatureSelectionElement extends AbstractSelectionElement<Feature> {
27
28 /**
29 *
30 * @param formFactory
31 * @param conversation
32 * @param parentElement
33 * @param labelString
34 * @param entity
35 * @param style
36 */
37 public FeatureSelectionElement(CdmFormFactory formFactory,
38 ConversationHolder conversation, ICdmFormElement parentElement,
39 String labelString, Feature entity, int style) {
40 super(formFactory, conversation, parentElement, labelString, entity,
41 true, false, true, style);
42 }
43
44 /* (non-Javadoc)
45 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
46 */
47 @Override
48 public void widgetSelected(SelectionEvent e) {
49 Feature newSelection = FeatureSelectionDialog.select(getShell(), getConversationHolder(), entity);
50 setSelectionInternal(newSelection);
51 }
52
53 }