日期:2014-05-17 浏览次数:20781 次
public PageInfo(long rowesPage,long currsPage,long totalRows,int pageCount) //依次分别为每页行数,当前页数,总页数,以及需要显示的页的个数
{
this(rowesPage,currsPage, totalRows);
this.noPage=new long[pageCount];
long index=pageCount/2;
long indes=pageCount%2;
long n=1;
if (currsPage>index+indes)
{
if (currsPage+index+indes>this.totalPage)
{
n=this.totalPage-pageCount+1;
}
else
{
n=currsPage-index;
}
}
for (int i=0;i<pageCount;i++)
{
noPage[i]=n+i;
}
}