Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 86 Rev 87
Line 14... Line 14...
14
import com.google.gwt.user.client.Window;
14
import com.google.gwt.user.client.Window;
15
import com.google.gwt.user.client.ui.Label;
15
import com.google.gwt.user.client.ui.Label;
16
import com.gwtext.client.data.Node;
16
import com.gwtext.client.data.Node;
17
import com.gwtext.client.data.NodeTraversalCallback;
17
import com.gwtext.client.data.NodeTraversalCallback;
18
import com.gwtext.client.data.Tree;
18
import com.gwtext.client.data.Tree;
-
 
19
import com.gwtext.client.data.event.NodeListenerAdapter;
19
import com.gwtext.client.widgets.Component;
20
import com.gwtext.client.widgets.Component;
20
import com.gwtext.client.widgets.Panel;
21
import com.gwtext.client.widgets.Panel;
21
import com.gwtext.client.widgets.event.PanelListenerAdapter;
22
import com.gwtext.client.widgets.event.PanelListenerAdapter;
22
import com.gwtext.client.widgets.tree.TreeNode;
23
import com.gwtext.client.widgets.tree.TreeNode;
23
import com.gwtext.client.widgets.tree.TreePanel;
24
import com.gwtext.client.widgets.tree.TreePanel;
-
 
25
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
24
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
26
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
25
import com.gwtext.client.core.EventObject;
27
import com.gwtext.client.core.EventObject;
Line 26... Line 28...
26
 
28
 
27
/**
29
/**
Line 64... Line 66...
64
 
66
 
65
	/**
67
	/**
66
	 * booléen d'etat
68
	 * booléen d'etat
67
	 */
69
	 */
68
	private boolean filtreModifie = false;
-
 
69
 
-
 
Line 70... Line 70...
70
	private String[] valeursFiltrees = null ;
70
	private boolean filtreModifie = false;
Line 71... Line 71...
71
	
71
	
Line 166... Line 166...
166
		arbreEntitesGeographiques.addListener(new TreePanelListenerAdapter() {
166
		arbreEntitesGeographiques.addListener(new TreePanelListenerAdapter() {
Line 167... Line 167...
167
			
167
			
Line 168... Line 168...
168
			public void onClick(TreeNode node, EventObject e) {
168
			public void onClick(TreeNode node, EventObject e) {
-
 
169
				
-
 
170
				nomFiltre = "" ;
-
 
171
				entitesGeographiquesEncours = "" ;
Line 169... Line 172...
169
				
172
				String nomPere = "" ;
170
				nomFiltre = "" ;
173
				String nomGrandPere = "" ;
171
				
174
				
172
				switch(node.getDepth()) 
175
				switch(node.getDepth()) 
Line 177... Line 180...
177
							observationMediateur.obtenirListeEntiteGeographique() ;
180
							observationMediateur.obtenirListeEntiteGeographique() ;
178
							arbreCharge = true ;
181
							arbreCharge = true ;
179
						}
182
						}
180
						else 
183
						else 
181
						{
184
						{
182
							entitesGeographiquesEncours = "" ;
-
 
183
							observationMediateur.obtenirNombreObservation() ;
185
							observationMediateur.obtenirNombreObservation() ;
184
						}
186
						}
185
						return ;
187
						return ;
186
					case 1: nomFiltre = "id_location"; 
188
					case 3: nomFiltre += "lieudit,location,id_location";
-
 
189
						nomPere = ((String[])node.getParentNode().getUserObject())[0] ;
-
 
190
						nomGrandPere = ((String[])node.getParentNode().getParentNode().getUserObject())[0] ;
-
 
191
						entitesGeographiquesEncours += node.getText()+","+nomPere+","+nomGrandPere ;
187
						break;
192
						break;
188
					case 2: nomFiltre = "location"; 
193
					case 2: nomFiltre += "location,id_location"; 
-
 
194
						nomPere = ((String[])node.getParentNode().getUserObject())[0] ;
-
 
195
						entitesGeographiquesEncours += node.getText()+","+nomPere ;
189
						break;
196
						break;
190
					case 3: nomFiltre = "lieudit"; 
197
					case 1: nomFiltre += "id_location"; 
-
 
198
						entitesGeographiquesEncours += node.getText() ;
191
						break;
199
						break;
192
					default: 
200
					default: 
193
						break;
201
						break;
194
				}
202
				}
Line 195... Line -...
195
				
-
 
196
				if(node.getText().equals("Inconnue"))
-
 
197
				{
-
 
198
					entitesGeographiquesEncours = "000null" ;
-
 
199
				}
-
 
200
				else
-
 
201
				{
-
 
202
					entitesGeographiquesEncours = node.getText() ;
-
 
203
				}
-
 
204
				//Window.alert("Les entités sont : "+entitesGeographiquesEncours) ;
203
				
205
				filtreModifie = true ;
204
				filtreModifie = true ;
Line 206... Line 205...
206
				observationMediateur.obtenirNombreObservation() ;
205
				observationMediateur.obtenirNombreObservation() ;
Line 207... Line 206...
207
				
206
				
-
 
207
			}
-
 
208
			
-
 
209
		}) ;
-
 
210
		
-
 
211
		arbreEntitesGeographiques.getRootNode().addListener(new TreeNodeListenerAdapter() {
-
 
212
			
-
 
213
			public void onExpand(Node node) {
-
 
214
				if(!arbreCharge)
-
 
215
				{
-
 
216
					observationMediateur.obtenirListeEntiteGeographique() ;
-
 
217
					arbreCharge = true ;
-
 
218
				}
208
			}
219
			}
Line 209... Line 220...
209
			
220
			
210
		}) ;
221
		}) ;
211
	}
222
	}
Line 217... Line 228...
217
			boolean repandreRaffraichissement) {
228
			boolean repandreRaffraichissement) {
Line 218... Line 229...
218
 
229
 
Line 219... Line -...
219
 
-
 
220
		if (nouvelleDonnees instanceof ListeEntiteGeographiqueObservation) {
-
 
221
		
230
 
222
			
231
		if (nouvelleDonnees instanceof ListeEntiteGeographiqueObservation) {
223
			
232
		
Line 224... Line 233...
224
			String entite=null;
233
			String entite=null;