Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 406 Rev 1291
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.client.interfaces.ListePaginable;
3
import org.tela_botanica.client.interfaces.ListePaginable;
Line 4... Line 4...
4
import org.tela_botanica.client.interfaces.Rafraichissable;
4
import org.tela_botanica.client.interfaces.Rafraichissable;
5
 
-
 
6
import com.google.gwt.user.client.Window;
5
 
7
import com.gwtext.client.core.EventCallback;
6
import com.google.gwt.user.client.Window;
8
import com.gwtext.client.core.EventObject;
7
import com.gwtext.client.core.EventObject;
9
import com.gwtext.client.core.Template;
8
import com.gwtext.client.core.Template;
10
import com.gwtext.client.data.Record;
9
import com.gwtext.client.data.Record;
Line 14... Line 13...
14
import com.gwtext.client.widgets.Toolbar;
13
import com.gwtext.client.widgets.Toolbar;
15
import com.gwtext.client.widgets.ToolbarButton;
14
import com.gwtext.client.widgets.ToolbarButton;
16
import com.gwtext.client.widgets.ToolbarTextItem;
15
import com.gwtext.client.widgets.ToolbarTextItem;
17
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
16
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
18
import com.gwtext.client.widgets.form.ComboBox;
17
import com.gwtext.client.widgets.form.ComboBox;
19
import com.gwtext.client.widgets.form.Field;
-
 
20
import com.gwtext.client.widgets.form.TextField;
-
 
21
import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
18
import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
22
import com.gwtext.client.widgets.form.event.TextFieldListenerAdapter;
-
 
Line 23... Line 19...
23
 
19
 
Line 24... Line 20...
24
public class MiniBarrePaginationVue extends Toolbar implements Rafraichissable {
20
public class MiniBarrePaginationVue extends Toolbar implements Rafraichissable {
25
 
21
 
Line 188... Line 184...
188
	/**
184
	/**
189
	 * ajoute les différents listeners nécessaires au bon fonctionnement des
185
	 * ajoute les différents listeners nécessaires au bon fonctionnement des
190
	 * éléments de la barre de pagination
186
	 * éléments de la barre de pagination
191
	 */
187
	 */
192
	private void ajouterListeners() {
188
	private void ajouterListeners() {
193
		
-
 
194
		
-
 
195
 
-
 
196
		// boutons suivants et précédents
189
		// boutons suivants et précédents
197
		prevPage.addListener(new ButtonListenerAdapter() {
190
		prevPage.addListener(new ButtonListenerAdapter() {
Line -... Line 191...
-
 
191
 
198
 
192
			@Override
Line 199... Line 193...
199
			public void onClick(Button button, EventObject e) {
193
			public void onClick(Button button, EventObject e) {
200
 
194
 
201
				// si la page courante n'est pas la première
195
				// si la page courante n'est pas la première
Line 210... Line 204...
210
			}
204
			}
211
		});
205
		});
Line 212... Line 206...
212
 
206
 
Line -... Line 207...
-
 
207
		suivPage.addListener(new ButtonListenerAdapter() {
213
		suivPage.addListener(new ButtonListenerAdapter() {
208
 
Line 214... Line 209...
214
 
209
			@Override
215
			public void onClick(Button button, EventObject e) {
210
			public void onClick(Button button, EventObject e) {
216
				
211
				
Line 227... Line 222...
227
		});
222
		});
Line 228... Line 223...
228
 
223
 
229
		// listener pour la selection dans la combobox
224
		// listener pour la selection dans la combobox
Line -... Line 225...
-
 
225
		selecteurTaillePage.addListener(new ComboBoxListenerAdapter() {
230
		selecteurTaillePage.addListener(new ComboBoxListenerAdapter() {
226
 
Line 231... Line 227...
231
 
227
			@Override
232
			public void onSelect(ComboBox comboBox, Record record, int index) {
228
			public void onSelect(ComboBox comboBox, Record record, int index) {
233
 
229
 
Line 260... Line 256...
260
	}
256
	}
Line 261... Line 257...
261
 
257
 
262
	/**
258
	/**
263
	 * Methode héritée de l'interface rafraichissable
259
	 * Methode héritée de l'interface rafraichissable
-
 
260
	 */
264
	 */
261
	@Override
265
	public void rafraichir(Object nouvelleDonnees,
262
	public void rafraichir(Object nouvelleDonnees,
Line 266... Line 263...
266
			boolean repandreRaffraichissement) {
263
			boolean repandreRaffraichissement) {
267
 
264
 
Line 295... Line 292...
295
	 * 
292
	 * 
296
	 * @return un tableau de string qui contient les différentes
293
	 * @return un tableau de string qui contient les différentes
297
	 *         taille de pages
294
	 *         taille de pages
298
	 */
295
	 */
299
	public String[] getNbPages() {
296
	public String[] getNbPages() {
300
 
-
 
301
		return pages;
297
		return pages;
302
	}
298
	}
Line 303... Line 299...
303
 
299
 
304
	/**
300
	/**
Line 308... Line 304...
308
	 * @param nouvelleTaillePage
304
	 * @param nouvelleTaillePage
309
	 *            la nouvelle taille de page (élement appartenant au tableau
305
	 *            la nouvelle taille de page (élement appartenant au tableau
310
	 *            renvoyé par getNbPages())
306
	 *            renvoyé par getNbPages())
311
	 */
307
	 */
312
	public void changerTaillePage(int nouvelleTaillePage) {
308
	public void changerTaillePage(int nouvelleTaillePage) {
313
 
-
 
314
		listePaginable.changerTaillePage(nouvelleTaillePage);
309
		listePaginable.changerTaillePage(nouvelleTaillePage);
315
 
-
 
316
	}
310
	}
Line 317... Line 311...
317
 
311
 
318
	/**
312
	/**
319
	 * Selectionne la valeur correspond à celle passée en paramètre dans la
313
	 * Selectionne la valeur correspond à celle passée en paramètre dans la
320
	 * combobox (si elle existe)
314
	 * combobox (si elle existe)
321
	 * 
315
	 * 
322
	 * @param nouvelleTaillePage
316
	 * @param nouvelleTaillePage
323
	 *            la nouvelle taille de page
317
	 *            la nouvelle taille de page
324
	 */
318
	 */
325
	public void selectionnerTaillePage(int nouvelleTaillePage) {
-
 
326
 
319
	public void selectionnerTaillePage(int nouvelleTaillePage) {
327
		selecteurTaillePage.setValue("" + nouvelleTaillePage);
320
		selecteurTaillePage.setValue("" + nouvelleTaillePage);
328
	}
321
	}