Subversion Repositories eFlore/Applications.del

Rev

Rev 9 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 14
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.searchobservations.pagination;
1
package org.tela_botanica.del.client.vues.rechercheobservations.pagination;
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
import org.tela_botanica.del.client.vues.searchobservations.ObservationSearchPresenter;
3
import org.tela_botanica.del.client.vues.rechercheobservations.ObservationRecherchePresenteur;
4
 
4
 
5
import com.google.gwt.event.dom.client.ClickEvent;
5
import com.google.gwt.event.dom.client.ClickEvent;
Line 6... Line 6...
6
import com.google.gwt.event.dom.client.ClickHandler;
6
import com.google.gwt.event.dom.client.ClickHandler;
Line 7... Line 7...
7
import com.google.gwt.user.client.ui.HasWidgets;
7
import com.google.gwt.user.client.ui.HasWidgets;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
public class NumberPagePresenter {
9
public class NumeroPagePresenteur {
10
 
10
 
11
	private final NumberPageView view;
11
	private final NumeroPageVue view;
12
 
12
 
Line 13... Line 13...
13
	private int nbPage = 1;
13
	private int nbPage = 1;
14
 
14
 
15
	public NumberPagePresenter(int nbPage) {
15
	public NumeroPagePresenteur(int nbPage) {
Line 29... Line 29...
29
			public void onClick(ClickEvent event) {
29
			public void onClick(ClickEvent event) {
Line 30... Line 30...
30
 
30
 
31
				int firstImage;
31
				int firstImage;
Line 32... Line 32...
32
				int lastImage;
32
				int lastImage;
33
 
33
 
Line 34... Line 34...
34
				int nbImagePerPage = ObservationSearchPresenter.getInstance()
34
				int nbImagePerPage = ObservationRecherchePresenteur.getInstance()
35
						.getView().getNbImagesPerPage();
35
						.getView().getNbImagesPerPage();
36
 
36
 
37
				if (nbPage == 1) {
37
				if (nbPage == 1) {
38
					firstImage = 0;
38
					firstImage = 0;
Line 39... Line 39...
39
				} else {
39
				} else {
Line 40... Line 40...
40
					firstImage = ((nbPage - 1) * nbImagePerPage);
40
					firstImage = ((nbPage - 1) * nbImagePerPage);
41
				}
41
				}
Line 42... Line 42...
42
 
42
 
43
				lastImage = (nbPage - 1) * nbImagePerPage + nbImagePerPage;
43
				lastImage = (nbPage - 1) * nbImagePerPage + nbImagePerPage;
44
 
44