Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 133 Rev 153
Line 1... Line 1...
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
Line 2... Line 2...
2
 
2
 
Line -... Line 3...
-
 
3
import java.util.ArrayList;
-
 
4
 
3
import java.util.ArrayList;
5
import com.google.gwt.json.client.JSONArray;
Line 4... Line 6...
4
 
6
 
5
public class Information {
7
public class Information {
Line 14... Line 16...
14
	public Information(String t, String m) {
16
	public Information(String t, String m) {
15
		messages = new ArrayList<String>();
17
		messages = new ArrayList<String>();
16
		messages.add(m);
18
		messages.add(m);
17
		type = t;
19
		type = t;
18
	}
20
	}
-
 
21
	
-
 
22
	public Information(String t, JSONArray jsonArray) {
-
 
23
		messages = new ArrayList<String>();
-
 
24
		for(int i = 0 ; i < jsonArray.size() ; i++) {
-
 
25
			if (jsonArray.get(i).isString() != null) {
-
 
26
				messages.add(jsonArray.get(i).isString().stringValue());
-
 
27
			}
-
 
28
		}
-
 
29
		type = t;
-
 
30
	}
Line 19... Line 31...
19
 
31
 
20
	public void setType(String t) {
32
	public void setType(String t) {
21
		type = t;
33
		type = t;
22
	}
34
	}
Line 37... Line 49...
37
 
49
 
38
	public String toString() {
50
	public String toString() {
39
		String chaine = new String();
51
		String chaine = new String();
40
		for(int i = 0 ; i < messages.size() ; i++) {
52
		for(int i = 0 ; i < messages.size() ; i++) {
41
			// GXT ne prend pas en compte /n ou /r/n...
53
			// GXT ne prend pas en compte /n ou /r/n...
42
			chaine += getMessage(i)+"<br />";
54
			chaine += getMessage(i)+"\n";
43
		}
55
		}
44
		return chaine;
56
		return chaine;
45
	}
57
	}