pagenumber.java

来自「基于jsp+javabean+tomcat+eclipse+SQLServer2」· Java 代码 · 共 58 行

JAVA
58
字号
/*
 * Created on 2004-10-25
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package DataBean;

/**
 * @author iwy
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class Pagenumber
{	
	int rowcount=1,//总的记录数
		pagesize=1,//每页显示的记录数
		showpage=1,//设置欲显示的页码数
		pagecount=1;//分页之后的总页数
	public void setrowcount(int n)
	{
		rowcount=n;
	}
	public int getrowcount()
	{
		return rowcount;
	}
	public void setpagecount(int r,int p)
	{
		rowcount=r;
		pagesize=p;
		int n=(rowcount%pagesize)==0?(rowcount/pagesize):(rowcount/pagesize+1);
		pagecount=n;
	}
	public int getpagecount()
	{
		return pagecount;
	}
	public void setshowpage(int n)
	{
		showpage=n;
	}
	public int getshowpage()
	{
		return showpage;
	}
	public void setpagesize(int n)
	{
		pagesize=n;
	}
	public int getpagesize()
	{
		return pagesize;
	}
	
}

⌨️ 快捷键说明

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