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
.dialog
.selection
;
13 import java
.util
.ArrayList
;
14 import java
.util
.EnumSet
;
16 import org
.eclipse
.swt
.widgets
.Shell
;
18 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
19 import eu
.etaxonomy
.cdm
.model
.common
.OriginalSourceType
;
20 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
23 * <p>OriginalSourceTypeSelectionDialog class.</p>
29 public class OriginalSourceTypeSelectionDialog
extends
30 AbstractFilteredCdmEnumSelectionDialog
<OriginalSourceType
> {
35 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
36 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
37 * @return a {@link eu.etaxonomy.cdm.model.common.OriginalSourceType} object.
39 public static OriginalSourceType
select(Shell shell
, ConversationHolder conversation
){
40 OriginalSourceTypeSelectionDialog dialog
=
41 new OriginalSourceTypeSelectionDialog(shell
,
43 "Choose Original Source Type",
45 OriginalSourceTypeSelectionDialog
.class.getCanonicalName());
46 return getSelectionFromDialog(dialog
);
50 * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
52 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
53 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
54 * @param title a {@link java.lang.String} object.
55 * @param multi a boolean.
56 * @param settings a {@link java.lang.String} object.
58 protected OriginalSourceTypeSelectionDialog(Shell shell
,
59 ConversationHolder conversation
,
63 super(shell
, conversation
, title
, multi
, settings
, OriginalSourceType
.PrimaryTaxonomicSource
);
69 protected void initModel() {
70 model
= new ArrayList
<OriginalSourceType
>();
71 model
.addAll(EnumSet
.allOf(OriginalSourceType
.class));
76 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
82 protected String
getNewWizardLinkText() {