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
.forms
.selection
;
13 import org
.eclipse
.swt
.events
.SelectionEvent
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnitBase
;
17 import eu
.etaxonomy
.taxeditor
.dialogs
.filteredSelection
.DerivedUnitSelectionDialog
;
18 import eu
.etaxonomy
.taxeditor
.forms
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.forms
.ICdmFormElement
;
22 * <p>DerivedUnitBaseSelectionElement class.</p>
25 * @created Jun 17, 2010
28 public class DerivedUnitBaseSelectionElement
extends AbstractSelectionElement
<DerivedUnitBase
> {
31 * <p>Constructor for DerivedUnitBaseSelectionElement.</p>
33 * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
34 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
35 * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
36 * @param labelString a {@link java.lang.String} object.
37 * @param entity a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
40 public DerivedUnitBaseSelectionElement(CdmFormFactory formFactory
, ConversationHolder conversation
,
41 ICdmFormElement parentElement
, String labelString
,
42 DerivedUnitBase entity
, int style
) {
43 super(formFactory
, conversation
, parentElement
, labelString
, entity
,
44 true, true, true, style
);
48 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
51 public void widgetSelected(SelectionEvent e
) {
52 DerivedUnitBase newSelection
= DerivedUnitSelectionDialog
.select(getShell(), getConversationHolder(), entity
);
53 setSelectionInternal(newSelection
);