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

📄 printergrouptablemodel.java

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

import java.util.Vector;

import jp.co.ntl.printergroup.PrinterGroupInfo;
import jp.co.ntl.swing.ext.AbstractInfoTableModel;

public class PrinterGroupTableModel extends AbstractInfoTableModel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final String		columnPrinterGroup;
	
	public PrinterGroupTableModel(Vector vcPrinterGroupInfo) {
		super(vcPrinterGroupInfo);
		
		this.columnPrinterGroup = Resource.getString(Resource.LIST_PRINTERGROUP);
		this.columnNames = new String[] {
				columnPrinterGroup
		};
	}
	
	public Object getValueAt(int row, int column) {
		if (vcInfo == null) {
			return null;
		}
		
		if (row >= vcInfo.size()) {
			return null;
		}
		
		if (column >= columnNames.length) {
			return null;
		}

		PrinterGroupInfo	prnGroupInfo = (PrinterGroupInfo)vcInfo.get(row);
		String	name = columnNames[column];
		if (name.equals(columnPrinterGroup)) {
			return prnGroupInfo.getPrinterGName();
		}
		
		return "";
	}
}

⌨️ 快捷键说明

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