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

📄 companylistcellrenderer.java

📁 本文首先介绍了这些考试系统的形成和发展过程
💻 JAVA
字号:
package net.robin.crm.ui;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.ImageIcon;
import javax.swing.JList;

public class CompanyListCellRenderer extends DefaultListCellRenderer {

	private ImageIcon companyIcon;
	
	public CompanyListCellRenderer() {
		super();
	}

	public Component getListCellRendererComponent(
			JList list, 
			Object value,
			int index, 
			boolean isSelected,
			boolean cellHasFocus) {
		
		super.getListCellRendererComponent(list, value, index, isSelected,
				cellHasFocus);
		
		if(companyIcon!=null)
			setIcon(companyIcon);
		
		return this;
	}

	public ImageIcon getCompanyIcon() {
		return companyIcon;
	}

	public void setCompanyIcon(ImageIcon companyIcon) {
		this.companyIcon = companyIcon;
	}

	
}

⌨️ 快捷键说明

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