Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1332 Rev 1488
Line 1... Line 1...
1
package org.tela_botanica.client.vues.observation;
1
package org.tela_botanica.client.vues.observation;
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
// TODO Detecter redim et supprimer ajuster
3
// TODO Detecter redim et supprimer ajuster
-
 
4
 
4
 
5
import java.util.Date;
Line 5... Line 6...
5
import java.util.Date;
6
import java.util.HashMap;
6
import java.util.Iterator;
7
import java.util.Iterator;
7
 
8
 
Line 18... Line 19...
18
import org.tela_botanica.client.modeles.objets.ListeReferentielPerso.TypesReferentiels;
19
import org.tela_botanica.client.modeles.objets.ListeReferentielPerso.TypesReferentiels;
19
import org.tela_botanica.client.observation.ObservationMediateur;
20
import org.tela_botanica.client.observation.ObservationMediateur;
20
import org.tela_botanica.client.util.AutoCompletionRefComboBox;
21
import org.tela_botanica.client.util.AutoCompletionRefComboBox;
21
import org.tela_botanica.client.util.Util;
22
import org.tela_botanica.client.util.Util;
Line -... Line 23...
-
 
23
 
-
 
24
import com.google.gwt.event.dom.client.KeyCodes;
22
 
25
import com.google.gwt.event.dom.client.KeyEvent;
23
import com.google.gwt.maps.client.geom.LatLng;
26
import com.google.gwt.maps.client.geom.LatLng;
24
import com.google.gwt.user.client.Timer;
27
import com.google.gwt.user.client.Timer;
25
import com.google.gwt.user.client.Window;
28
import com.google.gwt.user.client.Window;
26
import com.google.gwt.user.client.ui.HTML;
29
import com.google.gwt.user.client.ui.HTML;
Line 95... Line 98...
95
	private String referentielGeo = null;
98
	private String referentielGeo = null;
Line 96... Line 99...
96
 
99
 
Line 97... Line 100...
97
	// Pour remise a zero partielle lors d'une validation
100
	// Pour remise a zero partielle lors d'une validation
98
	
101
	
Line 99... Line 102...
99
	private  enum Champs {
102
	private  enum Champs {
100
	    DATE, LIEUDIT, STATION, MILIEU, COMMENT, COMMUNE, ESPECE, TOUT, LATITUDE, LONGITUDE ;
103
	    DATE, LIEUDIT, STATION, MILIEU, COMMENT, COMMUNE, ESPECE, TOUT, LATITUDE, LONGITUDE, ABONDANCE, CERTITUDE;
Line 101... Line 104...
101
	    
104
	    
Line 127... Line 130...
127
	    	case LATITUDE:
130
	    	case LATITUDE:
128
	    		return "latitude";
131
	    		return "latitude";
Line 129... Line 132...
129
	    		
132
	    		
130
	    	case LONGITUDE:
133
	    	case LONGITUDE:
-
 
134
	    		return "longitude";
-
 
135
	    		
-
 
136
	    	case ABONDANCE:
-
 
137
	    		return "abondance";
-
 
138
	    		
-
 
139
	    	case CERTITUDE:
Line 131... Line 140...
131
	    		return "longitude";
140
	    		return "certitude";
132
	    	
141
	    	
133
	    	case TOUT:
142
	    	case TOUT:
134
	    		return "date, commune, lieu dit, station, milieu, espèce, commentaire, latitude, longitude";
143
	    		return "date, commune, lieu dit, station, milieu, espèce, commentaire, latitude, longitude, abondance, certitude";
135
	    	}
144
	    	}
136
			return TOUT.toString();
145
			return TOUT.toString();
Line 141... Line 150...
141
	private Button boutonOK = new Button("Créer");
150
	private Button boutonOK = new Button("Créer");
142
	private Button boutonAnnuler = new Button("Réinitialiser");
151
	private Button boutonAnnuler = new Button("Réinitialiser");
Line 143... Line 152...
143
 
152
 
144
	private boolean selectionCommune=false;
153
	private boolean selectionCommune=false;
-
 
154
	private boolean selectionEspece=false;
-
 
155
	private boolean selectionAbondance = false;
Line 145... Line 156...
145
	private boolean selectionEspece=false;
156
	private boolean selectionCertitude = false;
146
	
157
	
Line 147... Line 158...
147
	private boolean modification = false ;
158
	private boolean modification = false ;
148
	private Toolbar bt = null ;
159
	private Toolbar bt = null ;
149
	
160
	
150
	private final String VALEURS_MULTIPLES = "(Valeurs multiples)";
161
	private final String VALEURS_MULTIPLES = "(Valeurs multiples)";
151
	private final String modeleMessageModif = "commune:lieu-dit:station:milieu:latitude:longitude:date:espece:commentaire";
162
	private final String modeleMessageModif = "commune:lieu-dit:station:milieu:latitude:longitude:date:espece:commentaire:abondance:certitude";
152
	private boolean communeModifiee = false;
163
	private boolean communeModifiee = false;
153
	private boolean lieuDitModifie = false;
164
	private boolean lieuDitModifie = false;
154
	private boolean stationModifiee = false;
165
	private boolean stationModifiee = false;
155
	private boolean milieuModifie = false;
166
	private boolean milieuModifie = false;
156
	private boolean dateModifiee = false;
-
 
-
 
167
	private boolean dateModifiee = false;
-
 
168
	private boolean especeModifiee = false;
Line 157... Line 169...
157
	private boolean especeModifiee = false;
169
	private boolean commModifie = false;
158
	private boolean commModifie = false;
170
	private boolean abondanceModifiee = false;
159
	
171
	private boolean certitudeModifiee = false;
160
	
172
	
Line 221... Line 233...
221
 
233
 
Line 222... Line 234...
222
	protected boolean rechercheCommuneEnCours = false;
234
	protected boolean rechercheCommuneEnCours = false;
Line 223... Line 235...
223
 
235
 
-
 
236
	private Timer tCoord;
-
 
237
	
-
 
238
	final String resultTplRefPerso = "<div class=\"search-item-commune\">{element_referentiel}</div>"; 
-
 
239
	
Line 224... Line 240...
224
	private Timer tCoord;
240
	private ComboBox selecteurAbondance = null; 
225
	
241
	
226
	final String resultTplRefPerso = "<div class=\"search-item-commune\">{element_referentiel}</div>";  
242
	private ComboBox selecteurCertitude = null; 
227
	
243
	
Line 456... Line 472...
456
		espece.setHideTrigger(true);
472
		espece.setHideTrigger(true);
457
		//espece.setTabIndex(6);
473
		//espece.setTabIndex(6);
Line 458... Line 474...
458
 
474
 
Line -... Line 475...
-
 
475
	    panneauPremierColonne.add(espece, new AnchorLayoutData("95%"));   
-
 
476
	    
-
 
477
	    selecteurAbondance = new ComboBox();
-
 
478
	    selecteurAbondance.setLabel("Abondance");
-
 
479
	    selecteurAbondance.setStore(getValeursAbondance());
-
 
480
	    selecteurAbondance.setDisplayField("label") ;
-
 
481
	    selecteurAbondance.setValueField("valeur");
-
 
482
	    selecteurAbondance.setEditable(true);
-
 
483
	    selecteurAbondance.setHideTrigger(false);
-
 
484
	    selecteurAbondance.setForceSelection(false);
-
 
485
	    panneauPremierColonne.add(selecteurAbondance, new AnchorLayoutData("50%"));   
-
 
486
	    
-
 
487
	    selecteurCertitude = new ComboBox();
-
 
488
	    selecteurCertitude.setLabel("Certitude");
-
 
489
	    selecteurCertitude.setStore(getValeursCertitude());
-
 
490
	    selecteurCertitude.setDisplayField("label") ;
-
 
491
	    selecteurCertitude.setValueField("valeur");
-
 
492
	    selecteurCertitude.setEditable(true);
-
 
493
	    selecteurCertitude.setHideTrigger(false);
-
 
494
	    selecteurCertitude.setForceSelection(false);
459
	    panneauPremierColonne.add(espece, new AnchorLayoutData("95%"));   
495
	    panneauPremierColonne.add(selecteurCertitude, new AnchorLayoutData("50%"));   
Line 460... Line 496...
460
	    
496
	    
461
	    lieudit = new AutoCompletionRefComboBox("Lieu-dit", "lieudit",observationMediateur,TypesReferentiels.REFERENTIEL_LIEU_DIT) {
497
	    lieudit = new AutoCompletionRefComboBox("Lieu-dit", "lieudit",observationMediateur,TypesReferentiels.REFERENTIEL_LIEU_DIT) {
462
 
498
 
Line 569... Line 605...
569
	        	
605
	        	
570
	        	doLayout();
606
	        	doLayout();
Line 571... Line 607...
571
	     }});
