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

📄 view2.java

📁 此源码程序实现的是eclipse开发工具中插件的开发实现参考程序
💻 JAVA
字号:
package cn.com.chengang.myplugin;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.ViewPart;

public class View2 extends ViewPart {
	private Text text;

	public void createPartControl(Composite parent) {
		Composite topComp = new Composite(parent, SWT.NONE);
		topComp.setLayout(new FillLayout());
		text = new Text(topComp, SWT.BORDER);
		text.setText("我是text框");

	}

	public void setFocus() {}

	// 文本框text相应的Setter/Getter方法
	public Text getText() {
		return text;
	}

	public void setText(Text text) {
		this.text = text;
	}

}

⌨️ 快捷键说明

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