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
.dialogs
.filteredSelection
;
13 import java
.util
.UUID
;
15 import org
.eclipse
.swt
.widgets
.Composite
;
16 import org
.eclipse
.swt
.widgets
.Control
;
17 import org
.eclipse
.swt
.widgets
.Shell
;
19 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
20 import eu
.etaxonomy
.cdm
.api
.service
.IClassificationService
;
21 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
22 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
23 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
27 * FilteredClassificationSelectionDialog class.
31 * @created Sep 21, 2009
34 public class ClassificationSelectionDialog
extends
35 AbstractFilteredCdmResourceSelectionDialog
<Classification
> {
43 * a {@link org.eclipse.swt.widgets.Shell} object.
45 * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
47 * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
49 public static Classification
select(Shell shell
,
50 ConversationHolder conversation
) {
51 ClassificationSelectionDialog dialog
= new ClassificationSelectionDialog(
52 shell
, conversation
, "Choose a Classification", false, "", null);
53 return getSelectionFromDialog(dialog
);
58 * Constructor for FilteredClassificationSelectionDialog.
62 * a {@link org.eclipse.swt.widgets.Shell} object.
64 * a {@link java.lang.String} object.
68 * a {@link java.lang.String} object.
70 * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
72 * @param classification
73 * a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
75 protected ClassificationSelectionDialog(Shell shell
,
76 ConversationHolder conversation
, String title
, boolean multi
,
77 String settings
, Classification classification
) {
78 super(shell
, conversation
, title
, multi
, settings
, classification
);
85 * org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea
86 * (org.eclipse.swt.widgets.Composite)
90 protected Control
createExtendedContentArea(Composite parent
) {
98 * eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog
99 * #getPersistentObject(java.util.UUID)
103 protected Classification
getPersistentObject(UUID cdmUuid
) {
104 return CdmStore
.getService(IClassificationService
.class).load(cdmUuid
);
111 * eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog
116 protected void initModel() {
117 model
= CdmStore
.getService(IClassificationService
.class)
118 .getUuidAndTitleCache();
123 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
129 protected String
getNewWizardLinkText() {