rootexampler.java

来自「开源的关于SWT开发的图形应用库」· Java 代码 · 共 44 行

JAVA
44
字号
package com.swtplus.gallery;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;

public class RootExampler extends Composite implements IWidgetExampler {
	


	private Label l;

	public RootExampler(Composite c) {
		super(c, SWT.NONE);
		setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
		
		
	}

	

	public void setExampleArea(Composite area) {
		area.setLayout(new GridLayout(1,false));
		
		l = new Label(area,SWT.WRAP);
		l.setText("Please select a strategy from the tree.");
		GridData gd = new GridData(SWT.CENTER,SWT.TOP,true,false);
		gd.verticalIndent = 100;
		gd.widthHint = 200;
		l.setLayoutData(gd);
		
		area.layout();
	}

	public void dispose() {
		super.dispose();
		l.dispose();
	}
	
}

⌨️ 快捷键说明

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