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

📄 spoolerinfo.java

📁 打印管理程序,测试完全通过.windows开发环境.
💻 JAVA
字号:
package jp.co.ntl.spooler;

import jp.co.ntl.spkey.SPKeyInfo;
import jp.co.ntl.printer.PrinterInfo2;

public class SpoolerInfo implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public static final int	SC_SPOOL				= 0x01;
	public static final int	SC_SPOOL_END			= 0x02;
	public static final int	SC_DEVICE				= 0x0b;
	public static final int	SC_DEVICE_END			= 0x0c;
	public static final int	SC_PRINT				= 0x1a;
	public static final int	SC_PRINT_END			= 0x1b;
	public static final int	SC_PRINT_RETRY			= 0x1c;
	public static final int	SC_OK					= 0xf0;
	public static final int	SC_PRINT_OFF			= 0xfd;
	public static final int	SC_RETRY_ERROR			= 0xfe;
	public static final int	SC_ERROR				= 0xff;
	public static final int	SC_DELETING				= 0xfc;
	
	public static final int	EC_SPOOL				= 0x01;
	public static final int	EC_DEVICE				= 0x07;
	public static final int	EC_PRINT				= 0x08;
	public static final int	EC_SUSPEND				= 0x16;
	public static final int	EC_FULL					= 0x17;
	public static final int	EC_DISK_FULL			= 0x18;
	public static final int	EC_SERIAL				= 0x20;
	public static final int	EC_CANCEL				= 0x21;
	public static final int	EC_LIMIT_USER_DAY		= 0x22;
	public static final int	EC_LIMIT_USER_MONTH		= 0x23;
	public static final int	EC_LIMIT_USER_YEAR		= 0x24;
	public static final int	EC_LIMIT_GROUP_DAY		= 0x25;
	public static final int	EC_LIMIT_GROUP_MONTH	= 0x26;
	public static final int	EC_LIMIT_GROUP_YEAR		= 0x27;
	public static final int	EC_TIME_LIMIT			= 0x28;
	public static final int	EC_LIMIT				= 0x29;
	public static final int	EC_MEMORY				= 0x2a;
	public static final int	EC_SIZE_NOT_SUPPORT		= 0x2b;
	public static final int	EC_TRAY_NOT_SUPPORT		= 0x2c;
	public static final int	EC_MEDIA_NOT_SUPPORT	= 0x2d;
	public static final int	EC_WAIT_RETRY			= 0x80;
	public static final int	EC_PRINT_OFF			= 0xfd;
	public static final int	EC_LIMIT_USER_PRINT		= 0x2e;
	public static final int	EC_STOP_USER_PRINT		= 0x2f;
	public static final int	EC_LIMIT_GROUP_PRINT	= 0x30;
	public static final int	EC_STOP_GROUP_PRINT		= 0x31;
	public static final int	EC_DATABASE				= 0x32;
	public static final int	EC_NOT_ALLOWED_GROUP	= 0x33;

	public static final String	OK_QUEUE_STR		= "OK";
	public static final String	WAIT_QUEUE_STR		= "WAIT";
    public static final String	PRINTING_QUEUE_STR	= "PRINTING";
    public static final String	ERROR_QUEUE_STR		= "ERROR";
    public static final String	ALL_QUEUE_STR		= "ALL";
    
    // 2006.10.10丂夋柺偺僼儕僢僇懳墳丂lium add start
    public static final int OK_QUEUE = 0;
    public static final int PRINTING_QUEUE = 1;
    public static final int WAIT_QUEUE = 2;
    public static final int ERROR_QUEUE = 3;
    public static final int PREVIEW_QUEUE = 4;
    public static final int BUNPAN_QUEUE = 5;
    public static final int REMOVE_QUEUE = 6;
    public static final int ALL_QUEUE = 7;
    // 2006.10.10丂夋柺偺僼儕僢僇懳墳 lium add end
    
    public static final int		TYPE_WAIT			= 0;
    public static final int		TYPE_END			= 1;
	
	private String	job;
	private int	status;
	private int	copy;
	private int	page;
	private long	size;
	private long	date;
	private String jobID;
	private int	error;
	private int 	queType;
	private String	paperSize;
	private int	paperWidth;
	private int	paperLength;
	
	private SPKeyInfo		spKeyInfo = null;
	private PrinterInfo2	printerInfo = null;
	
	public SpoolerInfo() {
		job = "";
		status = 0;
		copy = 0;
		page = 0;
		size = 0;
		date = 0;
		jobID = "";
		error = 0;
		queType = 0;
		paperSize = "";
		paperWidth = 0;
		paperLength = 0;
		
		spKeyInfo = new SPKeyInfo();
		printerInfo = new PrinterInfo2();
	}
	
	public String getJob() { return job; }
	public void setJob(String job) { this.job = job; }

	public int getStatus() { return status; }
	public void setState(int status) { this.status = status; }
	
	public int getCopy() { return copy; }
	public void setCopy(int copy) { this.copy = copy; }
	
	public int getPage() {	return page; }
	public void setPage(int page) { this.page = page; }
	
	public long getSize() { return size; }
	public void setSize(long size) { this.size = size; }
	
	public long getDate() { return date; }
	public void setDate(long date) { this.date = date; }
	
	public String getJobID() { return jobID; }
	public void setJobID(String jobID) { this.jobID = jobID; }
	
	public String getPassword() { return spKeyInfo.getUser().getPassword(); }
	public void setPassword(String password) { spKeyInfo.getUser().setPassword(password); }
	
	public int getError() { return error; }
	public void setError(int error) { this.error = error; }
	
	public int getQueType() { return queType; }
	public void setQueType(int queType) { this.queType = queType; }
	
	public String getPaperSize() { return paperSize; }
	public void setPaperSize(String paperSize) { this.paperSize = paperSize; }
	
	public int getPaperWidth() { return paperWidth; }
	public void setPaperWidth(int paperWidth) { this.paperWidth = paperWidth; }
	
	public int getPaperLength() { return paperLength; }
	public void setPaperLength(int paperLength) { this.paperLength = paperLength; }
	
	public SPKeyInfo getSPKeyInfo() { return spKeyInfo; }
	public void setSPKeyInfo(SPKeyInfo spKeyInfo) { this.spKeyInfo = spKeyInfo; }
	
	public PrinterInfo2 getPrinterInfo() { return printerInfo; }
	public void setPrinterInfo(PrinterInfo2 printerInfo) { this.printerInfo = printerInfo; }
	
	public void copy(SpoolerInfo spoolerInfo) {
		this.job = spoolerInfo.getJob();
		this.status = spoolerInfo.getStatus();
		this.copy = spoolerInfo.getCopy();
		this.page = spoolerInfo.getPage();
		this.size = spoolerInfo.getSize();
		this.date = spoolerInfo.getDate();
		this.jobID = spoolerInfo.getJobID();
		this.error = spoolerInfo.getError();
		this.queType = spoolerInfo.getQueType();
		this.paperSize = spoolerInfo.getPaperSize();
		this.paperWidth = spoolerInfo.getPaperWidth();
		this.paperLength = spoolerInfo.getPaperLength();
		this.spKeyInfo.copy(spoolerInfo.getSPKeyInfo());
		this.printerInfo.copy(spoolerInfo.getPrinterInfo());
	}
}

⌨️ 快捷键说明

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