view2.java

来自「This a test for upload, so that I can do」· Java 代码 · 共 33 行

JAVA
33
字号
package cn.com.chengang;

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;

	@Override
	public void createPartControl(Composite parent) {
		Composite topComp=new Composite(parent, SWT.NONE);
		topComp.setLayout(new FillLayout());
		Text text=new Text(topComp, SWT.BORDER);
		text.setText("I am Text Border");
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub
		
	}
	public Text getText(){
		return text;
	}
	public void setText(Text text){
		this.text=text;
	}

}

⌨️ 快捷键说明

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