pagebean.java
来自「jspservlet+mvc tomcat」· Java 代码 · 共 55 行
JAVA
55 行
package mvc;
import java.util.Vector;
public class PageBean{
private int curPage; //当前是第几页
private int maxPage; //一共有多少页
private int maxRowCount; //一共有多少行
private int rowsPerPage = 10;//每页多少行
private Vector data;
public void setCurPage(int c){
this.curPage = c;
}
public void setMaxPage() { //根据总行数计算总页数
if (this.maxRowCount % this.rowsPerPage==0){
this.maxPage = this.maxRowCount/this.rowsPerPage;
}else{
this.maxPage = this.maxRowCount/this.rowsPerPage + 1;
}
}
public void setMaxRowCount(int m){
this.maxRowCount = m;
}
public void setData(Vector v){
this.data = v;
}
public int getCurPage(){
return this.curPage;
}
public int getMaxPage(){
return this.maxPage;
}
public int getMaxRowCount(){
return this.maxRowCount;
}
public Vector getData(){
return this.data;
}
public int getRowsPerPage(){
return this.rowsPerPage;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?