Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 62 Rev 63
Line 27... Line 27...
27
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
27
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
28
import com.gwtext.client.core.EventObject;
28
import com.gwtext.client.core.EventObject;
29
import com.gwtext.client.dd.DragData;
29
import com.gwtext.client.dd.DragData;
Line 30... Line 30...
30
 
30
 
31
/**
31
/**
32
 * Fausse liste d'observation pour tester le drag n' drop et l'insertion
-
 
33
 * Est vouée à devenir une véritable liste avec de vraie données
32
 * liste d'observation pour l'association d'images aux observations
34
 * @author aurelien
33
 * @author aurelien
35
 *
34
 *
36
 */
35
 */
Line 170... Line 169...
170
	public void rafraichir(Object nouvelleDonnees,
169
	public void rafraichir(Object nouvelleDonnees,
171
			boolean repandreRaffraichissement) {
170
			boolean repandreRaffraichissement) {
Line 172... Line 171...
172
		
171
		
173
		if(nouvelleDonnees instanceof ListeObservation)
172
		if(nouvelleDonnees instanceof ListeObservation)
174
		{
-
 
175
			ListeObservation data = (ListeObservation)nouvelleDonnees ;
-
 
176
			String[][] listeObs = new String[data.size()][3] ;
173
		{
177
			int i = 0 ;
-
 
178
			
-
 
179
			for (Iterator it = data.keySet().iterator(); it.hasNext();) 
174
			if(this.getView() != null)
-
 
175
			{
-
 
176
				ListeObservation data = (ListeObservation)nouvelleDonnees ;
-
 
177
				String[][] listeObs = new String[data.size()][3] ;
180
			{
178
				int i = 0 ;
-
 
179
				
-
 
180
				for (Iterator it = data.keySet().iterator(); it.hasNext();) 
-
 
181
				{
181
				
182
					
182
				Observation obs=(Observation) data.get(it.next());
183
					Observation obs=(Observation) data.get(it.next());
183
				
184
					
184
				listeObs[i][0] = obs.getNumeroOrdre();
185
					listeObs[i][0] = obs.getNumeroOrdre();
185
				listeObs[i][1] = obs.getNomSaisi();
186
					listeObs[i][1] = obs.getNomSaisi();
186
				listeObs[i][2] = obs.getDate() ;
187
					listeObs[i][2] = obs.getDate() ;
187
			
188
				
-
 
189
					i++ ;
-
 
190
				}
-
 
191
	
-
 
192
				store = new SimpleStore(new String[]{"id_obs","plante","date"}, listeObs);  	
-
 
193
				store.load();       
-
 
194
				this.reconfigure(store, colModel) ;
-
 
195
			}
-
 
196
			else
-
 
197
			{
-
 
198
				addListener(new ContainerListenerAdapter() {
-
 
199
					
-
 
200
					public void onShow(Component c)
-
 
201
					{
-
 
202
						obtenirMiniListeObservations() ;
-
 
203
					}
-
 
204
					
188
				i++ ;
205
				}) ;
189
			}
-
 
190
 
-
 
191
			store = new SimpleStore(new String[]{"id_obs","plante","date"}, listeObs);  	
-
 
192
			store.load();       
-
 
Line 193... Line 206...
193
			this.reconfigure(store, colModel) ;
206
			}
Line 194... Line 207...
194
	
207