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
.description
.PolytomousKey
;
17 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
.PolytomousKeySelectionDialog
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
23 * @created Dec 3, 2010
26 public class PolytomousKeySelectionElement
extends
27 AbstractSelectionElement
<PolytomousKey
> {
29 public static final int DEFAULT
= EDITABLE
| DELETABLE
;
34 * @param parentElement
42 public PolytomousKeySelectionElement(CdmFormFactory formFactory
,
43 ConversationHolder conversation
, ICdmFormElement parentElement
,
44 String labelString
, PolytomousKey entity
, int mode
, int style
) {
45 super(formFactory
, conversation
, parentElement
, labelString
, entity
,
53 * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
54 * .events.SelectionEvent)
57 public void widgetSelected(SelectionEvent e
) {
58 PolytomousKey newSelection
= PolytomousKeySelectionDialog
.select(
59 getShell(), getConversationHolder(), entity
);
61 setSelectionInternal(newSelection
);