Subversion Repositories eFlore/Applications.coel

Rev

Rev 1329 | Rev 1373 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1329 Rev 1369
Line 82... Line 82...
82
		
82
		
83
		return chaineARetourner;
83
		return chaineARetourner;
Line 84... Line 84...
84
	}
84
	}
-
 
85
		
-
 
86
	protected String construireTxtTruck(String chaineAAnalyser) {
-
 
87
		return construireTxtTruck(chaineAAnalyser, true);
-
 
88
	}
85
		
89
	
Line 86... Line 90...
86
	protected String construireTxtTruck(String chaineAAnalyser) {
90
	protected String construireTxtTruck(String chaineAAnalyser, boolean ucFirst) {
87
		ArrayList<String> termes = new ArrayList<String>();
91
		ArrayList<String> termes = new ArrayList<String>();
88
		
92
		
Line 96... Line 100...
96
					termes.add(valeurFormatee);
100
					termes.add(valeurFormatee);
97
				}
101
				}
98
			}
102
			}
99
		}
103
		}
Line 100... Line 104...
100
		
104
		
101
		String chaineARetourner = formaterTableauDeTxt(termes);
105
		String chaineARetourner = formaterTableauDeTxt(termes, ucFirst);
102
		return chaineARetourner;
106
		return chaineARetourner;
Line 103... Line 107...
103
	}
107
	}
104
	
108
	
Line 122... Line 126...
122
			chaineAAfficher = "("+chaineAAfficher+")";
126
			chaineAAfficher = "("+chaineAAfficher+")";
123
		}
127
		}
124
		return chaineAAfficher;
128
		return chaineAAfficher;
125
	}
129
	}
Line 126... Line 130...
126
	
130
	
127
	protected String formaterTableauDeTxt(ArrayList<String> tableauDeTxt) {
131
	protected String formaterTableauDeTxt(ArrayList<String> tableauDeTxt, boolean ucFirst) {
128
		String chaineAAfficher = "";
132
		String chaineAAfficher = "";
129
		int tailleDuTableau = tableauDeTxt.size();
133
		int tailleDuTableau = tableauDeTxt.size();
130
		if (tailleDuTableau > 0) {
134
		if (tailleDuTableau > 0) {
131
			int indexAvtDernier = tailleDuTableau - 1;
135
			int indexAvtDernier = tailleDuTableau - 1;
Line 136... Line 140...
136
				} else {
140
				} else {
137
					chaineAAfficher += nettoyerPointFinal(mot)+".";
141
					chaineAAfficher += nettoyerPointFinal(mot)+".";
138
				}
142
				}
139
			}
143
			}
140
		}
144
		}
141
		return UtilString.ucFirst(chaineAAfficher);
145
		if (ucFirst) return UtilString.ucFirst(chaineAAfficher);
-
 
146
		else return chaineAAfficher;
142
	}
147
	}
Line 143... Line 148...
143
	
148
	
144
	protected String nettoyerPointFinal(String mot) {
149
	protected String nettoyerPointFinal(String mot) {
145
		mot = mot.replaceAll("[.]$", "");
150
		mot = mot.replaceAll("[.]$", "");
Line 295... Line 300...
295
					}
300
					}
296
				}
301
				}
297
			}
302
			}
298
		}
303
		}
Line 299... Line 304...
299
		
304
		
300
		String chaineTermes = formaterTableauDeTxt(termes);
305
		String chaineTermes = formaterTableauDeTxt(termes, true);
301
		String chaineAutres = formaterTableauDeTxt(autres);
306
		String chaineAutres = formaterTableauDeTxt(autres, true);
Line 302... Line 307...
302
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
307
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
303
		
308
		
304
		return chaineARetourner;
309
		return chaineARetourner;
305
	}
310
	}