Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2 Rev 7
Line 1... Line 1...
1
/**
1
/**
2
 David Delon david.delon@clapas.net 2007
2
 David Delon david.delon@clapas.net 2007
Line 3... Line 3...
3
 
3
 
Line 4... Line -...
4
 */
-
 
5
 
4
 */
6
 
5
 
7
/*
6
/*
8
 * ListeObservationsVue.java  (Composite de Panel)
7
 * ListeObservationsVue.java  (Composite de Panel)
9
 *
8
 *
Line 27... Line 26...
27
 *
26
 *
28
 * 
27
 * 
29
 *  Suppression d'une liste d'element 
28
 *  Suppression d'une liste d'element 
30
 */
29
 */
Line 31... Line -...
31
 
-
 
32
 
30
 
33
/* Actions declenchees :
31
/* Actions declenchees :
34
 * 
32
 * 
35
 * onInventoryItemSelected(numero d'ordre de la ligne selectionne) : selection d'une ligne
33
 * onInventoryItemSelected(numero d'ordre de la ligne selectionne) : selection d'une ligne
36
 * onInventoryItemUnselected(numero d'ordre de la ligne selectionne) : deselection d'une ligne
34
 * onInventoryItemUnselected(numero d'ordre de la ligne selectionne) : deselection d'une ligne
37
 * onInventoryUpdated(localite) : action suite a la modification, suppression, creation d'un element d'inventaire
35
 * onInventoryUpdated(localite) : action suite a la modification, suppression, creation d'un element d'inventaire
38
 * 
36
 * 
Line 39... Line -...
39
 */
-
 
40
 
37
 */
41
 
38
 
42
package org.tela_botanica.client.observation;
39
package org.tela_botanica.client.observation;
Line 43... Line 40...
43
 
40
 
44
import org.tela_botanica.client.modeles.Observation;
41
import org.tela_botanica.client.modeles.Observation;
45
 
42
 
Line 51... Line 48...
51
import com.google.gwt.user.client.ui.HasVerticalAlignment;
48
import com.google.gwt.user.client.ui.HasVerticalAlignment;
52
import com.google.gwt.user.client.ui.HorizontalPanel;
49
import com.google.gwt.user.client.ui.HorizontalPanel;
53
import com.google.gwt.user.client.ui.Label;
50
import com.google.gwt.user.client.ui.Label;
54
import com.google.gwt.user.client.ui.Widget;
51
import com.google.gwt.user.client.ui.Widget;
Line 55... Line -...
55
 
-
 
56
 
52
 
57
public class ListeObservationsVue extends Composite
-
 
Line 58... Line 53...
58
		 {
53
public class ListeObservationsVue extends Composite {
Line 59... Line 54...
59
 
54
 
Line 60... Line -...
60
	// Debut Barre de navigation
-
 
61
 
55
	// Debut Barre de navigation
62
	private class NavBar extends Composite implements ClickListener {
-
 
Line 63... Line 56...
63
 
56
 
64
		
57
	private class NavBar extends Composite implements ClickListener {
65
		public final DockPanel bar = new DockPanel();
58
 
66
		
59
		public final DockPanel bar = new DockPanel();
67
 
60
 
68
		public final Button gotoFirst = new Button("<<", this);
-
 
Line 69... Line 61...
69
		public final Button gotoNext = new Button(">", this);
61
		public final Button gotoFirst = new Button("<<", this);
70
		public final Button gotoPrev = new Button("<", this);
62
		public final Button gotoNext = new Button(">", this);
71
		public final Button gotoEnd = new Button(">>", this);
63
		public final Button gotoPrev = new Button("<", this);
72
		public final Label status = new Label();
64
		public final Button gotoEnd = new Button(">>", this);
73
		
65
		public final Label status = new Label();
Line 74... Line 66...
74
 
66
 
75
		public NavBar() {
-
 
76
			
-
 
77
			initWidget(bar);
-
 
78
			
-
 
Line -... Line 67...
-
 
67
		public NavBar() {
-
 
68
 
-
 
69
			initWidget(bar);
-
 
70
 
-
 
71
			status.setWordWrap(false);
Line 79... Line 72...
79
			status.setWordWrap(false);
72
 
80
 
73
			HorizontalPanel buttons = new HorizontalPanel();
81
			HorizontalPanel buttons = new HorizontalPanel();
74
 
82
			
75
			buttons.add(status);
83
			buttons.add(status);
76
			buttons.setCellHorizontalAlignment(status,
84
			buttons.setCellHorizontalAlignment(status, HasHorizontalAlignment.ALIGN_RIGHT);
77
					HasHorizontalAlignment.ALIGN_RIGHT);
Line 85... Line -...
85
			buttons.setCellVerticalAlignment(status, HasVerticalAlignment.ALIGN_MIDDLE);
-
 
86
 
78
			buttons.setCellVerticalAlignment(status,
87
 
-
 
Line 88... Line 79...
88
			buttons.add(gotoFirst);
79
					HasVerticalAlignment.ALIGN_MIDDLE);
89
			buttons.add(gotoPrev);
80
 
90
			buttons.add(gotoNext);
81
			buttons.add(gotoFirst);
91
			buttons.add(gotoEnd);
82
			buttons.add(gotoPrev);
Line 124... Line 115...
124
	}
115
	}
Line 125... Line 116...
125
 
116
 
Line 126... Line 117...
126
	// Fin Barre de navigation
117
	// Fin Barre de navigation
127
 
118
 
128
	// Conteneur (header et table sont dans panel)
119
	// Conteneur (header et table sont dans panel)
129
//	private ContentPanel panel =null;
120
	// private ContentPanel panel =null;
130
//	private Table table = null;
121
	// private Table table = null;
131
	
122
 
132
	// Services 
123
	// Services
133
	private String serviceBaseUrl = null;
124
	private String serviceBaseUrl = null;
Line 134... Line 125...
134
	private String user;
125
	private String user;
135
	private ObservationMediateur observationMediateur = null;
126
	private ObservationMediateur observationMediateur = null;
136
 
127
 
137
	// Navigation
128
	// Navigation
138
	private int startIndex = 0;
129
	private int startIndex = 0;
Line 139... Line 130...
139
	private int count = 0;
130
	private int count = 0;
140
	private static final int VISIBLE_TAXON_COUNT = 15;
131
	private static final int VISIBLE_TAXON_COUNT = 15;
141
	private NavBar navBar=null;
132
	private NavBar navBar = null;
142
 
133
 
143
	// Filtre par defaut :
134
	// Filtre par defaut :
144
	
135
 
145
	private String identifiantLocalite = "all";
136
	private String identifiantLocalite = "all";
146
	private String localite = "all";
137
	private String localite = "all";
147
	private String annee = "all";
138
	private String annee = "all";
148
	private String mois = "all";
139
	private String mois = "all";
149
	private String jour = "all";
-
 
150
	private String rechercheLibre = "all";
-
 
151
	private String lieudit = "all";
-
 
Line 152... Line 140...
152
	private String ordre= null;
140
	private String jour = "all";
153
	
-
 
154
	
141
	private String rechercheLibre = "all";
155
 
142
	private String lieudit = "all";
Line 156... Line 143...
156
 
143
	private String ordre = null;
-
 
144
 
-
 
145
	public ListeObservationsVue(ObservationMediateur observationMediateur) {
-
 
146
 
-
 
147
		// Traitement contexte utilisateur et service
-
 
148
 
Line 157... Line -...
157
	public ListeObservationsVue(ObservationMediateur observationMediateur) {
-
 
158
		
-
 
159
		
-
 
160
		// Traitement contexte utilisateur et service
-
 
161
 
-
 
162
		this.observationMediateur=observationMediateur;
-
 
163
 
-
 
164
	    
149
		this.observationMediateur = observationMediateur;
165
	//    panel= new ContentPanel(Style.HEADER);
150
 
Line 166... Line -...
166
	  //  panel.setLayout(new FillLayout());
-
 
167
	    
151
		// panel= new ContentPanel(Style.HEADER);
168
	    
-
 
169
	    // Barre navigation integree au header 
152
		// panel.setLayout(new FillLayout());
170
	    
153
 
171
		navBar = new NavBar();
154
		// Barre navigation integree au header
172
	//	panel.getHeader().addWidget(navBar);
155
 
173
 
-
 
174
		
-
 
175
		//  Contenu :
-
 
176
		
-
 
Line -... Line 156...
-
 
156
		navBar = new NavBar();
-
 
157
		// panel.getHeader().addWidget(navBar);
-
 
158
 
-
 
159
		// Contenu :
177
		
160
 
178
		//  Colonnes :
161
		// Colonnes :
179
		
162
 
180
//		TableColumn[] columns = new TableColumn[6]; 
163
		// TableColumn[] columns = new TableColumn[6];
181
		
164
 
182
		// TODO : renderer date, alignement etc
165
		// TODO : renderer date, alignement etc
183
	/*	
166
		/*
184
		columns[0] = new TableColumn("etat","Aransmis", 50);  
167
		 * columns[0] = new TableColumn("etat","Aransmis", 50);
185
 
168
		 * 
186
		columns[1] = new TableColumn("nom","Nom saisi", 250);  
169
		 * columns[1] = new TableColumn("nom","Nom saisi", 250);
187
		
170
		 * 
188
		columns[2] = new TableColumn("nomr","Nom retenu", 250);  
171
		 * columns[2] = new TableColumn("nomr","Nom retenu", 250);
189
 
-
 
190
		columns[3] = new TableColumn("lieu","Lieu", 350);  
172
		 * 
191
 
173
		 * columns[3] = new TableColumn("lieu","Lieu", 350);
192
		columns[4] = new TableColumn("date","Date", 75);  
174
		 * 
193
 
175
		 * columns[4] = new TableColumn("date","Date", 75);
194
		columns[5] = new TableColumn("ordre","Ordre", 50);  
176
		 * 
195
		
177
		 * columns[5] = new TableColumn("ordre","Ordre", 50);
196
	
178
		 * 
197
		TableColumnModel cm = new TableColumnModel(columns);  
-
 
198
		
179
		 * 
199
		// Table : 
180
		 * TableColumnModel cm = new TableColumnModel(columns);
200
		
181
		 *  // Table :
201
		table = new Table(Style.MULTI | Style.HORIZONTAL, cm);  
182
		 * 
202
		table.setBorders(false);  
183
		 * table = new Table(Style.MULTI | Style.HORIZONTAL, cm);
203
		
184
		 * table.setBorders(false);
204
		
-
 
205
		panel.add(table);
-
 
206
		
185
		 * 
207
		
186
		 * 
208
 
187
		 * panel.add(table);
209
		// Selection d'une ligne 
-
 
210
		table.addListener(Events.RowClick, new Listener() {
-
 
211
 
188
		 * 
212
		      public void handleEvent(BaseEvent be) {
189
		 * 
213
		        TableItem item=(TableItem) be.item;
-
 
214
		        if (item!=null) {
190
		 *  // Selection d'une ligne table.addListener(Events.RowClick, new
215
		        	if (ordre==null) { // Affichage de la ligne selectionne
191
		 * Listener() {
216
		        		ordre= (String) item.getValue(5);
-
 
217
	//	        		observationMediateur.onInventoryItemSelected(ordre);
-
 
218
		        	}
192
		 * 
219
		        	else { 
193
		 * public void handleEvent(BaseEvent be) { TableItem item=(TableItem)
220
		        		// Si une ligne etait deja selectionne 
-
 
221
		        		if (ordre.compareTo((String) item.getValue(5))==0) { // C'est la meme, on la deselectionne
-
 
222
		        			ordre=null;
-
 
223
		        			table.deselect(be.rowIndex);
194
		 * be.item; if (item!=null) { if (ordre==null) { // Affichage de la
224
		//        			observationMediateur.onInventoryItemUnselected();
-
 
225
		        		}
-
 
226
		        		else {
195
		 * ligne selectionne ordre= (String) item.getValue(5); //
227
			        		ordre= (String) item.getValue(5); // C'est une autre, on la selectionne
-
 
228
//		        			observationMediateur.onInventoryItemSelected(ordre);
-
 
Line -... Line 196...
-
 
196
		 * observationMediateur.onInventoryItemSelected(ordre); } else { // Si
Line 229... Line 197...
229
		        		}
197
		 * une ligne etait deja selectionne if (ordre.compareTo((String)
230
		        		
-
 
231
		        	}
198
		 * item.getValue(5))==0) { // C'est la meme, on la deselectionne
232
		        }
199
		 * ordre=null; table.deselect(be.rowIndex); //
233
		      }
200
		 * observationMediateur.onInventoryItemUnselected(); } else { ordre=
-
 
201
		 * (String) item.getValue(5); // C'est une autre, on la selectionne //
234
		});
202
		 * observationMediateur.onInventoryItemSelected(ordre); }
235
		*/
203
		 *  } } } });
Line 236... Line 204...
236
	
204
		 */
237
	// initWidget(panel);
205
 
-
 
206
		// initWidget(panel);
-
 
207
 
-
 
208
	}
-
 
209
 
-
 
210
	/**
238
 
211
	 * Suppression d'un ensemble d'element de la liste d'inventaire, on garde
-
 
212
	 * ici car s'applique a plusieurs elements
-
 
213
	 * 
-
 
214
	 */
-
 
215
 
-
 
216
	public void deleteElement() {
-
 
217
		/*
-
 
218
		 * setStatusDisabled(); TableItem[] selection=table.getSelection();
-
 
219
		 * 
239
 
220
		 * StringBuffer ids=new StringBuffer(); for (int i = 0; i <
-
 
221
		 * selection.length; i++) { ids.append((String)(((TableItem)
-
 
222
		 * selection[i]).getValue(5))); if (i<(selection.length-1))
-
 
223
		 * ids.append(","); }
-
 
224
		 * 
Line 240... Line -...
240
	}
-
 
241
	
-
 
242
	
-
 
243
	/**
-
 
244
	 * Suppression d'un ensemble d'element de la liste d'inventaire, on garde ici car s'applique a plusieurs elements
-
 
245
	 * 
-
 
246
	 */
-
 
247
 
-
 
248
	public void deleteElement() {
-
 
249
/*
-
 
250
		setStatusDisabled();
-
 
251
		TableItem[] selection=table.getSelection();
-
 
252
 
-
 
253
		StringBuffer ids=new StringBuffer();
-
 
254
		for (int i = 0; i < selection.length; i++) {
-
 
255
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
-
 
256
			if (i<(selection.length-1)) ids.append(",");
-
 
257
		} 
-
 
258
		
-
 
259
		if (ids.length()>0) {
-
 
260
			
-
 
261
			HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user
-
 
262
							+ "/" + ids.toString(), "action=DELETE",
-
 
263
							
-
 
264
							new ResponseTextHandler() {
-
 
265
								public void onCompletion(String str) {
-
 
266
	//										observationMediateur.onInventoryUpdated(identifiantLocalite,"all","all");
225
		 * if (ids.length()>0) {
267
		//									observationMediateur.getEntryView().clear();
226
		 * 
-
 
227
		 * HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user + "/" +
268
								}
228
		 * ids.toString(), "action=DELETE",
Line 269... Line -...
269
							});
-
 
270
		}
229
		 * 
271
	
-
 
272
		setStatusEnabled();
-
 
273
*/
-
 
274
	}
-
 
Line 275... Line -...
275
	
-
 
276
	
-
 
277
	
-
 
278
	
-
 
279
	/**
-
 
280
	 * Transmission de releve a Tela, on garde ici car s'applique a plusieurs elements
-
 
281
	 */
-
 
282
 
-
 
283
	
-
 
284
	public void transmitElement() {
-
 
285
	
-
 
286
		setStatusDisabled();
-
 
287
		
-
 
288
/*		TableItem[] selection=table.getSelection();
-
 
289
 
-
 
290
		StringBuffer ids=new StringBuffer();
-
 
291
		for (int i = 0; i < selection.length; i++) {
-
 
292
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
-
 
293
			if (i<(selection.length-1)) ids.append(",");
230
		 * new ResponseTextHandler() { public void onCompletion(String str) { //
Line -... Line 231...
-
 
231
		 * observationMediateur.onInventoryUpdated(identifiantLocalite,"all","all"); //
-
 
232
		 * observationMediateur.getEntryView().clear(); } }); }
-
 
233
		 * 
-
 
234
		 * setStatusEnabled();
-
 
235
		 */
-
 
236
	}
-
 
237
 
-
 
238
	/**
-
 
239
	 * Transmission de releve a Tela, on garde ici car s'applique a plusieurs
-
 
240
	 * elements
-
 
241
	 */
-
 
242
 
-
 
243
	public void transmitElement() {
-
 
244
 
-
 
245
		setStatusDisabled();
-
 
246
 
-
 
247
		/*
-
 
248
		 * TableItem[] selection=table.getSelection();
294
		} 
249
		 * 
295
	
250
		 * StringBuffer ids=new StringBuffer(); for (int i = 0; i <
296
		if (ids.length()>0) {
-
 
297
		
251
		 * selection.length; i++) { ids.append((String)(((TableItem)
298
			HTTPRequest.asyncPost(serviceBaseUrl + "/InventoryTransmit/" + user
252
		 * selection[i]).getValue(5))); if (i<(selection.length-1))
299
							+ "/" + ids.toString(), "transmission=1",
253
		 * ids.append(","); }
-
 
254
		 * 
300
							
255
		 * if (ids.length()>0) {
301
							new ResponseTextHandler() {
256
		 * 
302
								public void onCompletion(String str) {
257
		 * HTTPRequest.asyncPost(serviceBaseUrl + "/InventoryTransmit/" + user +
303
											getListeObservation(); // Pour affichage logo 
258
		 * "/" + ids.toString(), "transmission=1",
304
								}
259
		 * 
305
							});
260
		 * new ResponseTextHandler() { public void onCompletion(String str) {
Line 306... Line 261...
306
		}
261
		 * getListeObservation(); // Pour affichage logo } }); }
307
	
262
		 * 
-
 
263
		 * setStatusEnabled();
-
 
264
		 * 
-
 
265
		 */
-
 
266
	}
Line 308... Line -...
308
		setStatusEnabled();
-
 
309
 
267
 
310
		*/
268
	/**
311
	}
269
	 * Recherche nombre d'enregistrement pour l'utilisateur et la localite en
312
	
270
	 * cours
313
	
271
	 * 
314
	/**
272
	 */
315
	 * Recherche nombre d'enregistrement pour l'utilisateur et la localite en cours
273
 
316
	 * 
274
	public void initialiser() {
Line 317... Line 275...
317
	 */
275
 
Line 318... Line 276...
318
	
276
		setStatusDisabled();
319
	public void initialiser() {
277
 
320
		
-
 
321
		setStatusDisabled();
-
 
322
 
-
 
323
	//	observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this);
278
		// observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this);
-
 
279
		observationMediateur.getNombreObservation(identifiantLocalite,
-
 
280
				localite, annee, mois, jour, lieudit, rechercheLibre); // Retour
Line 324... Line -...
324
		observationMediateur.getNombreObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre); // Retour dans handlevent() NOMBRE_OBSERVATION
-
 
325
 
-
 
326
		
-
 
327
	}
-
 
328
	
-
 
329
	/**
-
 
330
	 * Mise a jour de l'affichage, a partir des donnaes d'inventaire deja
-
 
331
	 * saisies. La valeur de this.startIndex permet de determiner quelles
-
 
332
	 * donnaes seront affichees
-
 
333
	 * 
-
 
334
	 */
-
 
335
 
-
 
336
	public void getListeObservation() {
-
 
337
 
-
 
338
	//	observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this);
281
																		// dans
339
		observationMediateur.getListeObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre, startIndex, VISIBLE_TAXON_COUNT); // Retour dans handlevent() LISTE_OBSERVATION
-
 
340
		
-
 
341
	}
-
 
342
	
-
 
343
	public void afficherListeObservation() {
-
 
Line 344... Line 282...
344
 
282
																		// handlevent()
345
		Observation[] listeObservation =observationMediateur.getObservation().getListeObservation();
-
 
Line -... Line 283...
-
 
283
																		// NOMBRE_OBSERVATION
346
		
284
 
Line 347... Line 285...
347
		for (int i=0;i<listeObservation.length;i++) {
285
	}
Line 348... Line -...
348
		
-
 
349
			Object[] values = new Object[6];
-
 
350
			values[0]="0";
-
 
351
			values[2]="2";
-
 
352
			values[3]="3";
-
 
353
			values[4]="4";
-
 
354
			values[5]="5";
-
 
355
			values[1]=listeObservation[i].getNomSaisi();
-
 
356
			
-
 
357
    	//	table.add(new TableItem(values));
-
 
358
			
-
 
359
		}
-
 
360
		
-
 
361
//      Ligne d'information 
-
 
362
 
-
 
363
		// Toutes date par defaut
-
 
364
/*		
286
 
365
 
-
 
366
		HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user + "/" + identifiantLocalite + "/" + URL.encodeComponent(localite) +"/" + annee  + "/"  + mois  + "/"  + jour   + "/" + URL.encodeComponent(rechercheLibre) + "/" + URL.encodeComponent(lieudit) + "/"
-
 
367
				+ startIndex + "/" + VISIBLE_TAXON_COUNT,
-
 
368
 
-
 
369
		new ResponseTextHandler() {
-
 
370
 
-
 
371
			public void onCompletion(String str) {
-
 
372
 
-
 
373
				JSONValue jsonValue = JSONParser.parse(str);
-
 
374
				JSONArray jsonArray;
-
 
375
				JSONArray jsonArrayNested;
287
	/**
376
				
-
 
377
				int i=0;
-
 
378
 
-
 
379
				if ((jsonArray = jsonValue.isArray()) != null) {
288
	 * Mise a jour de l'affichage, a partir des donnaes d'inventaire deja
380
					
-
 
381
					StringBuffer lieu=null;
-
 
382
 
-
 
383
					int arraySize = jsonArray.size();
-
 
384
					
-
 
385
					for (i = 0; i < arraySize; ++i) {
289
	 * saisies. La valeur de this.startIndex permet de determiner quelles
386
						if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
-
 
387
							
-
 
388
 
-
 
389
							Object[] values = new Object[6];
290
	 * donnaes seront affichees
390
							
-
 
391
													
-
 
392
							// Statut Observation transmise ?
291
	 * 
393
							
-
 
394
							String atransmit=((JSONString) jsonArrayNested .get(13)).stringValue();
-
 
395
							
-
 
396
							if (atransmit.compareTo("1")==0) {
-
 
397
								values[0] = new Image("tela.gif");
-
 
398
							}
-
 
399
							else {
-
 
400
								values[0] = new HTML("&nbsp;");
-
 
401
							}
-
 
402
							
-
 
403
						
-
 
404
							// Nom saisi
-
 
405
							
-
 
406
							values[1] = new HTML("<b>"+Util.toCelString(((JSONString) jsonArrayNested .get(0)).toString())+"</b>");
-
 
407
							
-
 
408
							
-
 
409
 
-
 
410
							// Nom retenu
-
 
411
							String aname=Util.toCelString(((JSONString) jsonArrayNested .get(2)).toString());
-
 
412
							
-
 
413
							if (aname.compareTo("null")==0) {
-
 
414
								values[2] = new HTML("&nbsp;");
-
 
415
							}
-
 
416
							else {
292
	 */
417
								values[2] = new HTML(aname);
-
 
418
							}
-
 
419
							/*
-
 
420
							 
-
 
421
							 /*
-
 
422
							// Num nomenclatural
-
 
423
							String ann=((JSONString) jsonArrayNested .get(3)).stringValue();
-
 
424
							
-
 
425
							if (ann.compareTo("0")!=0) {
-
 
426
								observationText.append(""+ann+"-");
-
 
427
							}
-
 
428
							else {
-
 
429
								observationText.append("0-");
-
 
430
							}
-
 
431
							
-
 
432
							
-
 
433
							// Num Taxonomique
-
 
Line 434... Line 293...
434
							
293
 
Line 435... Line -...
435
							String ant=((JSONString) jsonArrayNested .get(4)).stringValue();
-
 
436
							
-
 
437
							if (ant.compareTo("0")!=0) {
-
 
438
								observationText.append(ant+", ");
-
 
439
							}
-
 
440
							else {
-
 
441
								observationText.append("0, ");
-
 
442
							}
-
 
443
							
-
 
444
							// Famille
-
 
445
							
-
 
446
							
-
 
447
							String afamily=Util.toCelString(((JSONString) jsonArrayNested .get(5)).toString());
-
 
448
							
-
 
449
							if (afamily.compareTo("null")==0) {
-
 
450
								//
-
 
451
							}
-
 
452
							else {
-
 
453
								observationText.append(afamily+", ");
-
 
454
							}
-
 
455
							*/
-
 
456
		/*
-
 
457
		
-
 
458
//							Localisation - Lieu
-
 
459
 
-
 
460
							lieu=new StringBuffer();
-
 
461
 
-
 
462
							String aloc=Util.toCelString(((JSONString) jsonArrayNested .get(6)).toString());
-
 
463
								
-
 
464
								if (aloc.compareTo("000null")==0) {
-
 
465
									if (lieu.length()==0) {
-
 
466
										lieu.append("Commune absente");
-
 
467
									}
-
 
468
									else {
-
 
469
										lieu.append("commune absente");
-
 
470
									}
-
 
471
								}
-
 
472
								else {
-
 
473
									if (lieu.length()==0) {
-
 
474
										lieu.append("Commune de "+aloc);
-
 
475
									}
-
 
476
									else {
-
 
477
										lieu.append("commune de "+aloc);
-
 
478
									}
-
 
479
										
-
 
480
								}
-
 
481
							
-
 
482
								
-
 
483
								String alieudit=Util.toCelString(((JSONString) jsonArrayNested .get(9)).toString());
-
 
484
							
-
 
485
//								Localisation - Lieu dit
-
 
486
								
-
 
487
								if (alieudit.compareTo("000null")!=0) {
-
 
488
									lieu.append(", "+alieudit);
-
 
489
								}
-
 
490
								
-
 
491
								
-
 
492
//								Station -
-
 
493
								
-
 
494
								String astation=Util.toCelString(((JSONString) jsonArrayNested .get(10)).toString());
-
 
495
 
-
 
496
								
-
 
497
								if (astation.compareTo("000null")!=0) {
-
 
498
									lieu.append(", "+astation);
-
 
499
								}
-
 
500
 
-
 
501
								
-
 
502
//								Milieu
-
 
503
								
-
 
504
								String amilieu=Util.toCelString(((JSONString) jsonArrayNested .get(11)).toString());
-
 
505
 
-
 
506
								
-
 
507
								if (amilieu.compareTo("000null")!=0) {
-
 
508
									lieu.append(", "+amilieu);
-
 
509
								}								
-
 
510
							
-
 
511
								String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(12)).toString());
-
 
512
//								Commentaire
-
 
513
								
-
 
514
								if (acomment.compareTo("null")!=0) {
-
 
515
									lieu.append(", "+acomment);
-
 
516
								}
-
 
517
 
-
 
518
								
-
 
519
								if (lieu.toString().compareTo("")==0) {
-
 
520
									values[3] = new HTML("&nbsp;");
-
 
521
								}
-
 
522
								else {
-
 
523
									values[3] = new HTML(lieu.toString());
-
 
524
								}
-
 
525
 
-
 
526
								
-
 
527
								String adate=((JSONString) jsonArrayNested .get(8)).stringValue();
-
 
528
								
-
 
529
//								Date 
-
 
530
								if (adate.compareTo("0000-00-00 00:00:00")!=0) {
-
 
531
									values[4]=new HTML("<b>"+adate+"</b>"); 
-
 
532
								}
-
 
533
								else { 
-
 
534
									values[4] = new HTML("&nbsp;");
-
 
535
								}
-
 
536
									
-
 
537
 
-
 
538
							
-
 
539
							String aordre=((JSONString) jsonArrayNested.get(7)).stringValue();
-
 
540
						
-
 
541
							// Numero d'ordre (cache)
-
 
542
							
-
 
543
							values[5] = aordre;
-
 
544
							
-
 
545
							
294
	public void getListeObservation() {
Line 546... Line 295...
546
						
295
 
547
							
-
 
Line 548... Line 296...
548
					    	if (i>=table.getItemCount()) {
296
		// observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this);
-
 
297
		observationMediateur.getListeObservation(identifiantLocalite, localite,
-
 
298
				annee, mois, jour, lieudit, rechercheLibre, startIndex,
-
 
299
				VISIBLE_TAXON_COUNT); // Retour dans handlevent()
-
 
300
										// LISTE_OBSERVATION
-
 
301
 
-
 
302
	}
-
 
303
 
-
 
304
	public void afficherListeObservation() {
-
 
305
 
549
					    		TableItem item = new TableItem(values);
306
		Observation[] listeObservation = observationMediateur.getObservation()
-
 
307
				.getListeObservation();
-
 
308
 
-
 
309
		for (int i = 0; i < listeObservation.length; i++) {
-
 
310
 
-
 
311
			Object[] values = new Object[6];
-
 
312
			values[0] = "0";
-
 
313
			values[2] = "2";
-
 
314
			values[3] = "3";
-
 
315
			values[4] = "4";
-
 
316
			values[5] = "5";
-
 
317
			values[1] = listeObservation[i].getNomSaisi();
-
 
318
 
-
 
319
			// table.add(new TableItem(values));
-
 
320
 
550
					    		table.add(item);
321
		}
-
 
322
 
-
 
323
		// Ligne d'information
-
 
324
 
-
 
325
		// Toutes date par defaut
-
 
326
		/*
-
 
327
		 * 
-
 
328
		 * HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user +
-
 
329
		 * "/" + identifiantLocalite + "/" + URL.encodeComponent(localite) +"/" +
-
 
330
		 * annee + "/" + mois + "/" + jour + "/" +
-
 
331
		 * URL.encodeComponent(rechercheLibre) + "/" +
-
 
332
		 * URL.encodeComponent(lieudit) + "/" + startIndex + "/" +
-
 
333
		 * VISIBLE_TAXON_COUNT,
-
 
334
		 * 
-
 
335
		 * new ResponseTextHandler() {
-
 
336
		 * 
-
 
337
		 * public void onCompletion(String str) {
-
 
338
		 * 
-
 
339
		 * JSONValue jsonValue = JSONParser.parse(str); JSONArray jsonArray;
-
 
340
		 * JSONArray jsonArrayNested;
-
 
341
		 * 
551
							}
342
		 * int i=0;
-
 
343
		 * 
-
 
344
		 * if ((jsonArray = jsonValue.isArray()) != null) {
-
 
345
		 * 
-
 
346
		 * StringBuffer lieu=null;
-
 
347
		 * 
-
 
348
		 * int arraySize = jsonArray.size();
-
 
349
		 * 
-
 
350
		 * for (i = 0; i < arraySize; ++i) { if ((jsonArrayNested =
-
 
351
		 * jsonArray.get(i).isArray()) != null) {
-
 
352
		 * 
-
 
353
		 * 
-
 
354
		 * Object[] values = new Object[6];
-
 
355
		 * 
-
 
356
		 *  // Statut Observation transmise ?
-
 
357
		 * 
-
 
358
		 * String atransmit=((JSONString) jsonArrayNested
-
 
359
		 * .get(13)).stringValue();
-
 
360
		 * 
-
 
361
		 * if (atransmit.compareTo("1")==0) { values[0] = new Image("tela.gif"); }
-
 
362
		 * else { values[0] = new HTML("&nbsp;"); }
-
 
363
		 * 
-
 
364
		 *  // Nom saisi
-
 
365
		 * 
-
 
366
		 * values[1] = new HTML("<b>"+Util.toCelString(((JSONString)
-
 
367
		 * jsonArrayNested .get(0)).toString())+"</b>");
-
 
368
		 * 
-
 
369
		 * 
-
 
370
		 *  // Nom retenu String aname=Util.toCelString(((JSONString)
-
 
371
		 * jsonArrayNested .get(2)).toString());
-
 
372
		 * 
552
							else {
373
		 * if (aname.compareTo("null")==0) { values[2] = new HTML("&nbsp;"); }
-
 
374
		 * else { values[2] = new HTML(aname); } /*
-
 
375
		 *  /* // Num nomenclatural String ann=((JSONString) jsonArrayNested
-
 
376
		 * .get(3)).stringValue();
-
 
377
		 * 
-
 
378
		 * if (ann.compareTo("0")!=0) { observationText.append(""+ann+"-"); }
553
								TableItem item=table.getItem(i);
379
		 * else { observationText.append("0-"); }
554
								item.setValue(0,values[0]);
380
		 * 
555
								item.setValue(1,values[1]);
381
		 *  // Num Taxonomique
-
 
382
		 * 
556
								item.setValue(2,values[2]);
383
		 * String ant=((JSONString) jsonArrayNested .get(4)).stringValue();
-
 
384
		 * 
557
								item.setValue(3,values[3]);
385
		 * if (ant.compareTo("0")!=0) { observationText.append(ant+", "); } else {
-
 
386
		 * observationText.append("0, "); }
558
								item.setValue(4,values[4]);
387
		 *  // Famille
-
 
388
		 * 
559
								item.setValue(5,values[5]);
389
		 * 
-
 
390
		 * String afamily=Util.toCelString(((JSONString) jsonArrayNested
-
 
391
		 * .get(5)).toString());
-
 
392
		 * 
-
 
393
		 * if (afamily.compareTo("null")==0) { // } else {
-
 
394
		 * observationText.append(afamily+", "); }
-
 
395
		 */
