Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 5 Rev 6
Line 13... Line 13...
13
 * License for the specific language governing permissions and limitations under
13
 * License for the specific language governing permissions and limitations under
14
 * the License.
14
 * the License.
15
 */
15
 */
16
package org.tela_botanica.client;
16
package org.tela_botanica.client;
Line 17... Line -...
17
 
-
 
18
 
17
 
19
import com.google.gwt.i18n.client.Dictionary;
18
import com.google.gwt.i18n.client.Dictionary;
20
import com.google.gwt.json.client.JSONArray;
19
import com.google.gwt.json.client.JSONArray;
21
import com.google.gwt.json.client.JSONNumber;
20
import com.google.gwt.json.client.JSONNumber;
22
import com.google.gwt.json.client.JSONParser;
21
import com.google.gwt.json.client.JSONParser;
Line 36... Line 35...
36
import com.google.gwt.user.client.ui.Widget;
35
import com.google.gwt.user.client.ui.Widget;
37
import com.google.gwt.user.client.ui.ClickListener;
36
import com.google.gwt.user.client.ui.ClickListener;
38
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
37
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
39
import com.google.gwt.user.client.ui.HasVerticalAlignment;
38
import com.google.gwt.user.client.ui.HasVerticalAlignment;
Line 40... Line -...
40
 
-
 
41
import java.util.Vector;
-
 
42
 
39
 
43
 
40
/*
-
 
41
 * Le retour de getUser appelle getCount qui appelle update pour veiller à une
44
/* Le retour de getUser appelle getCount qui appelle update pour veiller à une initialisation correcte
42
 * initialisation correcte
45
 
43
 * 
Line 46... Line 44...
46
 */
44
 */
47
 
-
 
