2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
;
12 import java
.util
.ArrayList
;
13 import java
.util
.EnumSet
;
15 import org
.eclipse
.swt
.widgets
.Shell
;
17 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
18 import eu
.etaxonomy
.cdm
.model
.common
.OriginalSourceType
;
19 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
22 * <p>OriginalSourceTypeSelectionDialog class.</p>
28 public class OriginalSourceTypeSelectionDialog
extends
29 AbstractFilteredCdmEnumSelectionDialog
<OriginalSourceType
> {
34 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
35 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
36 * @return a {@link eu.etaxonomy.cdm.model.common.OriginalSourceType} object.
38 public static OriginalSourceType
select(Shell shell
, ConversationHolder conversation
){
39 OriginalSourceTypeSelectionDialog dialog
=
40 new OriginalSourceTypeSelectionDialog(shell
,
42 "Choose Original Source Type",
44 OriginalSourceTypeSelectionDialog
.class.getCanonicalName());
45 return getSelectionFromDialog(dialog
);
49 * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
51 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
52 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
53 * @param title a {@link java.lang.String} object.
54 * @param multi a boolean.
55 * @param settings a {@link java.lang.String} object.
57 protected OriginalSourceTypeSelectionDialog(Shell shell
,
58 ConversationHolder conversation
,
62 super(shell
, conversation
, title
, multi
, settings
, OriginalSourceType
.PrimaryTaxonomicSource
);
68 protected void initModel() {
69 model
= new ArrayList
<OriginalSourceType
>();
70 model
.addAll(EnumSet
.allOf(OriginalSourceType
.class));
75 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
81 protected String
getNewWizardLinkText() {