607
	     }});
572
		
-
 
573
		// on ajoute les listeners
-
 
574
		
608
		
575
		
-
 
576
		ajouterListeners() ;
609
		// on ajoute les listeners
-
 
610
		ajouterListeners() ;
577
		
611
		saisieTabindex();
-
 
612
	}
-
 
613
	
-
 
614
	private Store getValeursAbondance() {		
-
 
615
		Object[][] valeurs = {{"i : un seul individu","i"}, 
-
 
616
								{"r : rare (quelques pieds)","r"}, 
-
 
617
								{"+ : recouvrement R < 1%","+"}, 
-
 
618
								{"1 : 1% < R < 5%","1"}, 
-
 
619
								{"2 : 5% < R < 25%","2"}, 
-
 
620
								{"3 : 25% < R < 50%","3"}, 
-
 
621
								{"4 : 50% < R < 75%","4"}, 
-
 
622
								{"5 : recouvrement R > 75%","5"} 
-
 
623
							};
-
 
624
		SimpleStore storeAbondance = new SimpleStore(new String[] {"label","valeur"},valeurs);
-
 
625
		storeAbondance.load();
-
 
626
		return storeAbondance;
-
 
627
	}
-
 
628
	
-
 
629
	private Store getValeursCertitude() {		
-
 
630
		Object[][] valeurs = {{"Certain","certain"}, 
-
 
631
								{"Douteux","douteux"}, 
-
 
632
								{"A déterminer","aDeterminer"}
-
 
633
							};
-
 
634
		SimpleStore storeCertitude = new SimpleStore(new String[] {"label","valeur"},valeurs);
578
		saisieTabindex();
635
		storeCertitude.load();
Line 579... Line 636...
579
		
636
		return storeCertitude;
580
	}
637
	}
581
	
638
	
Line 881... Line 938...
881
		    	        	tCoord.cancel();
938
		    	        	tCoord.cancel();
882
		    	        	tCoord.schedule(250);
939
		    	        	tCoord.schedule(250);
883
					}
940
					}
884
				}
941
				}
885
		    });
942
		    });
-
 
943
			
-
 
944
			selecteurAbondance.addListener(new ComboBoxListenerAdapter() {  
-
 
945
 
-
 
946
				@Override
-
 
947
				public void onSelect(ComboBox comboBox, Record record, int index) {  
-
 
948
	                 selectionAbondance=true;
-
 
949
	                 abondanceModifiee = true;
-
 
950
	             }
-
 
951
	         });  
-
 
952
			
-
 
953
			selecteurAbondance.addKeyPressListener(new EventCallback() {
-
 
954
 
-
 
955
				@Override
-
 
956
				public void execute(EventObject e) {
-
 
957
					switch(e.getKey()) { 
-
 
958
						case KEY_ALT:
-
 
959
			    	      case KEY_CTRL:
-
 
960
			    	      case KEY_DOWN:
-
 
961
			    	      case KEY_END:
-
 
962
			    	      case KEY_ESCAPE:
-
 
963
			    	      case KEY_HOME:
-
 
964
			    	      case KEY_LEFT:
-
 
965
			    	      case KEY_PAGEDOWN:
-
 
966
			    	      case KEY_PAGEUP:
-
 
967
			    	      case KEY_RIGHT:
-
 
968
			    	      case KEY_SHIFT:
-
 
969
			    	      case KEY_TAB:
-
 
970
			    	      case KEY_UP:
-
 
971
		    	        break;
-
 
972
		    	        
-
 
973
			    	    case KEY_ENTER:
-
 
974
			    	    	if(!selectionAbondance) {	
-
 
975
		  	    	    		validerSaisie(Champs.ABONDANCE); 	
-
 
976
			    	    	} else {
-
 
977
			    	    		selectionAbondance = false;
-
 
978
			    	    	}
-
 
979
	  	    	    	break;
-
 
980
 
-
 
981
		    	        default:
-
 
982
		    	        	selecteurAbondance.setRawValue(selecteurAbondance.getRawValue());
-
 
983
		    	        	selecteurAbondance.setValue(selecteurAbondance.getRawValue());
-
 
984
		    	        	abondanceModifiee = true;
-
 
985
		    	        	selectionAbondance = false;
-
 
986
		    	        break;
-
 
987
					}
-
 
988
				}
-
 
989
		    });
