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