📄 page.java
字号:
package oa.sys;
import java.util.*;
/**
****************************************************
*类名称: #Page<br>
*类功能: 分页解决方案<br>
****************************************************
*/
public class Page {
public int curPage;//当前页
public int maxPage;//最大页
public int maxRowCount;//最大行
public int rowsPerPage=5;//每页行
public Collection coll=null;
public Page(){
}
/***************************************************
*函数名称: getCountPage()<br>
*函数功能: 获取总页数<br>
*返回值: 无<br>
*参数说明: 无<br>
****************************************************/
public void getCountPage(){
if(this.maxRowCount%this.rowsPerPage==0){
this.maxPage=this.maxRowCount/this.rowsPerPage;
}else{
this.maxPage=this.maxRowCount/this.rowsPerPage+1;
}
}
public Collection getResult(){
return this.coll;
}
public Page(Contact contact)throws Exception{
this.maxRowCount=contact.getCount();
this.coll=contact.getResult();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -