Revision f561b00c
Added by Niels Hoffmann about 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/FieldObservationSelectionElement.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 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 |
*/ |
|
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 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.ui.selection; |
12 | 12 |
|
... | ... | |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
20 | 20 |
|
21 | 21 |
/** |
22 |
* <p>FieldObservationSelectionElement class.</p> |
|
23 |
* |
|
22 |
* <p> |
|
23 |
* FieldObservationSelectionElement class. |
|
24 |
* </p> |
|
25 |
* |
|
24 | 26 |
* @author n.hoffmann |
25 | 27 |
* @created Jun 17, 2010 |
26 | 28 |
* @version 1.0 |
27 | 29 |
*/ |
28 | 30 |
public class FieldObservationSelectionElement extends |
29 | 31 |
AbstractSelectionElement<FieldObservation> { |
30 |
|
|
32 |
|
|
33 |
public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE; |
|
34 |
|
|
31 | 35 |
/** |
32 |
* <p>Constructor for FieldObservationSelectionElement.</p> |
|
33 |
* |
|
34 |
* @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object. |
|
35 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
36 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.ui.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. |
|
36 |
* <p> |
|
37 |
* Constructor for FieldObservationSelectionElement. |
|
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.occurrence.FieldObservation} |
|
53 |
* object. |
|
54 |
* @param style |
|
55 |
* a int. |
|
40 | 56 |
*/ |
41 |
public FieldObservationSelectionElement(CdmFormFactory formFactory, ConversationHolder conversation,
|
|
42 |
ICdmFormElement parentElement, String labelString,
|
|
43 |
FieldObservation entity, int style) {
|
|
57 |
public FieldObservationSelectionElement(CdmFormFactory formFactory, |
|
58 |
ConversationHolder conversation, ICdmFormElement parentElement,
|
|
59 |
String labelString, FieldObservation entity, int mode, int style) {
|
|
44 | 60 |
super(formFactory, conversation, parentElement, labelString, entity, |
45 |
true, true, true, style);
|
|
61 |
mode, style);
|
|
46 | 62 |
} |
47 |
|
|
63 |
|
|
48 | 64 |
/** {@inheritDoc} */ |
65 |
@Override |
|
49 | 66 |
public void widgetSelected(SelectionEvent e) { |
50 |
FieldObservation newSelection = FieldObservationSelectionDialog.select(getShell(), getConversationHolder(), entity); |
|
67 |
FieldObservation newSelection = FieldObservationSelectionDialog.select( |
|
68 |
getShell(), getConversationHolder(), entity); |
|
51 | 69 |
setSelectionInternal(newSelection); |
52 | 70 |
} |
53 | 71 |
} |
Also available in: Unified diff
Refactoring selection elements so they can be configured