Subversion Repositories eFlore/Archives.cel-v2

Rev

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

Rev 8 Rev 9
Line 1... Line 1...
1
package org.tela_botanica.client.observation;
1
package org.tela_botanica.client.observation;
Line 2... Line -...
2
 
-
 
3
 
-
 
4
 
-
 
Line 5... Line 2...
5
import net.mygwt.ui.client.event.BaseEvent;
2
 
6
import net.mygwt.ui.client.event.Listener;
3
 
7
import net.mygwt.ui.client.util.Observable;
4
 
8
 
5
 
Line 9... Line 6...
9
import org.tela_botanica.client.CarnetEnLigneMediateur;
6
import org.tela_botanica.client.CarnetEnLigneMediateur;
10
import org.tela_botanica.client.interfaces.iMediateur;
7
import org.tela_botanica.client.interfaces.iMediateur;
11
import org.tela_botanica.client.interfaces.iRetourObservation;
8
import org.tela_botanica.client.interfaces.iRetourObservation;
Line 12... Line 9...
12
import org.tela_botanica.client.modeles.Observation;
9
import org.tela_botanica.client.modeles.Observation;
Line 13... Line 10...
13
 
10
 
14
import com.google.gwt.user.client.Window;
11
import com.google.gwt.user.client.Window;
Line 147... Line 144...
147
	 * Deconnexion de l'utilisateur en cours 
144
	 * Deconnexion de l'utilisateur en cours 
148
	 */
145
	 */
Line 149... Line 146...
149
	
146
	
Line 150... Line 147...
150
	public void deconnecterUtilisateur() {
147
	public void deconnecterUtilisateur() {
151
		
148
		
Line 152... Line 149...
152
		carnetEnLigneMediateur.addListener(CarnetEnLigneMediateur.DECONNEXION,this);
149
	//	carnetEnLigneMediateur.addListener(CarnetEnLigneMediateur.DECONNEXION,this);
Line 162... Line 159...
162
	 */
159
	 */
Line 163... Line 160...
163
	
160
	
Line 164... Line 161...
164
	
161
	
165
	public void connecterUtilisateur(String login, String password) {
162
	public void connecterUtilisateur(String login, String password) {
Line 166... Line 163...
166
		
163
		
Line 184... Line 181...
184
 
181
 
185
		observationModele.getNombreObservation(
182
		observationModele.getNombreObservation(
186
				new iRetourObservation() {
183
				new iRetourObservation() {
187
					public void onRetour(Observation obs) {
184
					public void onRetour(Observation obs) {
188
						observation=obs;
185
						observation=obs;
189
						fireEvent(NOMBRE_OBSERVATION); 
186
						//fireEvent(NOMBRE_OBSERVATION); 
Line 190... Line 187...
190
					}
187
					}
Line 203... Line 200...
203
			
200
			
204
			observationModele.getListeObservation(
201
			observationModele.getListeObservation(
205
					new iRetourObservation() {
202
					new iRetourObservation() {
206
						public void onRetour(Observation obs) {
203
						public void onRetour(Observation obs) {
207
							observation=obs;
204
							observation=obs;
208
							fireEvent(LISTE_OBSERVATION); 
205
							//fireEvent(LISTE_OBSERVATION); 
Line 209... Line 206...
209
						}
206
						}
Line 228... Line 225...
228
	
225
	
229
/**
226
/**
230
 * Evenements
227
 * Evenements
231
 * 
228
 * 
232
 */	
229
 */	
233
	
230
	/*
234
	public void handleEvent(BaseEvent be) {
231
	public void handleEvent(BaseEvent be) {
235
		switch (be.type) {
232
		switch (be.type) {
236
			case CarnetEnLigneMediateur.DECONNEXION:
233
			case CarnetEnLigneMediateur.DECONNEXION:
237
				afficheEtatConnexion();
234
				afficheEtatConnexion();
Line 246... Line 243...
246
				}
243
				}
247
				break;
244
				break;
248
		}
245
		}
249
	}
246
	}
Line 250... Line 247...
250
 
247