Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 128 Rev 140
Line 176... Line 176...
176
				switch(node.getDepth()) 
176
				switch(node.getDepth()) 
177
				{
177
				{
178
					case 0:
178
					case 0:
179
						if(!arbreCharge)
179
						if(!arbreCharge)
180
						{
180
						{
181
							/*observationMediateur.obtenirListeEntiteGeographique() ;
-
 
182
							arbreCharge = true ;*/
-
 
183
							arbreEntitesGeographiques.getRootNode().expand();
181
							arbreEntitesGeographiques.getRootNode().expand();
184
						}
182
						}
185
						else 
183
						else 
186
						{
184
						{
187
							observationMediateur.obtenirNombreObservation() ;
185
							observationMediateur.obtenirNombreObservation() ;
Line 220... Line 218...
220
				}
218
				}
221
			}
219
			}
Line 222... Line 220...
222
			
220
			
223
		}) ;
221
		}) ;
-
 
222
	}
-
 
223
	
-
 
224
	public void initialiser() {
-
 
225
		
-
 
226
		arbreCharge = false ;
-
 
227
		arbreEntitesGeographiques.collapseAll();
-
 
228
		// on vide l'ancien arbre
-
 
229
		Node[] rootChild = arbreEntitesGeographiques.getRootNode().getChildNodes();
-
 
230
		for (int i = 0; i < rootChild.length; i++) {
-
 
231
			
-
 
232
			rootChild[i].remove();
-
 
233
		}
-
 
234
		
-
 
235
		arbreEntitesGeographiques.getRootNode().addListener(new TreeNodeListenerAdapter() {
-
 
236
			
-
 
237
			public void onExpand(Node node) {
-
 
238
				if(!arbreCharge)
-
 
239
				{
-
 
240
					observationMediateur.obtenirListeEntiteGeographique() ;
-
 
241
					arbreCharge = true ;
-
 
242
				}
-
 
243
			}
-
 
244
			
-
 
245
		}) ;
Line 224... Line 246...
224
	}
246
	}
225
 
247
 
226
	/**
248
	/**
227
	 * Méthode héritée de l'interface rafraichissable
249
	 * Méthode héritée de l'interface rafraichissable
Line 251... Line 273...
251
				
273
				
Line 252... Line 274...
252
				EntiteGeographiqueObservation ent=(EntiteGeographiqueObservation) data.get(it.next());
274
				EntiteGeographiqueObservation ent=(EntiteGeographiqueObservation) data.get(it.next());
253
				
275
				
-
 
276
				id_location=ent.getIdLocation();
-
 
277
				id_location = id_location.replaceAll("\"", "");
254
				id_location=ent.getIdLocation();
278
				id_location = id_location.replace('\\',' ');
255
				id_location = id_location.replaceAll("\"", "");
279
				id_location = id_location.trim();
Line 256... Line 280...
256
				location=ent.getLocation();
280
				location=ent.getLocation();
257
				lieuDit=ent.getLieuDit();
281
				lieuDit=ent.getLieuDit();
Line 380... Line 404...
380
			
404
			
Line 381... Line 405...
381
			Observation obs = (Observation)nouvelleDonnees ;
405
			Observation obs = (Observation)nouvelleDonnees ;
382
			
406
			
-
 
407
			String id_location= obs.getIdentifiantLocalite();
-
 
408
			id_location = id_location.replaceAll("\"", "");
-
 
409
			id_location = id_location.replace('\\',' ');
383
			String id_location= obs.getIdentifiantLocalite();
410
			id_location = id_location.trim();
384
			id_location = id_location.replaceAll("\"", "");
411
			
Line 385... Line 412...
385
			String location=obs.getLocalite();
412
			String location=obs.getLocalite();
Line 604... Line 631...
604
	}
631
	}
Line 605... Line 632...
605
 
632
 
Line 606... Line 633...
606
	public void raz() {
633
	public void raz() {
-
 
634
			
607
			
635
		arbreCharge = false ;
Line 608... Line 636...
608
		arbreCharge = false ;
636
		arbreEntitesGeographiques.collapseAll();
609
		arbreEntitesGeographiques.clear() ;
637
		arbreEntitesGeographiques.clear() ;
610
		
638