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