anotherview.java

来自「基于JAVA RCP的应用, 在代码中可以学习到editor, view, pe」· Java 代码 · 共 25 行

JAVA
25
字号
package com.fengmanfei.myrcp.views;

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

public class AnotherView extends ViewPart {
	private Text text;//文本框
	public static final String ID = "com.fengmanfei.myrcp.views.AnotherView";
	public AnotherView() {
		super();
	}
	public void createPartControl(Composite parent) {
		text = new Text(parent, SWT.NONE);
	}
	public void setFocus() {
		text.setFocus();
	}
	//设置文本框的内容
	public void setContent(String content) {
		text.setText(content);
	}
}

⌨️ 快捷键说明

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