Révision 24
SRC/src/fr/triangle/hyperalign/gui/search/DoublSearchPane.java (revision 24) | ||
---|---|---|
11 | 11 |
import javax.swing.JPanel; |
12 | 12 |
import javax.swing.JTabbedPane; |
13 | 13 |
|
14 |
import fr.triangle.hyperalign.gui.HMManager;
|
|
14 |
import fr.triangle.hyperalign.gui.HMController;
|
|
15 | 15 |
import fr.triangle.hyperalign.gui.Hypermachiavel; |
16 | 16 |
import fr.triangle.hyperalign.kernel.HyperalignData; |
17 | 17 |
import fr.triangle.hyperalign.kernel.corpus.text.HyperalignText; |
... | ... | |
29 | 29 |
private boolean terminoSearch; |
30 | 30 |
private SimpleSearchPane sourcePane; |
31 | 31 |
private SimpleSearchPane targetPane; |
32 |
private HMManager manager;
|
|
32 |
private HMController manager;
|
|
33 | 33 |
|
34 |
public DoublSearchPane(HMManager manager, boolean terminoSearch){
|
|
34 |
public DoublSearchPane(HMController manager, boolean terminoSearch){
|
|
35 | 35 |
this.res = HyperalignData.getInstance().getResourceBundle(); |
36 | 36 |
HyperalignData.getInstance().addObserver(this); |
37 | 37 |
this.manager = manager; |
... | ... | |
85 | 85 |
if(isTerminoSearch){ |
86 | 86 |
Vector<DictionaryElement> sourceElements = sourcePane.getSelectedConcepts(); |
87 | 87 |
Vector<DictionaryElement> targetElements = targetPane.getSelectedConcepts(); |
88 |
searchDone = manager.getSearchManager().searchEquiTerms(sourceTexts, targetTexts, sourceElements,
|
|
88 |
searchDone = manager.getSearchController().searchEquiTerms(sourceTexts, targetTexts, sourceElements,
|
|
89 | 89 |
sourceLang, targetElements, targetLang); |
90 | 90 |
}else { |
91 | 91 |
searchDone = false; |
... | ... | |
119 | 119 |
doubleWords.put(source, wordsS); |
120 | 120 |
doubleWords.put(target, wordsT); |
121 | 121 |
|
122 |
manager.getSearchManager().searchEquiWords(
|
|
122 |
manager.getSearchController().searchEquiWords(
|
|
123 | 123 |
sourceTexts, targetTexts, doubleLang, doubleWords, doubleTexts); |
124 | 124 |
|
125 | 125 |
} |
SRC/src/fr/triangle/hyperalign/gui/search/SimpleSearchPane.java (revision 24) | ||
---|---|---|
26 | 26 |
import javax.swing.JScrollPane; |
27 | 27 |
import javax.swing.JTextField; |
28 | 28 |
|
29 |
import fr.triangle.hyperalign.gui.HMManager;
|
|
29 |
import fr.triangle.hyperalign.gui.HMController;
|
|
30 | 30 |
import fr.triangle.hyperalign.gui.Hypermachiavel; |
31 | 31 |
import fr.triangle.hyperalign.kernel.HyperalignData; |
32 | 32 |
import fr.triangle.hyperalign.kernel.corpus.text.HyperalignText; |
... | ... | |
61 | 61 |
private Vector<HyperalignText> selectedTexts = new Vector<HyperalignText>(); |
62 | 62 |
private Vector<String> selectedWords = new Vector<String>(); |
63 | 63 |
private DoublSearchPane doubleSearchPane; |
64 |
private HMManager manager;
|
|
64 |
private HMController manager;
|
|
65 | 65 |
|
66 |
public SimpleSearchPane(HMManager manager, boolean withSearchButton,
|
|
66 |
public SimpleSearchPane(HMController manager, boolean withSearchButton,
|
|
67 | 67 |
boolean isDoubleSearch, DoublSearchPane doubleSearchPane, boolean isTerminoSearch){ |
68 | 68 |
this.res = HyperalignData.getInstance().getResourceBundle(); |
69 | 69 |
HyperalignData.getInstance().addObserver(this); |
... | ... | |
194 | 194 |
Vector<DictionaryElement> terms = new Vector<DictionaryElement>(); |
195 | 195 |
for(int i = 0 ; i < concepts.size() ; ++i){ |
196 | 196 |
DictionaryElement concept = concepts.get(i); |
197 |
Vector<DictionaryElement> termsOfConcept = concept.children(); |
|
197 |
Vector<DictionaryElement> termsOfConcept = concept.childrenVect();
|
|
198 | 198 |
for(int j = 0 ; j < termsOfConcept.size() ; ++j){ |
199 | 199 |
DictionaryElement term = termsOfConcept.get(j); |
200 | 200 |
terms.add(term); |
... | ... | |
203 | 203 |
if(isDoubleSearch){ |
204 | 204 |
return doubleSearchPane.search(isTerminoSearch, withSearchButton); |
205 | 205 |
}else { |
206 |
return manager.getSearchManager().searchTerm(null, terms, lang, selectedTexts);
|
|
206 |
return manager.getSearchController().searchTerm(null, terms, lang, selectedTexts);
|
|
207 | 207 |
} |
208 | 208 |
}else { |
209 | 209 |
//SEARCH with WORDS |
... | ... | |
223 | 223 |
if(isDoubleSearch){ |
224 | 224 |
return doubleSearchPane.search(isTerminoSearch, withSearchButton); |
225 | 225 |
}else { |
226 |
return manager.getSearchManager().searchWord(words, lang, selectedTexts);
|
|
226 |
return manager.getSearchController().searchWord(words, lang, selectedTexts);
|
|
227 | 227 |
} |
228 | 228 |
} |
229 | 229 |
} |
... | ... | |
332 | 332 |
|
333 | 333 |
Vector<String> wordExpressionsToSearch = new Vector<String>(); |
334 | 334 |
//Add terms of the concept |
335 |
Vector<DictionaryElement> terms = currentConceptSearch.children(); |
|
335 |
Vector<DictionaryElement> terms = currentConceptSearch.childrenVect();
|
|
336 | 336 |
for(int i = 0 ; i < terms.size() ; ++i){ |
337 | 337 |
wordExpressionsToSearch.add(terms.get(i).getName()); |
338 | 338 |
} |
... | ... | |
651 | 651 |
Dictionary[] langs = manager.getDataManager().getDictionaryManager().getDictionaries(); |
652 | 652 |
langBox = new JComboBox(langs); |
653 | 653 |
//NEW CODE |
654 |
if(manager.getSearchManager().getSearchTerminology()!=null){
|
|
655 |
langBox.setSelectedItem(manager.getSearchManager().getSearchTerminology());
|
|
654 |
if(manager.getSearchController().getSearchTerminology()!=null){
|
|
655 |
langBox.setSelectedItem(manager.getSearchController().getSearchTerminology());
|
|
656 | 656 |
} |
657 | 657 |
//langBox.setPreferredSize(new Dimension(200,30));//200,50 |
658 | 658 |
|
SRC/src/fr/triangle/hyperalign/gui/search/SearchTextSelectionPane.java (revision 24) | ||
---|---|---|
22 | 22 |
import javax.swing.JOptionPane; |
23 | 23 |
import javax.swing.JPanel; |
24 | 24 |
|
25 |
import fr.triangle.hyperalign.gui.HMManager;
|
|
25 |
import fr.triangle.hyperalign.gui.HMController;
|
|
26 | 26 |
import fr.triangle.hyperalign.gui.text.VocabularyPane; |
27 | 27 |
import fr.triangle.hyperalign.kernel.HyperalignData; |
28 | 28 |
import fr.triangle.hyperalign.kernel.corpus.text.HyperalignText; |
... | ... | |
47 | 47 |
private JOptionPane optionPane; |
48 | 48 |
private JPanel panel ; |
49 | 49 |
private VocabularyPane infoTextPane; |
50 |
private HMManager manager;
|
|
50 |
private HMController manager;
|
|
51 | 51 |
|
52 |
public SearchTextSelectionPane (HMManager manager, DictionaryElement element, Vector<HyperalignText> texts){
|
|
52 |
public SearchTextSelectionPane (HMController manager, DictionaryElement element, Vector<HyperalignText> texts){
|
|
53 | 53 |
this.res = HyperalignData.getInstance().getResourceBundle(); |
54 | 54 |
HyperalignData.getInstance().addObserver(this); |
55 | 55 |
this.infoTextPane = null; |
... | ... | |
61 | 61 |
initGui(); |
62 | 62 |
} |
63 | 63 |
|
64 |
public SearchTextSelectionPane (HMManager manager, Dictionary dico, String [] words, Vector<HyperalignText> texts){
|
|
64 |
public SearchTextSelectionPane (HMController manager, Dictionary dico, String [] words, Vector<HyperalignText> texts){
|
|
65 | 65 |
this.res = HyperalignData.getInstance().getResourceBundle(); |
66 | 66 |
HyperalignData.getInstance().addObserver(this); |
67 | 67 |
this.infoTextPane = null; |
... | ... | |
172 | 172 |
DictionaryElement lemme = null; |
173 | 173 |
if(element.getReference().equals(Dictionary.DICO_LEMME)){ |
174 | 174 |
lemme = element; |
175 |
elements = lemme.children(); |
|
175 |
elements = lemme.childrenVect();
|
|
176 | 176 |
} |
177 |
hasOccsToIndex = manager.getSearchManager().searchTerm(lemme, elements, element.getDictionary(), selectedTexts);
|
|
177 |
hasOccsToIndex = manager.getSearchController().searchTerm(lemme, elements, element.getDictionary(), selectedTexts);
|
|
178 | 178 |
}else { |
179 |
hasOccsToIndex = manager.getSearchManager().searchWord(elementsToSearch, dico, selectedTexts);
|
|
179 |
hasOccsToIndex = manager.getSearchController().searchWord(elementsToSearch, dico, selectedTexts);
|
|
180 | 180 |
|
181 | 181 |
} |
182 | 182 |
|
Formats disponibles : Unified diff