48
public class TaxonList extends Composite implements AutoCompleteAsyncTextBoxListener  {
-
 
-
 
45
 
Line 49... Line 46...
49
 
46
public class TaxonList extends Composite implements
Line 50... Line 47...
50
 
47
		AutoCompleteAsyncTextBoxListener {
Line 51... Line 48...
51
	
48
 
-
 
49
	// Barre de navigation
52
// Barre de navigation 
50
 
-
 
51
	private class NavBar extends Composite implements ClickListener {
53
	
52
 
-
 
53
		public final DockPanel bar = new DockPanel();
54
	  private class NavBar extends Composite implements ClickListener {
54
 
-
 
55
		public final Button gotoFirst = new Button("<<", this);
55
		  
56
 
56
	    public final DockPanel bar = new DockPanel();
-
 
Line -... Line 57...
-
 
57
		public final Button gotoNext = new Button(">", this);
Line 57... Line 58...
57
	    public final Button gotoFirst = new Button("<<", this);
58
 
58
	    public final Button gotoNext = new Button(">", this);
59
		public final Button gotoPrev = new Button("<", this);
59
	    public final Button gotoPrev = new Button("<", this);
60
 
60
	    public final Button gotoEnd = new Button(">>", this);
61
		public final Button gotoEnd = new Button(">>", this);
Line 73... Line 74...
73
	      buttons.add(gotoEnd);
74
			buttons.add(gotoEnd);
74
	      bar.add(buttons, DockPanel.EAST);
75
			bar.add(buttons, DockPanel.EAST);
75
	      bar.setCellHorizontalAlignment(buttons, DockPanel.ALIGN_RIGHT);
76
			bar.setCellHorizontalAlignment(buttons, DockPanel.ALIGN_RIGHT);
76
	      bar.add(status, DockPanel.CENTER);
77
			bar.add(status, DockPanel.CENTER);
77
	      bar.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
78
			bar.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
78
	      bar.setCellHorizontalAlignment(status, HasHorizontalAlignment.ALIGN_RIGHT);
79
			bar.setCellHorizontalAlignment(status,
-
 
80
					HasHorizontalAlignment.ALIGN_RIGHT);
79
	      bar.setCellVerticalAlignment(status, HasVerticalAlignment.ALIGN_MIDDLE);
81
			bar.setCellVerticalAlignment(status,
-
 
82
					HasVerticalAlignment.ALIGN_MIDDLE);
80
	      bar.setCellWidth(status, "100%");
83
			bar.setCellWidth(status, "100%");
Line 81... Line 84...
81
 
84
 
Line 82... Line -...
82
	    }
-
 
83
 
85
		}
84
	    
86
 
85
	    public void onClick(Widget sender) {
87
		public void onClick(Widget sender) {
86
	  	    if (sender == gotoNext) {
88
			if (sender == gotoNext) {
87
	  	      // Move forward a page.
89
				// Move forward a page.
88
	  	      startIndex += VISIBLE_TAXON_COUNT;
90
				startIndex += VISIBLE_TAXON_COUNT;
89
	  	      if (startIndex >= count)
-
 
90
	  	          startIndex -= VISIBLE_TAXON_COUNT;
91
				if (startIndex >= count)
91
	  	    } 
92
					startIndex -= VISIBLE_TAXON_COUNT;
92
	  	    else {
93
			} else {
93
	  	     if (sender == gotoPrev) {
94
				if (sender == gotoPrev) {
94
	  	      // Move back a page.
95
					// Move back a page.
95
	  	      startIndex -= VISIBLE_TAXON_COUNT;
96
					startIndex -= VISIBLE_TAXON_COUNT;
96
	  	      if (startIndex < 0)
-
 
97
	  	        startIndex = 0;
97
					if (startIndex < 0)
98
	  	      }
98
						startIndex = 0;
99
	  	     else {
99
				} else {
100
	  	    	 if (sender==gotoEnd) {
-
 
101
	  	    		gotoEnd();
100
					if (sender == gotoEnd) {
102
	  	    	 }
101
						gotoEnd();
103
	  	    	 else {
102
					} else {
104
	  	    		 if (sender== gotoFirst) {
103
						if (sender == gotoFirst) {
105
	  	    			 startIndex = 0;
104
							startIndex = 0;
106
	  	    		 }
105
						}
Line 114... Line 113...
114
 
113
 
115
  private void setStatusText(String text) {
114
	private void setStatusText(String text) {
116
	    navBar.status.setText(text);
115
		navBar.status.setText(text);
Line 117... Line -...
117
  }
-
 
118
 
116
	}
Line 119... Line 117...
119
 
117
 
-
 
118
	private static final int VISIBLE_TAXON_COUNT = 15;
120
  private static final int VISIBLE_TAXON_COUNT = 15;
119
 
-
 
120
	private Grid header = new Grid(1, 6);
121
	
121
 
Line 122... Line 122...
122
  private Grid header = new Grid(1,6);
122
	private FlexTable table = new FlexTable();
-
 
123
 
123
  private FlexTable table = new FlexTable();
124
	private VerticalPanel panel = new VerticalPanel();
124
  private VerticalPanel panel = new VerticalPanel();
-
 
Line 125... Line -...
125
 
-
 
126
  private int startIndex=0;
125
 
127
  private String serviceBaseUrl=getServiceBaseUrl();
-
 
Line 128... Line 126...
128
  private int count=65000;
126
	private int startIndex = 0;
Line 129... Line 127...
129
  
127
 
Line 130... Line 128...
130
  private Vector complements=null;
128
	private String serviceBaseUrl = getServiceBaseUrl();
131
  private String element=null;
-
 
Line 132... Line 129...
132
  private String complement=null;
129
 
Line 133... Line 130...
133
  
130
	private int count = 65000;
134
  private String user;
-
 
135
  
131
 
Line 136... Line 132...
136
  private NavBar navBar = new NavBar();
132
	private String user;
Line 137... Line 133...
137
  
133
 
138
  public TaxonList(Vector comps) {
134
	private NavBar navBar = new NavBar();
Line 175... Line 171...
175
 
171
 
Line 176... Line 172...
176
    // Mise en forme barre navigation
172
		// Mise en forme barre navigation
Line 177... Line -...
177
    
-
 
178
    navBar.setWidth("100%");
173
 
Line 179... Line 174...
179
 
174
		navBar.setWidth("100%");
180
   
175
 
181
    table.setStyleName("taxon-List");
176
		table.setStyleName("taxon-List");
Line 182... Line 177...
182
 
177
 
Line 183... Line -...
183
    panel.add(navBar);
-
 
184
    panel.add(header);
178
		panel.add(navBar);
Line 185... Line 179...
185
    panel.add(table);
179
		panel.add(header);
186
    
180
		panel.add(table);
-
 
181
 
187
    initWidget(panel);
182
		initWidget(panel);
-
 
183
 
188
    
184
	}
189
 
185
 
190
  }
186
	/**
-
 
187
	 * Action lancee par la selection d'un nom dans l'assistant de saisie. Lance
Line 191... Line 188...
191
 
188
	 * la recherche d'informations complémentaires (famille, numero
Line 192... Line -...
192
  /**
-
 
193
   * Action lancee par la selection d'un nom dans l'assistant de saisie. Lance la recherche d'informations
-
 
194
   * complémentaires (famille, numero nomenclaturaux etc) et met a jour l'inventaire (addelement())
-
 
195
   * @return void
-
 
196
   */
-
 
197
  public void onValidate(SourcesAutoCompleteAsyncTextBoxEvents sender,int pos, String str) {
189
	 * nomenclaturaux etc) et met a jour l'inventaire (addelement())
Line 198... Line 190...
198
	
190
	 * 
Line 199... Line -...
199
	  	setStatusDisabled();
-
 
Line 200... Line -...
200
	  	
-
 
201
	    // Il y a surement une meilleure facon de faire que de passer par une variable de classe 
-
 
202
	    // pour atteindre une inner classe
191
	 * @return void
203
	  
192
	 */
Line 204... Line 193...
204
	    element=str;
193
	public void onValidate(SourcesAutoCompleteAsyncTextBoxEvents sender,
Line 205... Line 194...
205
	
194
			 final String str,final String value) {
206
	    // Saisie assistée
195
 
Line 207... Line -...
207
	  
-
 
208
	    if (pos>=0) {
-
 
209
	 
196
		setStatusDisabled();
210
	    // Le vecteur complements contient les informations complémentaires associées à un nom.
197
 
-
 
198
		// Saisie assistée
-
 
199
 
211
	    	
200
		if (value !=null) {
-
 
201
 
-
 
202
 
-
 
203
			HTTPRequest.asyncGet(serviceBaseUrl + "/NameValid/" + value,
212
	    complement=(String) complements.get(pos);
204
					new ResponseTextHandler() {
-
 
205
 
213
	 
206
						public void onCompletion(String strcomplete) {
-
 
207
 
214
		 HTTPRequest.asyncGet(serviceBaseUrl+"/NameValid/"+complement, 
208
							JSONValue jsonValue = JSONParser.parse(strcomplete);
215
				    new ResponseTextHandler(){
209
							JSONArray jsonArray;
Line 216... Line 210...
216
 
210
 
217
				    	public void onCompletion(String str) {
211
							if ((jsonArray = jsonValue.isArray()) != null) {
218
		    
212
								// Nom retenu, Num Nomen nom retenu, Num Taxon,
219
							JSONValue jsonValue= JSONParser.parse(str);
213
								// Famille
220
				  			JSONArray jsonArray;
-
 
221
				
-
 
222
				  			complements.clear();
214
								addElement(str, value,
223
				  			
215
										((JSONString) jsonArray.get(0))
224
				  			if ((jsonArray = jsonValue.isArray()) != null) {
216
												.stringValue(),
Line 225... Line 217...
225
				  					  // Nom retenu, Num Nomen nom retenu, Num Taxon, Famille
217
										((JSONString) jsonArray.get(1))
226
								      addElement(element,complement,((JSONString) jsonArray.get(0)).stringValue(),
218
												.stringValue(),
-
 
219
										((JSONString) jsonArray.get(2))
-
 
220
												.stringValue(),
227
								    		  ((JSONString) jsonArray.get(1)).stringValue(),((JSONString) jsonArray.get(2)).stringValue(),
221
										((JSONString) jsonArray.get(3))
-
 
222
												.stringValue());
228
								    		  ((JSONString) jsonArray.get(3)).stringValue());
223
							}
-
 
224
						}
-
 
225
 
229
				  			}
226
					});
230
				    	} 
227
		}
-
 
228
		// Saisie libre
231
 
229
		else {
232
				   	});
230
			addElement(str, " ", " ", " ", " ", " ");
-
 
231
		}
233
	    }
232
	}
Line 234... Line 233...
234
	    // Saisie libre
233
 
-
 
234
	/**
Line 235... Line 235...
235
	    else {
235
	 * Ajoute un element à l'inventaire
Line 236... Line 236...
236
 			complements.clear();
236
	 * 
237
 
237
	 * @param nom_sel :
238
			addElement(element," "," "," "," "," ");
238
	 *            nom selectionne
239
	    }
239
	 * @param num_nom_sel :
Line 240... Line 240...
240
  }
240
	 *            numero nomenclatural nom selectionne
241
 
241
	 * @param nom_ret :
-
 
242
	 *            nom retenu
242
  /**
243
	 * @param num_nom_ret :
-
 
244
	 *            numero nomenclaturel nom retenu
Line 243... Line 245...
243
   * Ajoute un element à l'inventaire 
245
	 * @param num_taxon :
Line 244... Line 246...
244
   * @param nom_sel : nom selectionne
246
	 *            numero taxonomique
245
   * @param num_nom_sel : numero nomenclatural nom selectionne
247
	 * @param famille :
Line 274... Line 276...
274
  /**
276
	/**
275
   * Suppression d'un element lde l'inventaire, a partir de son numero d'ordre
277
	 * Suppression d'un element lde l'inventaire, a partir de son numero d'ordre
276
   *
278
	 * 
277
   */
279
	 */
Line 278... Line -...
278
 
-
 
279
  
280
 
Line 280... Line -...
280
  public void deleteElement() {
-
 
281
 
281
	public void deleteElement() {
282
	  
282
 
Line 283... Line 283...
283
	  setStatusDisabled();
283
		setStatusDisabled();
284
	  boolean checked=false;
284
		boolean checked = false;
285
 
285
 
286
	    // Lifo ...
286
		// Lifo ...
287
      for (int i=table.getRowCount()-1; i>=0;i--){
287
		for (int i = table.getRowCount() - 1; i >= 0; i--) {
288
		 if (((CheckBox) table.getWidget(i,0)).isChecked())  {
288
			if (((CheckBox) table.getWidget(i, 0)).isChecked()) {
289
			checked=true;
289
				checked = true;
-
 
290
				String str = table.getText(i, 6);
290
			String str=table.getText(i,6);
291
				count--;
Line 291... Line 292...
291
			count--;
292
				HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user
292
			 HTTPRequest.asyncPost(serviceBaseUrl+"/Inventory/"+user+"/"+str, "action=DELETE", 
293
						+ "/" + str, "action=DELETE",
293
			   new ResponseTextHandler(){
294
						new ResponseTextHandler() {
Line 305... Line 306...
305
      }
306
		}
306
  }
307
	}
Line 307... Line 308...
307
 
308
 
308
  /** 
309
	/**
309
   * 
310
	 * 
310
   * Lancement des initialisations dependantes de réponses asynchrones : le retour d'une demande d'initialisation declanche 
311
	 * Lancement des initialisations dependantes de réponses asynchrones : le
311
   * la demande d'initialisation suivantes
312
	 * retour d'une demande d'initialisation declanche la demande
312
   * user : resultat recherche nom d'utilisateur
313
	 * d'initialisation suivantes user : resultat recherche nom d'utilisateur
313
   * count : resultat nombre d'enregistrements d'inventaires
314
	 * count : resultat nombre d'enregistrements d'inventaires affichage
314
   * affichage enregistrements trouvés 
315
	 * enregistrements trouvés
315
   *
316
	 * 
316
   */
317
	 */
Line 317... Line 318...
317
  private void initAsync() {
318
	private void initAsync() {
Line 326... Line 327...
326
   * Recherche utilisateur en cours 
327
	 * Recherche utilisateur en cours
327
   *
328
	 * 
328
   */
329
	 */
329
  private void getUser() {
330
	private void getUser() {
Line 330... Line -...
330
	  
-
 
331
	  
331
 
Line 332... Line 332...
332
    	 setStatusDisabled();
332
		setStatusDisabled();
333
 
333
 
Line 342... Line 342...
342
				    		    }
342
						}
343
				    		    getCount();
343
						getCount();
344
				    	}
344
					}
345
			 	});
345
				});
Line 346... Line -...
346
		    
-
 
347
		  
-
 
348
 
346
 
Line 349... Line 347...
349
		}  
347
	}
350
 
348
 
351
 /**
349
	/**
Line 370... Line 368...
370
	 	});
368
				});
Line 371... Line 369...
371
 
369
 
Line 372... Line 370...
372
  }
370
	}
373
 
371
 
374
  /**
372
	/**
-
 
373
	 * Mise a jour de l'affichage, à partir des données d'inventaire deja
375
   * Mise a jour de l'affichage, à partir des données d'inventaire deja saisies.
374
	 * saisies. La valeur de this.startIndex permet de determiner quelles
376
   * La valeur de this.startIndex permet de determiner quelles données seront affichées 
375
	 * données seront affichées
Line 377... Line 376...
377
   *
376
	 * 
Line 378... Line -...
378
   */
-
 
379
  
377
	 */
Line 380... Line 378...
380
  private void update() {
378
 
-
 
379
	private void update() {
Line 381... Line 380...
381
	  
380
 
-
 
381
		setStatusDisabled();
Line 382... Line 382...
382
 
382
 
Line 383... Line 383...
383
	 setStatusDisabled();
383
		// TODO : optimisation : ne supprimer que les lignes qui ne seront pas
Line 397... Line 397...
397
		    		    // Lifo ...
397
				// Lifo ...
398
		    	        for (int i=table.getRowCount()-1; i>=0;i--){
398
				for (int i = table.getRowCount() - 1; i >= 0; i--) {
399
		                        table.removeRow(i);
399
					table.removeRow(i);
400
		                }
400
				}
Line 401... Line -...
401
 
-
 
402
 
401
 
403
		    		    int j=0;
402
				int j = 0;
404
		    		    if ((jsonArray = jsonValue.isArray()) != null) {
403
				if ((jsonArray = jsonValue.isArray()) != null) {
405
		    		      for (int i = 0; i < jsonArray.size(); ++i) {
404
					for (int i = 0; i < jsonArray.size(); ++i) {
406
		    		    	  if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
405
						if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
407
		    		    		  int row=table.insertRow(table.getRowCount());
406
							int row = table.insertRow(table.getRowCount());
408
		    		    		  // Case a cocher
407
							// Case a cocher
409
		    		    		  table.setWidget(row,0,new CheckBox());
408
							table.setWidget(row, 0, new CheckBox());
410
		    		    		  // Nom saisi
409
							// Nom saisi
-
 
410
							table.setText(row, 1, ((JSONString) jsonArrayNested
411
		    		    		  table.setText(row,1,((JSONString) jsonArrayNested.get(0)).stringValue());
411
									.get(0)).stringValue());
412
		    		    		  // Nom retenu
412
							// Nom retenu
-
 
413
							table.setText(row, 2, ((JSONString) jsonArrayNested
413
		    		    		  table.setText(row,2,((JSONString) jsonArrayNested.get(2)).stringValue());
414
									.get(2)).stringValue());
414
		    		    		  // Num nomenclatural
415
							// Num nomenclatural
-
 
416
							table.setText(row, 3, ((JSONString) jsonArrayNested
415
		    		    		  table.setText(row,3,((JSONString) jsonArrayNested.get(1)).stringValue());
417
									.get(1)).stringValue());
416
		    		    		  // Num Taxonomique
418
							// Num Taxonomique
-
 
419
							table.setText(row, 4, ((JSONString) jsonArrayNested
417
		    		    		  table.setText(row,4,((JSONString) jsonArrayNested.get(4)).stringValue());
420
									.get(4)).stringValue());
418
		    		    		  // Famille
421
							// Famille
-
 
422
							table.setText(row, 5, ((JSONString) jsonArrayNested
419
		    		    		  table.setText(row,5,((JSONString) jsonArrayNested.get(5)).stringValue());
423
									.get(5)).stringValue());
420
		    		    		  // Numero d'ordre
424
							// Numero d'ordre
-
 
425
							table.setText(row, 6, ((JSONString) jsonArrayNested
Line 421... Line 426...
421
		    		    		  table.setText(row,6,((JSONString) jsonArrayNested.get(6)).stringValue());
426
									.get(6)).stringValue());
Line 422... Line 427...
422
		    		    		  
427
 
423
		    		    		  table.getCellFormatter().setVisible(row,6,false);
428
							table.getCellFormatter().setVisible(row, 6, false);
-
 
429
 
424
		    		     		  
430
							table.getFlexCellFormatter().setWidth(row, 0, "2%");
-
 
431
							table.getFlexCellFormatter()
425
		    		    		  table.getFlexCellFormatter().setWidth(row,0,"2%");
432
									.setWidth(row, 1, "31%");
426
		    		    		  table.getFlexCellFormatter().setWidth(row,1,"31%");
433
							table.getFlexCellFormatter()
427
		    		    		  table.getFlexCellFormatter().setWidth(row,2,"31%");
434
									.setWidth(row, 2, "31%");
-
 
435
							table.getFlexCellFormatter().setWidth(row, 3, "9%");
428
		    		    		  table.getFlexCellFormatter().setWidth(row,3,"9%");
436
							table.getFlexCellFormatter().setWidth(row, 4, "9%");
429
		    		    		  table.getFlexCellFormatter().setWidth(row,4,"9%");
437
							table.getFlexCellFormatter()
Line 430... Line 438...
430
		    		    		  table.getFlexCellFormatter().setWidth(row,5,"18%");
438
									.setWidth(row, 5, "18%");
431
		    		    		  j++;
439
							j++;
Line 447... Line 455...
447
	private String getServiceBaseUrl() {
455
	private String getServiceBaseUrl() {
Line 448... Line 456...
448
		  
456
 
449
		  Dictionary theme = Dictionary.getDictionary("Parameters");
457
		Dictionary theme = Dictionary.getDictionary("Parameters");
Line 450... Line -...
450
		  return theme.get("serviceBaseUrl");
-
 
451
		  
458
		return theme.get("serviceBaseUrl");
Line 452... Line -...
452
	
-
 
453
		}  
459
 
454
	
460
	}
-
 
461
 
455
	
462
	/**
456
	/**
463
	 * Affichage message d'attente et désactivation navigation
457
	 * Affichage message d'attente et désactivation navigation
464
	 * 
Line 458... Line 465...
458
	 * @param 
465
	 * @param
Line 467... Line 474...
467
		navBar.gotoEnd.setEnabled(false);
474
		navBar.gotoEnd.setEnabled(false);
Line 468... Line 475...
468
	
475
 
469
		setStatusText("Patientez ...");
476
		setStatusText("Patientez ...");
Line 470... Line -...
470
	}
-
 
471
	
477
	}
472
 
478
 
473
	/**
479
	/**
474
	 * Affichage numero de page et gestion de la navigation
480
	 * Affichage numero de page et gestion de la navigation
Line 479... Line 485...
479
	
485
 
Line 480... Line 486...
480
		// Il y a forcemment un disabled avant d'arriver ici
486
		// Il y a forcemment un disabled avant d'arriver ici
Line 481... Line 487...
481
		
487
 
-
 
488
		if (count > 0) {
482
		if (count > 0 ) {	
489
 
483
				
490
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la
484
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la premiere page
491
														// premiere page
-
 
492
				navBar.gotoPrev.setEnabled(true);
-
 
493
				navBar.gotoFirst.setEnabled(true);
485
				navBar.gotoPrev.setEnabled(true);
494
				if (startIndex < (count - VISIBLE_TAXON_COUNT)) { // Pas la
486
				navBar.gotoFirst.setEnabled(true);
495
																	// derniere
487
				if (startIndex<(count-VISIBLE_TAXON_COUNT)) {  // Pas la derniere page
496
																	// page
488
					navBar.gotoNext.setEnabled(true);
497
					navBar.gotoNext.setEnabled(true);
489
					navBar.gotoEnd.setEnabled(true);
498
					navBar.gotoEnd.setEnabled(true);
490
					setStatusText((startIndex + 1) + " - " + (startIndex + VISIBLE_TAXON_COUNT));
499
					setStatusText((startIndex + 1) + " - "
491
				}
500
							+ (startIndex + VISIBLE_TAXON_COUNT));
492
				else { // Derniere page
-
 
493
					setStatusText((startIndex + 1) + " - " + count);
501
				} else { // Derniere page
494
				}
502
					setStatusText((startIndex + 1) + " - " + count);
495
			}
503
				}
496
			else {  // Premiere page
504
			} else { // Premiere page
497
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
505
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
498
					navBar.gotoNext.setEnabled(true);
506
					navBar.gotoNext.setEnabled(true);
499
					navBar.gotoEnd.setEnabled(true);
507
					navBar.gotoEnd.setEnabled(true);
500
					setStatusText((startIndex + 1) + " - " + (startIndex + VISIBLE_TAXON_COUNT));
508
					setStatusText((startIndex + 1) + " - "
501
				}
509
							+ (startIndex + VISIBLE_TAXON_COUNT));
502
				else {
510
				} else {
503
					setStatusText((startIndex + 1) + " - " + count);
511
					setStatusText((startIndex + 1) + " - " + count);
Line 504... Line -...
504
				}
-
 
505
			}
512
				}
506
		}
513
			}
507
		
514
		}
508
		
515
 
Line 509... Line -...
509
		else { // Pas d'inventaire, pas de navigation
-
 
510
			 setStatusText(0 + " - " + 0);
516
		else { // Pas d'inventaire, pas de navigation
511
		}
517
			setStatusText(0 + " - " + 0);
-
 
518
		}
-
 
519
	}
512
	}
520
 
513
	
521
	/**
514
	
522
	 * Positionnement index de parcours (this.startIndex) pour affichage de la
Line 515... Line 523...
515
	/**
523
	 * dernière page
Line 516... Line 524...
516
	 * Positionnement index de parcours (this.startIndex) pour affichage de la dernière page
524
	 * 
517
	 * @param 
525
	 * @param
518
	 * @return void  
-
 
519
	 */
526
	 * @return void
520
	
527
	 */
521
	private void gotoEnd() {
528
 
Line 522... Line 529...
522
		
529
	private void gotoEnd() {