?? pageform.java
字號:
package news.form;
import java.util.Vector;
import org.apache.struts.action.ActionForm;
public class PageForm extends ActionForm{
private int curPage = 1; //當前是第幾頁
private int maxPage; //一共有多少頁
private int maxRowCount; //一共有多少行
private int rowsPerPage = 5 ;//每頁多少行
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -