⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pageobj.java

📁 仓库管理系统毕业设计论文最好的参考资料!
💻 JAVA
字号:
package com.qhit.vo;

import java.util.List;

public class PageObj {
	private int pagesize = 5;
	private int currpage = 1;
	private int ppage;
	private int npage;
	private int allcount;
	private int allpage;
	
	private List list;
	public int getAllpage(){
		return allpage;
	}
	public int getAllcount(){
		return allcount;
	}
	public int getCurrpage() {
		return currpage;
	}

	public void setCurrpage(int currpage) {
		this.currpage = currpage;
		ppage = currpage -1;
		npage = currpage + 1;
		
		if(ppage <= 0)ppage = 1;
		if(npage >= allpage) npage = allpage;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		allcount = list.size();
		allpage = (int)Math.ceil(1.0*allcount/pagesize);
		if(currpage>allpage)currpage = allpage;
		if(currpage == 0)currpage = 1;
		setCurrpage(currpage);
		int from = (currpage-1)*pagesize;
		int to = currpage*pagesize;
		if(to>allcount)to=allcount;
		this.list = list.subList(from, to);
	}

	public int getNpage() {
		return npage;
	}

	public void setNpage(int npage) {
		this.npage = npage;
	}

	public int getPagesize() {
		return pagesize;
	}

	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}

	public int getPpage() {
		return ppage;
	}

	public void setPpage(int ppage) {
		this.ppage = ppage;
	}
	
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -