Subversion Repositories eFlore/Archives.cel-v2

Rev

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