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

📄 pageturner.java

📁 人力资源信息管理系统!包含登录 员工管理 培训经历 用户管理 出勤管理等一系列人力资源的信息管理模块!
💻 JAVA
字号:
package com.buat.pageturner;

public class PageTurner {
	private int total = 0;

	private int countperPage = 0;

	private int pageNO = 0;

	private int pageCount = 0;

	private int beginIndex = 0;

	private int endIndex = 0;

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getCountperPage() {
		return countperPage;
	}

	public void setCountperPage(int countperPage) {
		this.countperPage = countperPage;
	}

	public int getPageNO() {
		if (this.pageNO < 0) {
			this.pageNO = 0;
		}
		if (this.pageNO > this.pageCount) {
			this.pageNO = this.pageCount;
		}

		return pageNO;
	}

	public void setPageNO(int pageNO) {
		this.pageNO = pageNO;
	}

	public int getBeginIndex() {
		this.beginIndex = this.pageNO * this.countperPage;
		return beginIndex;
	}

	public void setBeginIndex(int beginIndex) {
		this.beginIndex = beginIndex;
	}

	public int getEndIndex() {
		if (this.pageNO > this.pageCount - 1) {
			this.endIndex = this.total - 1;
		} else {
			this.endIndex = (this.pageNO + 1) * this.countperPage - 1;
		}
		return endIndex;
	}

	public void setEndIndex(int endIndex) {
		this.endIndex = endIndex;
	}

	public int getPageCount() {
		this.pageCount = (this.total - 1) / this.countperPage + 1;
		return pageCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public PageTurner(int total, int countperPage) {
		super();
		this.total = total;
		this.countperPage = countperPage;

	}
}

⌨️ 快捷键说明

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