Revision 7efbd7cf
Added by Katja Luther almost 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/ClassificationSelectionDialog.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
15 | 15 |
import org.eclipse.swt.widgets.Composite; |
16 | 16 |
import org.eclipse.swt.widgets.Control; |
17 | 17 |
import org.eclipse.swt.widgets.Shell; |
18 |
import org.eclipse.swt.widgets.Text; |
|
18 | 19 |
|
19 | 20 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
20 | 21 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
... | ... | |
26 | 27 |
* <p> |
27 | 28 |
* FilteredClassificationSelectionDialog class. |
28 | 29 |
* </p> |
29 |
*
|
|
30 |
* |
|
30 | 31 |
* @author n.hoffmann |
31 | 32 |
* @created Sep 21, 2009 |
32 | 33 |
* @version 1.0 |
... | ... | |
38 | 39 |
* <p> |
39 | 40 |
* select |
40 | 41 |
* </p> |
41 |
*
|
|
42 |
* |
|
42 | 43 |
* @param shell |
43 | 44 |
* a {@link org.eclipse.swt.widgets.Shell} object. |
44 | 45 |
* @param conversation |
45 | 46 |
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} |
46 | 47 |
* object. |
47 |
* @param curentSelection
|
|
48 |
* @param curentSelection |
|
48 | 49 |
* @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object. |
49 | 50 |
*/ |
50 | 51 |
public static Classification select(Shell shell, |
... | ... | |
58 | 59 |
* <p> |
59 | 60 |
* Constructor for FilteredClassificationSelectionDialog. |
60 | 61 |
* </p> |
61 |
*
|
|
62 |
* |
|
62 | 63 |
* @param shell |
63 | 64 |
* a {@link org.eclipse.swt.widgets.Shell} object. |
64 | 65 |
* @param title |
... | ... | |
81 | 82 |
|
82 | 83 |
/* |
83 | 84 |
* (non-Javadoc) |
84 |
*
|
|
85 |
* |
|
85 | 86 |
* @see |
86 | 87 |
* org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea |
87 | 88 |
* (org.eclipse.swt.widgets.Composite) |
... | ... | |
94 | 95 |
|
95 | 96 |
/* |
96 | 97 |
* (non-Javadoc) |
97 |
*
|
|
98 |
* |
|
98 | 99 |
* @see |
99 | 100 |
* eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog |
100 | 101 |
* #getPersistentObject(java.util.UUID) |
... | ... | |
107 | 108 |
|
108 | 109 |
/* |
109 | 110 |
* (non-Javadoc) |
110 |
*
|
|
111 |
* |
|
111 | 112 |
* @see |
112 | 113 |
* eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog |
113 | 114 |
* #initModel() |
... | ... | |
115 | 116 |
/** {@inheritDoc} */ |
116 | 117 |
@Override |
117 | 118 |
protected void initModel() { |
119 |
Control control = getPatternControl(); |
|
120 |
String pattern = null; |
|
121 |
if (control != null){ |
|
122 |
pattern = ((Text)control).getText(); |
|
123 |
} |
|
124 |
|
|
125 |
|
|
118 | 126 |
model = CdmStore.getService(IClassificationService.class) |
119 |
.getUuidAndTitleCache(); |
|
127 |
.getUuidAndTitleCache(limitOfInitialElements, pattern);
|
|
120 | 128 |
} |
121 | 129 |
|
122 | 130 |
/** {@inheritDoc} */ |
Also available in: Unified diff
use the CdmFilteredSelectionDialog