-
 
396
		/*
-
 
397
		 *  // Localisation - Lieu
-
 
398
		 * 
-
 
399
		 * lieu=new StringBuffer();
-
 
400
		 * 
-
 
401
		 * String aloc=Util.toCelString(((JSONString) jsonArrayNested
-
 
402
		 * .get(6)).toString());
-
 
403
		 * 
-
 
404
		 * if (aloc.compareTo("000null")==0) { if (lieu.length()==0) {
-
 
405
		 * lieu.append("Commune absente"); } else { lieu.append("commune
-
 
406
		 * absente"); } } else { if (lieu.length()==0) { lieu.append("Commune de
-
 
407
		 * "+aloc); } else { lieu.append("commune de "+aloc); }
-
 
408
		 *  }
-
 
409
		 * 
-
 
410
		 * 
-
 
411
		 * String alieudit=Util.toCelString(((JSONString) jsonArrayNested
-
 
412
		 * .get(9)).toString());
-
 
413
		 *  // Localisation - Lieu dit
-
 
414
		 * 
-
 
415
		 * if (alieudit.compareTo("000null")!=0) { lieu.append(", "+alieudit); }
-
 
416
		 * 
-
 
417
		 *  // Station -
-
 
418
		 * 
-
 
419
		 * String astation=Util.toCelString(((JSONString) jsonArrayNested
-
 
420
		 * .get(10)).toString());
-
 
421
		 * 
-
 
422
		 * 
-
 
423
		 * if (astation.compareTo("000null")!=0) { lieu.append(", "+astation); }
-
 
424
		 * 
-
 
425
		 *  // Milieu
-
 
426
		 * 
-
 
427
		 * String amilieu=Util.toCelString(((JSONString) jsonArrayNested
560
							}
428
		 * .get(11)).toString());
-
 
429
		 * 
-
 
430
		 * 
-
 
431
		 * if (amilieu.compareTo("000null")!=0) { lieu.append(", "+amilieu); }
-
 
432
		 * 
-
 
433
		 * String acomment=Util.toCelString(((JSONString) jsonArrayNested
-
 
434
		 * .get(12)).toString()); // Commentaire
-
 
435
		 * 
-
 
436
		 * if (acomment.compareTo("null")!=0) { lieu.append(", "+acomment); }
-
 
437
		 * 
-
 
438
		 * 
-
 
439
		 * if (lieu.toString().compareTo("")==0) { values[3] = new
-
 
440
		 * HTML("&nbsp;"); } else { values[3] = new HTML(lieu.toString()); }
-
 
441
		 * 
561
					    	
442
		 * 
-
 
443
		 * String adate=((JSONString) jsonArrayNested .get(8)).stringValue();
562
					    	// Spagetti
444
		 *  // Date if (adate.compareTo("0000-00-00 00:00:00")!=0) {
-
 
445
		 * values[4]=new HTML("<b>"+adate+"</b>"); } else { values[4] = new
-
 
446
		 * HTML("&nbsp;"); }
Line 563... Line 447...
563
							if (ordre!=null) {
447
		 * 
Line 564... Line -...
564
								if (aordre.compareTo(ordre)==0) {
-
 
565
									table.select(i);
448
		 * 
566
								}
449
		 * 
567
								else {
450
		 * String aordre=((JSONString) jsonArrayNested.get(7)).stringValue();
568
									table.deselect(i);
451
		 *  // Numero d'ordre (cache)
569
								}
452
		 * 
Line 620... Line 503...
620
		// Il y a forcemment un disabled avant d'arriver ici
503
		// Il y a forcemment un disabled avant d'arriver ici
Line 621... Line 504...
621
 
504
 
Line 622... Line 505...
622
		if (count > 0) {
505
		if (count > 0) {
623
 
506
 
624
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la
507
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la
625
														// premiere page
508
				// premiere page
626
				navBar.gotoPrev.setEnabled(true);
509
				navBar.gotoPrev.setEnabled(true);
627
				navBar.gotoFirst.setEnabled(true);
510
				navBar.gotoFirst.setEnabled(true);
628
				if (startIndex < (count - VISIBLE_TAXON_COUNT)) { // Pas la
511
				if (startIndex < (count - VISIBLE_TAXON_COUNT)) { // Pas la
629
																	// derniere
512
					// derniere
630
																	// page
513
					// page
631
					navBar.gotoNext.setEnabled(true);
514
					navBar.gotoNext.setEnabled(true);
632
					navBar.gotoEnd.setEnabled(true);
515
					navBar.gotoEnd.setEnabled(true);
-
 
516
					navBar.status.setText((startIndex + 1) + " - "
633
					navBar.status.setText((startIndex + 1) + " - "
517
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur "
634
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count );
518
							+ count);
-
 
519
				} else { // Derniere page
635
				} else { // Derniere page
520
					navBar.status.setText((startIndex + 1) + " - " + count
636
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count );
521
							+ " sur " + count);
637
				}
522
				}
638
			} else { // Premiere page
523
			} else { // Premiere page
639
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
524
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
640
					navBar.gotoNext.setEnabled(true);
525
					navBar.gotoNext.setEnabled(true);
641
					navBar.gotoEnd.setEnabled(true);
526
					navBar.gotoEnd.setEnabled(true);
-
 
527
					navBar.status.setText((startIndex + 1) + " - "
642
					navBar.status.setText((startIndex + 1) + " - "
528
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur "
643
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count);
529
							+ count);
-
 
530
				} else {
644
				} else {
531
					navBar.status.setText((startIndex + 1) + " - " + count
645
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count);
532
							+ " sur " + count);
646
				}
533
				}
Line 647... Line 534...
647
			}
534
			}
Line 654... Line 541...
654
 
541
 
655
	/*
542
	/*
656
	 * Positionnement index de parcours (this.startIndex) pour affichage de la
543
	 * Positionnement index de parcours (this.startIndex) pour affichage de la
657
	 * derniere page
544
	 * derniere page
658
	 * 
-
 
659
	 * @param
545
	 * 
660
	 * @return void
546
	 * @param @return void
Line 661... Line 547...
661
	 */
547
	 */
Line 662... Line 548...
662
 
548
 
Line 672... Line 558...
672
 
558
 
673
	/*
559
	/*
674
	 * Recherche en cours
560
	 * Recherche en cours
675
	 * 
561
	 * 
676
	 */
562
	 */
677
	
563
 
678
	public void setRechercheLibre(String search) {
564
	public void setRechercheLibre(String search) {
679
		this.rechercheLibre = search;
565
		this.rechercheLibre = search;
Line 680... Line -...
680
	}
-
 
681
 
-
 
682
 
566
	}
683
	
567
 
684
	/*
568
	/*
685
	 * Departement en cours 
569
	 * Departement en cours
686
	 * 
570
	 * 
687
	 */
571
	 */
688
	
572
 
689
	public void setIdLocation(String id_location) {
573
	public void setIdLocation(String id_location) {
Line 690... Line -...
690
		this.identifiantLocalite = id_location;
-
 
691
	}
-
 
692
 
574
		this.identifiantLocalite = id_location;
693
 
575
	}
694
	
576
 
695
	/*
577
	/*
696
	 * Localite en cours 
578
	 * Localite en cours
697
	 * 
579
	 * 
698
	 */
580
	 */
699
	
581
 
Line 700... Line -...
700
	public void setLocalite(String location) {
-
 
701
		this.localite = location;
-
 
702
	}
582
	public void setLocalite(String location) {
703
 
583
		this.localite = location;
704
 
584
	}
705
	
585
 
Line 706... Line 586...
706
	/*
586
	/*
707
	 * Lieudit en cours 
587
	 * Lieudit en cours
708
	 * 
588
	 * 
Line 709... Line -...
709
	 */
-
 
710
 
-
 
711
	public void setLieudit(String lieudit) {
589
	 */
712
		this.lieudit = lieudit;
590
 
713
	}
591
	public void setLieudit(String lieudit) {
714
 
592
		this.lieudit = lieudit;
715
	
-
 
Line 716... Line 593...
716
	
593
	}
717
	/*
594
 
718
	 * Date en cours 
595
	/*
Line 719... Line -...
719
	 * 
-
 
720
	 */
596
	 * Date en cours
721
	
597
	 * 
722
 
598
	 */
Line 723... Line 599...
723
	public void setAnnee(String year) {
599
 
724
		this.annee = year;
600
	public void setAnnee(String year) {
725
	}
601
		this.annee = year;
Line 726... Line -...
726
 
-
 
727
 
602
	}
728
	public void setMois(String month) {
603
 
729
		this.mois = month;
604
	public void setMois(String month) {
730
	}
605
		this.mois = month;
731
 
-
 
Line 732... Line -...
732
	public void setJour(String day) {
-
 
733
		this.jour = day;
606
	}
734
	}
607
 
735
 
608
	public void setJour(String day) {
Line 736... Line -...
736
	
-
 
737
	/*
609
		this.jour = day;
738
	 * Utilisateur en cours 
-
 
739
	 * 
610
	}
740
	 */
-
 
741
	
611
 
Line 742... Line 612...
742
 
612
	/*
743
	
613
	 * Utilisateur en cours
744
	public void setUser(String user) {
-
 
745
		this.user = user;
614
	 * 
746
	}
615
	 */
747
 
616
 
748
 
-
 
749
	public void displayFilter() {
-
 
750
		
-
 
751
		
617
	public void setUser(String user) {
752
	
618
		this.user = user;
753
	// Mise a jour boutton export feuille de calcul
619
	}
754
 
620
 
755
		/*
-
 
756
	observationMediateur.getActionView().getExportButton().setHTML("<a href=\""+observationMediateur.getServiceBaseUrl()+"/InventoryExport/" 
-
 
757
			+  user + "/"
621
	public void displayFilter() {
758
			+ URL.encodeComponent(identifiantLocalite) + "/"
622
 
759
			+ URL.encodeComponent(localite) + "/"
623
		// Mise a jour boutton export feuille de calcul
760
			+ URL.encodeComponent(lieudit)+ "/"
624
 
761
			+ annee + "/"
-
 
762
			+ mois  + "/"
625
		/*
763
			+ jour 
626
		 * observationMediateur.getActionView().getExportButton().setHTML("<a
764
			+ "\">"+"Export&nbsp;tableur</a>");
627
		 * href=\""+observationMediateur.getServiceBaseUrl()+"/InventoryExport/" +
765
 
-
 
766
	*/
628
		 * user + "/" + URL.encodeComponent(identifiantLocalite) + "/" +
767
	// Mise a jour ligne de selection 
629
		 * URL.encodeComponent(localite) + "/" + URL.encodeComponent(lieudit)+
-
 
630
		 * "/" + annee + "/" + mois + "/" + jour + "\">"+"Export&nbsp;tableur</a>");
768
	
631
		 * 
769
	
-
 
770
	
632
		 */
771
	String dep;
-
 
772
	if (identifiantLocalite.compareTo("all")==0) {
-
 
773
		dep="Tous d&eacute;partements";
633
		// Mise a jour ligne de selection
774
	}
634
 
775
	else {
635
		String dep;
776
		if (identifiantLocalite.compareTo("000null")==0) {
-
 
777
			dep="D&eacute;partements non renseign&eacute;es ";
636
		if (identifiantLocalite.compareTo("all") == 0) {
778
		}
637
			dep = "Tous d&eacute;partements";
779
		else {
638
		} else {
-
 
639
			if (identifiantLocalite.compareTo("000null") == 0) {
-
 
640
				dep = "D&eacute;partements non renseign&eacute;es ";
-
 
641
			} else {
780
		dep="Département "+identifiantLocalite;
642
				dep = "Département " + identifiantLocalite;
-
 
643
			}
-
 
644
		}
-
 
645
 
-
 
646
		String com;
-
 
647
		if (localite.compareTo("all") == 0) {
781
		}
648
			com = ", toutes communes";
-
 
649
		} else {
-
 
650
			if (localite.compareTo("000null") == 0) {
-
 
651
				com = ", communes non renseign&eacute;es";
782
	}
652
			} else {
-
 
653
				com = ", commune de " + localite;
783
	
654
			}
784
	
-
 
Line 785... Line -...
785
	
-
 
786
	String com;
-
 
787
	if (localite.compareTo("all")==0) {
655
		}
788
		com=", toutes communes";
656
 
789
	}
657
		String lieu;
790
	else {
-
 
791
		if (localite.compareTo("000null")==0) {
-
 
792
			com=", communes non renseign&eacute;es";
-
 
793
		}
658
 
794
		else {
659
		if (lieudit.compareTo("all") == 0) {
795
		com=", commune de "+localite;
660
			lieu = ", tous lieux dits";
-
 
661
		} else {
796
		}
662
			if (lieudit.compareTo("000null") == 0) {
797
	}
-
 
798
 
-
 
799
	
-
 
800
	
-
 
801
	String lieu;
-
 
802
	
-
 
803
	if (lieudit.compareTo("all")==0) {
-
 
804
		lieu=", tous lieux dits";
-
 
805
	}
-
 
806
	else {
-
 
807
		if (lieudit.compareTo("000null")==0) {
-
 
808
			lieu=", lieu-dit non renseign&eacute;es";
-
 
809
		}
-
 
810
		else {
-
 
811
			lieu=", lieu-dit "+ lieudit;
-
 
812
		}
-
 
813
	}
-
 
814
	
-
 
815
	String dat;
-
 
816
	
-
 
817
	if ((annee.compareTo("all")==0) && (mois.compareTo("all")==0) && (jour.compareTo("all")==0)) {
-
 
818
		dat=", toutes periodes";
-
 
819
	}
-
 
820
	
-
 
821
	else {
-
 
822
	
-
 
823
    	String yea="";
-
 
824
       	String da="";
-
 
825
       	String mont="";
-
 
826
       	
-
 
827
    	if (annee.compareTo("all")==0) {
-
 
828
    		yea=", toutes ann&eacute;es";
-
 
829
    	}
-
 
830
    	else {
-
 
831
    		if (annee.compareTo("0")==0) {
-
 
832
    			yea=", periode non renseign&eacute;e";
-
 
833
    		}
-
 
834
    		else {
-
 
835
    			yea=", "+ annee;
-
 
836
    
-
 
837
            	if (mois.compareTo("all")==0) {
-
 
838
            		mont=", tous mois";
-
 
839
            	}
-
 
840
            	else {
-
 
841
            			mont="/"+ mois;
-
 
842
            	}
-
 
Line 843... Line -...
843
            
-
 
-
 
663
				lieu = ", lieu-dit non renseign&eacute;es";
-
 
664
			} else {
844
            
665
				lieu = ", lieu-dit " + lieudit;
Line -... Line 666...
-
 
666
			}
-
 
667
		}
-
 
668
 
-
 
669
		String dat;
-
 
670
 
-
 
671
		if ((annee.compareTo("all") == 0) && (mois.compareTo("all") == 0)
-
 
672
				&& (jour.compareTo("all") == 0)) {
Line -... Line 673...
-
 
673
			dat = ", toutes periodes";
-
 
674
		}
845
            	if (jour.compareTo("all")==0) {
675
 
-
 
676
		else {
846
            		da=", tous jours";
677
 
Line -... Line 678...
-
 
678
			String yea = "";
-
 
679
			String da = "";
-
 
680
			String mont = "";
-
 
681
 
-
 
682
			if (annee.compareTo("all") == 0) {
-
 
683
				yea = ", toutes ann&eacute;es";
-
 
684
			} else {
Line -... Line 685...
-
 
685
				if (annee.compareTo("0") == 0) {
Line 847... Line -...
847
            	}
-
 
848
            	else {
-
 
849
            			da="/"+ jour;
-
 
850
            	}
-
 
851
    		}
-
 
852
    	}
-
 
853
            	
-
 
854
        dat=yea + mont + da;
-
 
855
    	
-
 
856
	}
-
 
857
 
-
 
858
	
-
 
859
	//panel.getHeader().setText(dep + com + lieu + dat);
-
 
860
 
-
 
861
 
-
 
862
	
-
 
863
}
686
					yea = ", periode non renseign&eacute;e";
-
 
687
				} else {
-
 
688
					yea = ", " + annee;
-
 
689
 
864
 
690
					if (mois.compareTo("all") == 0) {
865
 
-
 
Line -... Line 691...
-
 
691
						mont = ", tous mois";
-
 
692
					} else {
-
 
693
						mont = "/" + mois;
-
 
694
					}
-
 
695
 
-
 
696
					if (jour.compareTo("all") == 0) {
-
 
697
						da = ", tous jours";
-
 
698
					} else {
-
 
699
						da = "/" + jour;
-
 
700
					}
-
 
701
				}
-
 
702
			}
-
 
703
 
Line 866... Line 704...
866
 
704
			dat = yea + mont + da;
Line 867... Line -...
867
	/// EVENEMENTS 
-
 
868
	
-
 
869
/**
-
 
870
 * Evenements
-
 
871
 * 
-
 
872
 */	
-
 
873
	/*
-
 
874
	public void handleEvent(BaseEvent be) {
-
 
875
		switch (be.type) {
-
 
876
			case ObservationMediateur.NOMBRE_OBSERVATION:
-
 
877
				gotoEnd();
-
 
878
				getListeObservation();	
-
 
879
				break;
-
 
880
			case ObservationMediateur.LISTE_OBSERVATION:
-
 
881
				afficherListeObservation();
-
 
882
				break;
-
 
883
		}
-
 
884
	}
-
 
885
*/
-
 
886
 
-
 
887
 
-
 
888
}
-
 
889
 
-
 
890
/* +--Fin du code ---------------------------------------------------------------------------------------+
-
 
891
* $Log: not supported by cvs2svn $
-
 
892
* Revision 1.3  2008-06-17 14:16:16  aperonnet
-
 
893
* *** empty log message ***
-
 
894
*
705
 
-
 
706
		}
-
 
707
 
-
 
708
		// panel.getHeader().setText(dep + com + lieu + dat);
-
 
709
 
-
 
710
	}
-
 
711
 
-
 
712
	// / EVENEMENTS
-
 
713
 
-
 
714
	/**
-
 
715
	 * Evenements
-
 
716
	 * 
-
 
717
	 */
-
 
718
	/*
-
 
719
	 * public void handleEvent(BaseEvent be) { switch (be.type) { case
-
 
720
	 * ObservationMediateur.NOMBRE_OBSERVATION: gotoEnd();
-
 
721
	 * getListeObservation(); break; case
-
 
722
	 * ObservationMediateur.LISTE_OBSERVATION: afficherListeObservation();
-
 
723
	 * break; } }
-
 
724
	 */
-
 
725
 
-
 
726
}
-
 
727
 
-
 
728
/*
-
 
729
 * +--Fin du code
-
 
730
 * ---------------------------------------------------------------------------------------+
895
* Revision 1.2  2008-06-09 16:29:01  ddelon
731
 * $Log: not supported by cvs2svn $ Revision 1.1 2008-09-19 10:27:18