?? page.java
字號:
package com.parddu.crm.util;
public class Page {
private int pageNumber = 10; //每頁顯示的記錄數量(默認10)
private int recoredCount = 0; //總的記錄數量
private int pageIndex = 1; //當前頁面索引編號
private int pageCount = 1; //總的頁面數量
/**
* 設置分頁屬性
* @param rcount 總的記錄數量
* @param pnum 每頁顯示數量
* @param pind 當前也面編號
*/
public void setPage(int rcount,int pnum,int pind){
if(rcount>=0){
this.recoredCount = rcount;
}
if(pnum>=1 && pnum<=100){
this.pageNumber = pnum;
}
this.pageCount = this.recoredCount / this.pageNumber;
if(this.recoredCount%this.pageNumber!=0){
this.pageCount++;
}
if(this.pageCount<1){
this.pageCount = 1;
}
this.pageIndex = pind;
if(this.pageIndex<1){
this.pageIndex = 1;
}
if(this.pageIndex>this.pageCount){
this.pageIndex = this.pageCount;
}
}
public int getPageCount() {
return pageCount;
}
public int getPageIndex() {
return pageIndex;
}
public int getPageNumber() {
return pageNumber;
}
public int getRecoredCount() {
return recoredCount;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -