1 |
cfcb0ce6
|
n.hoffmann
|
// $Id$
|
2 |
|
|
/**
|
3 |
f561b00c
|
n.hoffmann
|
* 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 |
cfcb0ce6
|
n.hoffmann
|
|
11 |
f211dd28
|
n.hoffmann
|
package eu.etaxonomy.taxeditor.ui.selection;
|
12 |
cfcb0ce6
|
n.hoffmann
|
|
13 |
|
|
import org.eclipse.swt.events.SelectionEvent;
|
14 |
|
|
|
15 |
|
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
16 |
|
|
import eu.etaxonomy.cdm.model.description.FeatureTree;
|
17 |
f211dd28
|
n.hoffmann
|
import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.FeatureTreeSelectionDialog;
|
18 |
|
|
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
|
19 |
|
|
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
|
20 |
cfcb0ce6
|
n.hoffmann
|
|
21 |
|
|
/**
|
22 |
f561b00c
|
n.hoffmann
|
* <p>
|
23 |
|
|
* FeatureTreeSelectionElement class.
|
24 |
|
|
* </p>
|
25 |
|
|
*
|
26 |
cfcb0ce6
|
n.hoffmann
|
* @author n.hoffmann
|
27 |
|
|
* @created Sep 17, 2010
|
28 |
|
|
* @version 1.0
|
29 |
|
|
*/
|
30 |
f561b00c
|
n.hoffmann
|
public class FeatureTreeSelectionElement extends
|
31 |
|
|
AbstractSelectionElement<FeatureTree> {
|
32 |
cfcb0ce6
|
n.hoffmann
|
|
33 |
f561b00c
|
n.hoffmann
|
public static final int DEFAULT = DELETABLE;
|
34 |
cfcb0ce6
|
n.hoffmann
|
|
35 |
3be6ef3e
|
n.hoffmann
|
/**
|
36 |
f561b00c
|
n.hoffmann
|
* <p>
|
37 |
|
|
* Constructor for FeatureTreeSelectionElement.
|
38 |
|
|
* </p>
|
39 |
|
|
*
|
40 |
|
|
* @param formFactory
|
41 |
|
|
* a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
|
42 |
|
|
* object.
|
43 |
|
|
* @param conversation
|
44 |
|
|
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
|
45 |
|
|
* object.
|
46 |
|
|
* @param parentElement
|
47 |
|
|
* a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
|
48 |
|
|
* object.
|
49 |
|
|
* @param labelString
|
50 |
|
|
* a {@link java.lang.String} object.
|
51 |
|
|
* @param entity
|
52 |
|
|
* a {@link eu.etaxonomy.cdm.model.description.FeatureTree}
|
53 |
|
|
* object.
|
54 |
|
|
* @param style
|
55 |
|
|
* a int.
|
56 |
3be6ef3e
|
n.hoffmann
|
*/
|
57 |
cfcb0ce6
|
n.hoffmann
|
public FeatureTreeSelectionElement(CdmFormFactory formFactory,
|
58 |
|
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
59 |
f561b00c
|
n.hoffmann
|
String labelString, FeatureTree entity, int mode, int style) {
|
60 |
cfcb0ce6
|
n.hoffmann
|
super(formFactory, conversation, parentElement, labelString, entity,
|
61 |
f561b00c
|
n.hoffmann
|
mode, style);
|
62 |
cfcb0ce6
|
n.hoffmann
|
}
|
63 |
f561b00c
|
n.hoffmann
|
|
64 |
|
|
/*
|
65 |
|
|
* (non-Javadoc)
|
66 |
|
|
*
|
67 |
|
|
* @see
|
68 |
|
|
* org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
|
69 |
|
|
* .events.SelectionEvent)
|
70 |
cfcb0ce6
|
n.hoffmann
|
*/
|
71 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
72 |
cfcb0ce6
|
n.hoffmann
|
@Override
|
73 |
|
|
public void widgetSelected(SelectionEvent e) {
|
74 |
f561b00c
|
n.hoffmann
|
FeatureTree newSelection = FeatureTreeSelectionDialog.select(
|
75 |
|
|
getShell(), getConversationHolder(), entity);
|
76 |
cfcb0ce6
|
n.hoffmann
|
setSelectionInternal(newSelection);
|
77 |
|
|
}
|
78 |
|
|
}
|