3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.ui
.selection
;
13 import org
.eclipse
.swt
.events
.SelectionEvent
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.occurrence
.FieldObservation
;
17 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
.FieldObservationSelectionDialog
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
23 * FieldObservationSelectionElement class.
27 * @created Jun 17, 2010
30 public class FieldObservationSelectionElement
extends
31 AbstractSelectionElement
<FieldObservation
> {
33 public static final int DEFAULT
= EDITABLE
| SELECTABLE
| DELETABLE
;
37 * Constructor for FieldObservationSelectionElement.
41 * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
44 * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
46 * @param parentElement
47 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
50 * a {@link java.lang.String} object.
52 * a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation}
57 public FieldObservationSelectionElement(CdmFormFactory formFactory
,
58 ConversationHolder conversation
, ICdmFormElement parentElement
,
59 String labelString
, FieldObservation entity
, int mode
, int style
) {
60 super(formFactory
, conversation
, parentElement
, labelString
, entity
,
66 public void widgetSelected(SelectionEvent e
) {
67 FieldObservation newSelection
= FieldObservationSelectionDialog
.select(
68 getShell(), getConversationHolder(), entity
);
69 setSelectionInternal(newSelection
);