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.forms.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.TaxonomicTree;
|
17
|
import eu.etaxonomy.taxeditor.dialogs.filteredSelection.FilteredClassificationSelectionDialog;
|
18
|
import eu.etaxonomy.taxeditor.forms.CdmFormFactory;
|
19
|
import eu.etaxonomy.taxeditor.forms.ICdmFormElement;
|
20
|
|
21
|
/**
|
22
|
* <p>ClassificationSelectionElement class.</p>
|
23
|
*
|
24
|
* @author n.hoffmann
|
25
|
* @created Sep 27, 2010
|
26
|
* @version 1.0
|
27
|
*/
|
28
|
public class ClassificationSelectionElement extends AbstractSelectionElement<TaxonomicTree> {
|
29
|
|
30
|
/**
|
31
|
* <p>Constructor for ClassificationSelectionElement.</p>
|
32
|
*
|
33
|
* @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
|
34
|
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
|
35
|
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
|
36
|
* @param labelString a {@link java.lang.String} object.
|
37
|
* @param entity a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
|
38
|
* @param style a int.
|
39
|
*/
|
40
|
public ClassificationSelectionElement(CdmFormFactory formFactory,
|
41
|
ConversationHolder conversation, ICdmFormElement parentElement,
|
42
|
String labelString, TaxonomicTree entity, int style) {
|
43
|
super(formFactory, conversation, parentElement, labelString, entity,
|
44
|
false, false, true, style);
|
45
|
}
|
46
|
|
47
|
/* (non-Javadoc)
|
48
|
* @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
49
|
*/
|
50
|
/** {@inheritDoc} */
|
51
|
@Override
|
52
|
public void widgetSelected(SelectionEvent e) {
|
53
|
TaxonomicTree newSelection = FilteredClassificationSelectionDialog.select(getShell(), getConversationHolder());
|
54
|
setSelectionInternal(newSelection);
|
55
|
}
|
56
|
|
57
|
}
|