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

📄 contacteditorinput.java

📁 对于可视的桌面开发系统的一些详细的设计资料
💻 JAVA
字号:
package gr.osmosis.rcpsamples.pojoeditor;

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

public class ContactEditorInput implements IEditorInput{

	private Contact contact = new Contact(true);
	
	public ContactEditorInput(Contact contact){
		this.contact = contact;
	}
	public boolean exists() {
		return false;
	}

	public ImageDescriptor getImageDescriptor() {
		return null;
	}

	public String getName() {
		return contact.toString();
	}

	public IPersistableElement getPersistable() {
		return null;
	}

	public String getToolTipText() {
		return contact.toString();
	}

	public Object getAdapter(Class adapter) {
		
		if (adapter == Contact.class) {
			return this.contact;			
		}
		
		//else
		return null;
	}

}

⌨️ 快捷键说明

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