-
 
990
			
-
 
991
			selecteurCertitude.addListener(new ComboBoxListenerAdapter() {  
-
 
992
 
-
 
993
				@Override
-
 
994
				public void onSelect(ComboBox comboBox, Record record, int index) {  
-
 
995
	                 selectionCertitude=true;
-
 
996
	                 certitudeModifiee = true;
-
 
997
	             }
-
 
998
	         });  
-
 
999
			
-
 
1000
			selecteurCertitude.addKeyPressListener(new EventCallback() {
-
 
1001
 
-
 
1002
				@Override
-
 
1003
				public void execute(EventObject e) {
-
 
1004
					switch(e.getKey()) { 
-
 
1005
						case KEY_ALT:
-
 
1006
			    	      case KEY_CTRL:
-
 
1007
			    	      case KEY_DOWN:
-
 
1008
			    	      case KEY_END:
-
 
1009
			    	      case KEY_ESCAPE:
-
 
1010
			    	      case KEY_HOME:
-
 
1011
			    	      case KEY_LEFT:
-
 
1012
			    	      case KEY_PAGEDOWN:
-
 
1013
			    	      case KEY_PAGEUP:
-
 
1014
			    	      case KEY_RIGHT:
-
 
1015
			    	      case KEY_SHIFT:
-
 
1016
			    	      case KEY_TAB:
-
 
1017
			    	      case KEY_UP:
-
 
1018
		    	        break;
-
 
1019
		    	        
-
 
1020
			    	    case KEY_ENTER:
-
 
1021
			    	    	if(!selectionCertitude) {	
-
 
1022
		  	    	    		validerSaisie(Champs.CERTITUDE); 	
-
 
1023
			    	    	} else {
-
 
1024
			    	    		selectionCertitude = false;
-
 
1025
			    	    	}
-
 
1026
	  	    	    	break;
-
 
1027
 
-
 
1028
		    	        default:
-
 
1029
		    	        	selecteurCertitude.setRawValue(selecteurCertitude.getRawValue());
-
 
1030
		    	        	selecteurCertitude.setValue(selecteurCertitude.getRawValue());
-
 
1031
		    	        	certitudeModifiee = true;
-
 
1032
		    	        	selectionCertitude = false;
-
 
1033
		    	        break;
-
 
1034
					}
-
 
1035
				}
-
 
1036
		    });
Line 886... Line 1037...
886
 
1037
 
