📄 pagers.java
字号:
package com.today.common;
import com.today.prodect.model.Logic;
public class Pagers {
//当前页数
private int cur_page;
//总页数
private int count_page;
//每页显示的行熟
private int per_page=3;
//记录总条数
private int count_rows;
//总页数
public int getCur_page() {
return cur_page;
}
public void setCur_page(int cur_page) {
this.cur_page = cur_page;
}
public int getCount_page(String table_name) {
Logic logic=new Logic();
this.setCount_rows(logic.getCountRows(table_name));
if (count_rows % per_page == 0) {
count_page = count_rows / per_page;
}
else {
count_page = count_rows / per_page + 1;
}
return count_page;
}
public void setCount_page(int count_page) {
this.count_page = count_page;
}
public int getPer_page() {
return per_page;
}
public void setPer_page(int per_page) {
this.per_page = per_page;
}
public int getCount_rows() {
return count_rows;
}
public void setCount_rows(int count_rows) {
this.count_rows = count_rows;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -