Subversion Repositories eFlore/Archives.cel-v2

Rev

Rev 8 | Rev 13 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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