page.java
来自「一个基于struts框架开发的论坛系统,适合学习」· Java 代码 · 共 64 行
JAVA
64 行
package frm;
import java.util.*;
public class Page {
private int rows;
private int totalRows;
private int columns;
private int pageNo; //从 1 开始,
private int pageLen;
private ArrayList data;
public Page(int pn,int len){
pageNo=pn;
pageLen=len;
}
public void setData(ArrayList v,int iTotal,int cols){
data=v;
rows=v.size();
totalRows=iTotal;
columns=cols;
}
public int getRows(){
return rows;
}
public int getColumns(){
return columns;
}
public int getTotalRows(){
return totalRows;
}
public int getPageNo(){
return pageNo;
}
public int getTotalPage(){
int i=totalRows/pageLen;
if(totalRows%pageLen>0){
i++;
}
return i;
}
public int getPageLen(){
return pageLen;
}
public ArrayList getData(){
return data;
}
public Collection getCollection(){
return (Collection)data;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?