Subversion Repositories eFlore/Applications.coel

Rev

Rev 860 | Rev 875 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 860 Rev 862
Line 27... Line 27...
27
import com.extjs.gxt.ui.client.store.ListStore;
27
import com.extjs.gxt.ui.client.store.ListStore;
28
import com.extjs.gxt.ui.client.store.Store;
28
import com.extjs.gxt.ui.client.store.Store;
29
import com.extjs.gxt.ui.client.store.StoreEvent;
29
import com.extjs.gxt.ui.client.store.StoreEvent;
30
import com.extjs.gxt.ui.client.widget.ContentPanel;
30
import com.extjs.gxt.ui.client.widget.ContentPanel;
31
import com.extjs.gxt.ui.client.widget.Info;
31
import com.extjs.gxt.ui.client.widget.Info;
-
 
32
import com.extjs.gxt.ui.client.widget.Text;
32
import com.extjs.gxt.ui.client.widget.button.Button;
33
import com.extjs.gxt.ui.client.widget.button.Button;
33
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
34
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
34
import com.extjs.gxt.ui.client.widget.form.ComboBox;
35
import com.extjs.gxt.ui.client.widget.form.ComboBox;
35
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
36
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
36
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
37
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
Line 106... Line 107...
106
		ToolBar barreOutils = new ToolBar();  
107
		ToolBar barreOutils = new ToolBar();  
Line 107... Line 108...
107
		
108
		
108
		Button ajouterPersonneBouton = creerBoutonAjouter();
109
		Button ajouterPersonneBouton = creerBoutonAjouter();
Line -... Line 110...
-
 
110
		barreOutils.add(ajouterPersonneBouton);
-
 
111
		
-
 
112
		barreOutils.add(new Text(" ou "));
-
 
113
		
-
 
114
		personnesSaisisComboBox = creerComboBoxAuteursSaisis();
109
		barreOutils.add(ajouterPersonneBouton);
115
		barreOutils.add(personnesSaisisComboBox);
Line 110... Line 116...
110
		
116
		
111
		barreOutils.add(new SeparatorToolItem());
117
		barreOutils.add(new SeparatorToolItem());
Line 121... Line 127...
121
		barreOutils.add(new SeparatorToolItem());
127
		barreOutils.add(new SeparatorToolItem());
Line 122... Line 128...
122
		
128
		
123
		Button rafraichirPersonneBouton = creerBoutonRafraichir();
129
		Button rafraichirPersonneBouton = creerBoutonRafraichir();
Line 124... Line -...
124
		barreOutils.add(rafraichirPersonneBouton);
-
 
125
		
-
 
126
		barreOutils.add(new SeparatorToolItem());
-
 
127
		
-
 
128
		personnesSaisisComboBox = creerComboBoxAuteursSaisis();
-
 
129
		barreOutils.add(personnesSaisisComboBox);
-
 
130
		
-
 
131
		ajouterPersonneSaisiBouton = creerBoutonAjouterPersonneSaisie();
-
 
132
		barreOutils.add(ajouterPersonneSaisiBouton);
130
		barreOutils.add(rafraichirPersonneBouton);
133
		
131
				
Line 134... Line 132...
134
		return barreOutils;
132
		return barreOutils;
135
	}
133
	}
Line 274... Line 272...
274
		});
272
		});
275
		comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
273
		comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
276
			@Override
274
			@Override
277
			public void handleEvent(BaseEvent be) {
275
			public void handleEvent(BaseEvent be) {
278
				if (personnesSaisisComboBox.getValue() instanceof Personne) {
276
				if (personnesSaisisComboBox.getValue() instanceof Personne) {
279
					ajouterPersonneSaisiBouton.fireEvent(Events.Select);
-
 
280
				}
-
 
281
			}
-
 
282
		});
-
 
283
		return comboBox;
-
 
284
	}
-
 
285
	
-
 
286
	private Button creerBoutonAjouterPersonneSaisie() {
-
 
287
		Button bouton = new Button(i18nC.ajouter());
-
 
288
		bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {  
-
 
289
			@Override  
-
 
290
			public void componentSelected(ButtonEvent ce) {  
-
 
291
				Personne auteurSaisiSelectionne = personnesSaisisComboBox.getValue();
277
					Personne auteurSaisiSelectionne = personnesSaisisComboBox.getValue();
292
				ajouterDansGrille(auteurSaisiSelectionne);
278
					ajouterDansGrille(auteurSaisiSelectionne);
293
				personnesSaisisComboBox.setValue(null);
279
					personnesSaisisComboBox.setValue(null);
294
			}  
280
				}
-
 
281
			}
295
		});
282
		});
296
		return bouton;
283
		return comboBox;
297
	}
284
	}
Line 298... Line 285...
298
	
285
	
299
	private void ajouterDansGrille(Personne personne) {
286
	private void ajouterDansGrille(Personne personne) {
300
		if (personne != null) {
287
		if (personne != null) {