Line 887... Line 1038...
887
		boutonOK.addListener(new ButtonListenerAdapter() {
1038
		boutonOK.addListener(new ButtonListenerAdapter() {
888
			
1039
			
Line 1254... Line 1405...
1254
		String[] coords = getValeurCoordonnees();
1405
		String[] coords = getValeurCoordonnees();
Line 1255... Line 1406...
1255
		
1406
		
1256
		obs.setLatitude(coords[0]);
1407
		obs.setLatitude(coords[0]);
Line -... Line 1408...
-
 
1408
		obs.setLongitude(coords[1]);
-
 
1409
		
-
 
1410
		obs.setAbondance(getAbondance());
1257
		obs.setLongitude(coords[1]);
1411
		obs.setCertitude(getCertitude());
1258
		
1412
		
Line 1259... Line 1413...
1259
		observationMediateur.ajouterObservation(obs);
1413
		observationMediateur.ajouterObservation(obs);
Line 1298... Line 1452...
1298
		String[] coords = getValeurCoordonnees();
1452
		String[] coords = getValeurCoordonnees();
Line 1299... Line 1453...
1299
		
1453
		
1300
		obs.setLatitude(coords[0]);
1454
		obs.setLatitude(coords[0]);
Line -... Line 1455...
-
 
1455
		obs.setLongitude(coords[1]);
-
 
1456
		
-
 
1457
		obs.setAbondance(getAbondance());
1301
		obs.setLongitude(coords[1]);
1458
		obs.setCertitude(getCertitude());
Line 1302... Line 1459...
1302
		
1459
		
1303
		observationMediateur.modifierObservation(obs);
1460
		observationMediateur.modifierObservation(obs);
Line 1317... Line 1474...
1317
		String dateM = null;
1474
		String dateM = null;
1318
		String especeM = null;
1475
		String especeM = null;
1319
		String commM = null; 
1476
		String commM = null; 
1320
		String latM = null;
1477
		String latM = null;
1321
		String longM = null;
1478
		String longM = null;
-
 
1479
		String abondanceM = null;
-
 
1480
		String certitudeM = null;
Line 1322... Line 1481...
1322
		
1481
		
Line 1323... Line 1482...
1323
		String champs = modeleMessageModif;
1482
		String champs = modeleMessageModif;
1324
			
1483
			
Line 1401... Line 1560...
1401
			longM = longitude.getText();
1560
			longM = longitude.getText();
1402
		}else {
1561
		}else {
1403
			champs = champs.replaceAll(":longitude", "");
1562
			champs = champs.replaceAll(":longitude", "");
1404
		}
1563
		}
Line -... Line 1564...
-
 
1564
		
-
 
1565
		if(abondanceModifiee && !selecteurAbondance.getRawValue().equals(VALEURS_MULTIPLES)) {
-
 
1566
			abondanceM = getAbondance();
-
 
1567
		} else {
-
 
1568
			champs = champs.replaceAll(":abondance", "");
-
 
1569
		}
-
 
1570
		
-
 
1571
		if(certitudeModifiee && !selecteurCertitude.getRawValue().equals(VALEURS_MULTIPLES)) {
-
 
1572
			certitudeM = getCertitude();
-
 
1573
		} else {
-
 
1574
			champs = champs.replaceAll(":certitude", "");
-
 
1575
		}
1405
		
1576
		
1406
		champs = champs.replaceAll(":",", ");
1577
		champs = champs.replaceAll(":",", ");
1407
		if(champs.startsWith(",")) {
1578
		if(champs.startsWith(",")) {
1408
			champs = champs.replaceFirst(",", "");
1579
			champs = champs.replaceFirst(",", "");
Line 1415... Line 1586...
1415
		} else {
1586
		} else {
1416
			Observation obs = new Observation(especeM,numNomSelM,communeM,departementM,lieuDitM,stationM,milieuM, commM,dateM);
1587
			Observation obs = new Observation(especeM,numNomSelM,communeM,departementM,lieuDitM,stationM,milieuM, commM,dateM);
1417
			obs.setNumeroOrdre(numeroOrdre);
1588
			obs.setNumeroOrdre(numeroOrdre);
1418
			obs.setLatitude(latM);
1589
			obs.setLatitude(latM);
1419
			obs.setLongitude(longM);
1590
			obs.setLongitude(longM);
-
 
1591
			obs.setAbondance(abondanceM);
-
 
1592
			obs.setCertitude(certitudeM);
1420
			if(Window.confirm(message)) {
1593
			if(Window.confirm(message)) {
1421
				observationMediateur.modifierObservationEnMasse(obs);
1594
				observationMediateur.modifierObservationEnMasse(obs);
1422
				reinitialiserValeurModifiees();
1595
				reinitialiserValeurModifiees();
1423
			}
1596
			}
1424
		}
1597
		}
Line 1505... Line 1678...
1505
		if(!obs.getLatitude().equals("null") && !obs.getLatitude().equals("000null")
1678
		if(!obs.getLatitude().equals("null") && !obs.getLatitude().equals("000null")
1506
				&& !obs.getLongitude().equals("null") && !obs.getLongitude().equals("000null")) {
1679
				&& !obs.getLongitude().equals("null") && !obs.getLongitude().equals("000null")) {
1507
			latitude.setValue(obs.getLatitude()) ;
1680
			latitude.setValue(obs.getLatitude()) ;
1508
			longitude.setValue(obs.getLongitude()) ;
1681
			longitude.setValue(obs.getLongitude()) ;
1509
		}
1682
		}
-
 
1683
		
-
 
1684
		selecteurAbondance.getStore().load();
-
 
1685
		selecteurAbondance.setValue(obs.getAbondance());
-
 
1686
		
-
 
1687
		selecteurCertitude.getStore().load();
-
 
1688
		selecteurCertitude.setValue(obs.getCertitude());
1510
	}
1689
	}
Line 1511... Line 1690...
1511
	
1690
	
1512
	
1691
	
Line 1562... Line 1741...
1562
			case LONGITUDE:
1741
			case LONGITUDE:
1563
				longitude.reset();
1742
				longitude.reset();
1564
				afficherIndicationCommune(null);
1743
				afficherIndicationCommune(null);
1565
				break;
1744
				break;
Line -... Line 1745...
-
 
