customerdetailinput.java

来自「基于RCP实现的CRM系统, 数据库使用mysql数据库, 是学习RCP应用和插」· Java 代码 · 共 55 行

JAVA
55
字号
package superCRM.editor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

import superCRM.pojos.CustomerEO;
import superCRM.SuperCRMPlugin;

public class CustomerDetailInput implements IEditorInput {

	/** 用户保存输入的客户信息 */
	private CustomerEO customer;

	public CustomerDetailInput(CustomerEO c) {
		this.customer = c;
	}

	/** 以下为接口中的方法 */
	public boolean exists() {
		return true;
	}

	public ImageDescriptor getImageDescriptor() {
		return SuperCRMPlugin.getImageDescriptor("icons/customer.gif");
	}

	public String getName() {
		return customer.getDisplayName();
	}

	public IPersistableElement getPersistable() {
		return null;
	}

	public String getToolTipText() {
		return customer.getDisplayName();
	}

	public Object getAdapter(Class adapter) {
		return null;
	}

	/** 获得客户对象 */
	public CustomerEO getCustomer() {
		return customer;
	}

	/** 设置客户对象 */
	public void setCustomer(CustomerEO customer) {
		this.customer = customer;
	}

}

⌨️ 快捷键说明

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