Project

General

Profile

Download (2.14 KB) Statistics
| Branch: | Tag: | Revision:
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.apache.log4j.Logger;
14
import org.eclipse.swt.events.SelectionEvent;
15

    
16
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17
import eu.etaxonomy.cdm.model.description.FeatureTree;
18
import eu.etaxonomy.taxeditor.dialogs.filteredSelection.FilteredFeatureTreeSelectionDialog;
19
import eu.etaxonomy.taxeditor.forms.CdmFormFactory;
20
import eu.etaxonomy.taxeditor.forms.ICdmFormElement;
21

    
22
/**
23
 * <p>FeatureTreeSelectionElement class.</p>
24
 *
25
 * @author n.hoffmann
26
 * @created Sep 17, 2010
27
 * @version 1.0
28
 */
29
public class FeatureTreeSelectionElement extends AbstractSelectionElement<FeatureTree> {
30

    
31

    
32
	private static final Logger logger = Logger
33
			.getLogger(FeatureTreeSelectionElement.class);
34

    
35
	/**
36
	 * <p>Constructor for FeatureTreeSelectionElement.</p>
37
	 *
38
	 * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
39
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
40
	 * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
41
	 * @param labelString a {@link java.lang.String} object.
42
	 * @param entity a {@link eu.etaxonomy.cdm.model.description.FeatureTree} object.
43
	 * @param style a int.
44
	 */
45
	public FeatureTreeSelectionElement(CdmFormFactory formFactory,
46
			ConversationHolder conversation, ICdmFormElement parentElement,
47
			String labelString, FeatureTree entity, int style) {
48
		super(formFactory, conversation, parentElement, labelString, entity,
49
				false, false, true, style);
50
	}
51
	
52
	/* (non-Javadoc)
53
	 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
54
	 */
55
	/** {@inheritDoc} */
56
	@Override
57
	public void widgetSelected(SelectionEvent e) {
58
		FeatureTree newSelection = FilteredFeatureTreeSelectionDialog.select(getShell(), getConversationHolder(), entity);
59
		setSelectionInternal(newSelection);
60
	}
61
}
(7-7/17)