1745
				
-
 
1746
			case ABONDANCE:
-
 
1747
				selecteurAbondance.setValue("");
-
 
1748
				break;
-
 
1749
				
-
 
1750
			case CERTITUDE:
-
 
1751
				selecteurCertitude.setValue("");
-
 
1752
				break;
1566
				
1753
				
1567
			case TOUT:
1754
			case TOUT:
1568
				commune.reset();
1755
				commune.reset();
1569
				date.reset() ;
1756
				date.reset() ;
1570
				lieudit.reset() ;
1757
				lieudit.reset() ;
Line 1574... Line 1761...
1574
				milieu.reset() ;
1761
				milieu.reset() ;
1575
				latitude.reset();
1762
				latitude.reset();
1576
				longitude.reset();
1763
				longitude.reset();
1577
				departement ="";
1764
				departement ="";
1578
				espece.reset();
1765
				espece.reset();
-
 
1766
				selecteurAbondance.clearValue();
-
 
1767
				selecteurCertitude.clearValue();
1579
				numeroNom = "" ;
1768
				numeroNom = "" ;
1580
				numeroOrdre = "";
1769
				numeroOrdre = "";
1581
				afficherIndicationCommune(null);
1770
				afficherIndicationCommune(null);
1582
				break;
1771
				break;
Line 1655... Line 1844...
1655
		String espece = null;
1844
		String espece = null;
1656
		String date = null;
1845
		String date = null;
1657
		String notes = null;
1846
		String notes = null;
1658
		String lat = null;
1847
		String lat = null;
1659
		String lon = null;
1848
		String lon = null;
-
 
1849
		String abondance = null;
-
 
1850
		String certitude = null;
Line 1660... Line 1851...
1660
		
1851
		
Line 1661... Line 1852...
1661
		String ordreObs = "";
1852
		String ordreObs = "";
1662
		
1853
		
Line 1670... Line 1861...
1670
			espece = comparerDifferencesChamps(espece, obsEnCours.getNomSaisi()); 
1861
			espece = comparerDifferencesChamps(espece, obsEnCours.getNomSaisi()); 
1671
			date = comparerDifferencesChamps(date, obsEnCours.getDate());
1862
			date = comparerDifferencesChamps(date, obsEnCours.getDate());
1672
			notes = comparerDifferencesChamps(notes, obsEnCours.getCommentaire());
1863
			notes = comparerDifferencesChamps(notes, obsEnCours.getCommentaire());
1673
			lat = comparerDifferencesChamps(lat, obsEnCours.getLatitude());
1864
			lat = comparerDifferencesChamps(lat, obsEnCours.getLatitude());
1674
			lon = comparerDifferencesChamps(lon, obsEnCours.getLongitude());
1865
			lon = comparerDifferencesChamps(lon, obsEnCours.getLongitude());
-
 
1866
			abondance = comparerDifferencesChamps(abondance, obsEnCours.getAbondance());
-
 
1867
			certitude = comparerDifferencesChamps(certitude, obsEnCours.getCertitude());
Line 1675... Line 1868...
1675
			
1868
			
1676
			ordreObs += obsEnCours.getNumeroOrdre()+",";
1869
			ordreObs += obsEnCours.getNumeroOrdre()+",";
Line 1677... Line 1870...
1677
		}
1870
		}
1678
		
1871
		
1679
		Observation obs=new Observation(espece,numeroNom,commune,departement,lieuDit,station,milieu, notes,date);
1872
		Observation obs=new Observation(espece,numeroNom,commune,departement,lieuDit,station,milieu, notes,date);
1680
		obs.setNumeroOrdre(ordreObs);
1873
		obs.setNumeroOrdre(ordreObs);
-
 
1874
		obs.setLatitude(lat);
-
 
1875
		obs.setLongitude(lon);
1681
		obs.setLatitude(lat);
1876
		obs.setAbondance(abondance);
1682
		obs.setLongitude(lon);
-
 
1683
		rafraichir(obs, false);
1877
		obs.setCertitude(certitude);
Line 1684... Line 1878...
1684
		
1878
		rafraichir(obs, false);	
Line 1685... Line 1879...
1685
	}
1879
	}
Line 1698... Line 1892...
1698
				}
1892
				}
1699
			}
1893
			}
1700
		return retour;
1894
		return retour;
1701
	}
1895
	}
Line 1702... Line 1896...
1702
	
