Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 12 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 13
Line 126... Line 126...
126
 
126
 
127
 
127
 
Line 128... Line 128...
128
		private static final int VISIBLE_DATE_COUNT = 10;
128
		private static final int VISIBLE_DATE_COUNT = 10;
Line 129... Line 129...
129
		private static final String VALUE_UNKNOWN = "Inconnues";
129
		private static final String VALUE_UNKNOWN = "Inconnues";
Line 130... Line 130...
130
 
130
 
Line 131... Line 131...
131
		private Grid header = new Grid(1, 1);
131
		private Grid header = new Grid(1, 2);
132
		
132
		
Line 169... Line 169...
169
			
169
			
Line 170... Line 170...
170
			navBar = new NavBar();
170
			navBar = new NavBar();
Line -... Line 171...
-
 
171
			
-
 
172
			// Mise en forme du header
171
			
173
 
172
			// Mise en forme du header
174
			
173
 
175
 
Line 174... Line 176...
174
			header.setCellSpacing(0);
176
			header.setCellSpacing(0);
Line 175... Line -...
175
			header.setCellPadding(2);
-
 
176
			header.setWidth("100%");
-
 
177
 
-
 
178
			header.setStyleName("date-ListHeader");
-
 
179
 
-
 
180
		
-
 
181
			String com;
-
 
182
			if (location.compareTo("all")==0) {
-
 
Line -... Line 177...
-
 
177
			header.setCellPadding(2);
183
				com="toutes communes";
178
			header.setWidth("100%");
-
 
179
 
Line 184... Line 180...
184
			}
180
			header.setStyleName("date-ListHeader");
Line 185... Line 181...
185
			else {
181
 
Line 186... Line 182...
186
				com=location;
182
			
Line 224... Line 220...
224
			table.setCellPadding(2);
220
			table.setCellPadding(2);
225
			table.setWidth("100%");
221
			table.setWidth("100%");
Line 226... Line 222...
226
 
222
 
Line 227... Line -...
227
			table.setStyleName("date-ListElement");
-
 
228
 
-
 
229
			// Mise en forme barre navigation
-
 
230
			
-
 
231
			outer.add(navBar);
-
 
Line 232... Line 223...
232
			
223
			table.setStyleName("date-ListElement");
233
			navBar.setWidth("100%");
224
 
234
			
225
			
235
			outer.add(header);
226
			outer.add(header);
Line 250... Line 241...
250
					      date=loc;
241
					      date=loc;
251
					      if (loc.compareTo(VALUE_UNKNOWN)!=0) {
242
					      if (loc.compareTo(VALUE_UNKNOWN)!=0) {
252
					    	  mediator.onDateSelected(table.getText(row,cell));
243
					    	  mediator.onDateSelected(table.getText(row,cell));
253
					      }
244
					      }
254
					      else {
245
					      else {
-
 
246
					    	  date="00/00/0000";
255
					    	  mediator.onDateSelected("00/00/0000");
247
					    	  mediator.onDateSelected("00/00/0000");
256
					      }
248
					      }
Line 257... Line 249...
257
					    
249
					    
Line 339... Line 331...
339
			new ResponseTextHandler() {
331
			new ResponseTextHandler() {
Line 340... Line 332...
340
 
332
 
Line 341... Line -...
341
				public void onCompletion(String str) {
-
 
342
					
-
 
343
					
-
 
344
					String com;
-
 
345
					if (location.compareTo("all")==0) {
-
 
346
						com="toutes communes";
-
 
347
					}
-
 
348
					else {
-
 
349
						com=location;
-
 
350
					}
-
 
Line 351... Line 333...
351
					
333
				public void onCompletion(String str) {
352
					header.setHTML(0, 0, "Dates observations "+com);  // yeah !
334
					
353
 
335
					
Line 378... Line 360...
378
								}
360
								}
379
								else {
361
								else {
380
									table.setText(row, 0,VALUE_UNKNOWN);
362
									table.setText(row, 0,VALUE_UNKNOWN);
381
								}
363
								}
Line 382... Line 364...
382
								
364
								
383
								if (adate.compareTo(date)==0) {
365
								if ((adate.compareTo(date)==0) || ( date.compareTo("00/00/0000")==0) && adate.compareTo("0000-00-00 00:00:00")==0 ) {
384
								  styleRow(row, true);
366
								  styleRow(row, true);
385
								}
367
								}
386
								else {
368
								else {
387
								  styleRow(row, false);
369
								  styleRow(row, false);
Line 397... Line 379...
397
							selector.getRowFormatter().addStyleName(0, "date-SelectedRow");
379
							selector.getRowFormatter().addStyleName(0, "date-SelectedRow");
398
					}
380
					}
Line 399... Line 381...
399
 
381
 
400
					
382
					
401
					// Suppression fin ancien affichage
383
					// Suppression fin ancien affichage
402
					if (i<table.getRowCount()-1) {
384
					if (i<table.getRowCount()) {
403
						 for (int j = table.getRowCount() - 1; j > i-1; j--) {
385
						 for (int j = table.getRowCount() -1 ; j >= i; j--) {
404
							 table.removeRow(j);
386
							 table.removeRow(j);
-
 
387
						 }
405
						 }
388
					}
Line 406... Line 389...
406
					}
389
 
407
					setStatusEnabled();
390
					setStatusEnabled();