Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1627 Rev 2204
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.client.CarnetEnLigneMediateur;
3
import org.tela_botanica.client.CarnetEnLigneMediateur;
4
import org.tela_botanica.client.interfaces.Rafraichissable;
4
import org.tela_botanica.client.interfaces.Rafraichissable;
Line -... Line 5...
-
 
5
import org.tela_botanica.client.modeles.objets.Utilisateur;
5
import org.tela_botanica.client.modeles.objets.Utilisateur;
6
 
6
 
7
import com.google.gwt.user.client.Timer;
-
 
8
import com.gwtext.client.core.EventCallback;
7
import com.gwtext.client.core.EventCallback;
9
import com.gwtext.client.core.EventObject;
8
import com.gwtext.client.core.EventObject;
10
import com.gwtext.client.core.ListenerConfig;
9
import com.gwtext.client.data.ArrayReader;
11
import com.gwtext.client.data.ArrayReader;
10
import com.gwtext.client.data.FieldDef;
12
import com.gwtext.client.data.FieldDef;
11
import com.gwtext.client.data.MemoryProxy;
13
import com.gwtext.client.data.MemoryProxy;
Line 48... Line 50...
48
	private final int KEY_RIGHT = 39;
50
	private final int KEY_RIGHT = 39;
49
	private final int KEY_SHIFT = 16;
51
	private final int KEY_SHIFT = 16;
50
	private final int KEY_TAB = 9;
52
	private final int KEY_TAB = 9;
51
	private final int KEY_UP = 38;
53
	private final int KEY_UP = 38;
Line -... Line 54...
-
 
54
	
-
 
55
	private Timer timerCompletion = null;
52
	
56
	
53
	public ListeUtilisateurAdminVue(CarnetEnLigneMediateur cMed) {
57
	public ListeUtilisateurAdminVue(CarnetEnLigneMediateur cMed) {
Line 54... Line 58...
54
		super("Choisir un utilisateur") ;
58
		super("Choisir un utilisateur") ;
Line 108... Line 112...
108
					EventObject e) {
112
					EventObject e) {
109
				close();
113
				close();
110
			}
114
			}
111
		});
115
		});
Line -... Line 116...
-
 
116
		
-
 
117
	    ListenerConfig listenerConfigAutocompletion=new ListenerConfig();
-
 
118
	    listenerConfigAutocompletion.setDelay(200);
-
 
119
	    listenerConfigAutocompletion.setStopPropagation(false);
-
 
120
	    listenerConfigAutocompletion.setStopEvent(false);
112
		
121
		
Line 113... Line 122...
113
		listeUtil.addKeyPressListener(new EventCallback() {
122
		listeUtil.addKeyPressListener(new EventCallback() {
114
 
123
 
Line 145... Line 154...
145
	    	    			close();
154
	    	    			close();
146
		    	    	 }
155
		    	    	 }
147
		    	    break;  
156
		    	    break;  
Line 148... Line 157...
148
		    	    
157
		    	    
-
 
158
		    	    default:
-
 
159
		    	    	if(timerCompletion != null) {
-
 
160
		    	    		timerCompletion.cancel();
-
 
161
		    	    	}
-
 
162
	    	    		timerCompletion = new Timer() {
149
		    	    default:
163
							public void run() {
-
 
164
				    	    	obtenirListeUtilisateur();
-
 
165
							}	
-
 
166
	    	    		};
150
		    	    	obtenirListeUtilisateur();
167
	    	    		timerCompletion.schedule(250);
151
		    	    break;
168
		    	    break;
152
				}
169
				}
153
			}
170
			}
Line 154... Line 171...
154
		});
171
		}, listenerConfigAutocompletion);
Line 155... Line 172...
155
		
172
		
156
		listeUtil.addListener(new ComboBoxListenerAdapter() {
173
		listeUtil.addListener(new ComboBoxListenerAdapter() {
Line 185... Line 202...
185
			
202
			
186
			storeUtil =new Store(dataProxy,reader);
203
			storeUtil =new Store(dataProxy,reader);
Line 187... Line 204...
187
			storeUtil.load() ;
204
			storeUtil.load() ;
-
 
205
	
-
 
206
			listeUtil.setStore(storeUtil);
-
 
207
			
-
 
208
			// Tentative de corriger un bug insupportable de la taille de la liste
188
	
209
			// mais ça ne marche pas à tous les coups
189
			listeUtil.setStore(storeUtil);
-
 
190
			listeUtil.expand();
210
			listeUtil.collapse();
Line 191... Line 211...
191
		
211
			listeUtil.expand();
Line 192... Line 212...
192
		}
212
		}