1896
	
1703
	private void reinitialiserValeurModifiees() {
-
 
1704
		
1897
	private void reinitialiserValeurModifiees() {	
1705
		communeModifiee = false;
1898
		communeModifiee = false;
1706
		lieuDitModifie = false;
1899
		lieuDitModifie = false;
1707
		stationModifiee = false;
1900
		stationModifiee = false;
1708
		milieuModifie = false;
1901
		milieuModifie = false;
1709
		dateModifiee = false;
1902
		dateModifiee = false;
1710
		especeModifiee = false;
1903
		especeModifiee = false;
1711
		commModifie = false;
1904
		commModifie = false;
1712
		latModifiee = false;
1905
		latModifiee = false;
-
 
1906
		longModifiee = false;
-
 
1907
		abondanceModifiee = false;
1713
		longModifiee = false;
1908
		certitudeModifiee = false;
Line 1714... Line 1909...
1714
	}
1909
	}
1715
	
1910
	
Line 1737... Line 1932...
1737
		latitude.setTabIndex(8);
1932
		latitude.setTabIndex(8);
1738
		longitude.setTabIndex(9);
1933
		longitude.setTabIndex(9);
1739
		comment.setTabIndex(10);
1934
		comment.setTabIndex(10);
1740
		date.setTabIndex(11);
1935
		date.setTabIndex(11);
1741
		espece.setTabIndex(12);
1936
		espece.setTabIndex(12);
-
 
1937
		selecteurAbondance.setTabIndex(13);
-
 
1938
		selecteurCertitude.setTabIndex(14);
1742
		boutonOK.setTabIndex(13);
1939
		boutonOK.setTabIndex(15);
1743
		boutonAnnuler.setTabIndex(14);
1940
		boutonAnnuler.setTabIndex(16);
Line 1744... Line 1941...
1744
		
1941
		
Line 1745... Line 1942...
1745
	}
1942
	}
1746
	
1943
	
Line 1845... Line 2042...
1845
	}
2042
	}
Line 1846... Line 2043...
1846
	 
2043
	 
1847
	public String getCommuneSansDepartement() {
2044
	public String getCommuneSansDepartement() {
1848
		return Util.supprimerNumDepartementChaineLocalite(getCommune());
2045
		return Util.supprimerNumDepartementChaineLocalite(getCommune());
-
 
2046
	}
-
 
2047
	
-
 
2048
	//TODO fusionner les deux fonctions et les objets qu'elles utilisent 
-
 
2049
	// car leur code est à 99% identique
-
 
2050
	public String getAbondance() {
-
 
2051
		String valeurAbondance = selecteurAbondance.getValue();
-
 
2052
		String valeurAbondanceBrute = selecteurAbondance.getRawValue();
-
 
2053
		
-
 
2054
		// Test idiot qui permet de savoir si l'on utilise la valeur saisie directement ou bien la valeur
-
 
2055
		// selectionnee car lors du setValue sur le keypress, gwtext ne prends pas en compte le dernier 
-
 
2056
		// caractère
-
 
2057
		if(valeurAbondance.equals(valeurAbondanceBrute.substring(0, valeurAbondanceBrute.length() -1))) {
-
 
2058
			valeurAbondance = selecteurAbondance.getRawValue();
-
 
2059
		}
-
 
2060
		
-
 
2061
		return valeurAbondance;
-
 
2062
	}
-
 
2063
	
-
 
2064
	public String getCertitude() {
-
 
2065
		String valeurCertitude = selecteurCertitude.getValue();
-
 
2066
		String valeurCertitudeBrute = selecteurCertitude.getRawValue();
-
 
2067
		
-
 
2068
		// Test idiot qui permet de savoir si l'on utilise la valeur saisie directement ou bien la valeur
-
 
2069
		// selectionnee car lors du setValue sur le keypress, gwtext ne prends pas en compte le dernier 
-
 
2070
		// caractère
-
 
2071
		if(valeurCertitude.equals(valeurCertitudeBrute.substring(0, valeurCertitudeBrute.length() -1))) {
-
 
2072
			valeurCertitude = selecteurCertitude.getRawValue();
-
 
2073
		}
-
 
2074
		
-
 
2075
		return valeurCertitude;
Line 1849... Line 2076...
1849
	}
2076
	}
1850
 
2077
 
1851
	public boolean communeInitialisee() {
2078
	public boolean communeInitialisee() {