aboutdialog.java

来自「Eclipse RCP下编写的工作管理软件代码」· Java 代码 · 共 32 行

JAVA
32
字号
package net.sf.pim.view;

import net.sf.pim.UiUtil;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class AboutDialog extends MessageDialog {
	public AboutDialog(Shell shell, String s, Image image, String s1, int i,
			String[] strings, int i1) {
		super(shell, s, image, s1, i, strings, i1);
	}

	protected Control createCustomArea(Composite composite) {
		ScrolledComposite sc=new ScrolledComposite(composite, SWT.V_SCROLL|SWT.LEFT_TO_RIGHT);
		Composite comp=new Composite(sc,SWT.NONE);
		Text text = new Text(comp, SWT.WRAP | SWT.READ_ONLY);
		text.setText(UiUtil.getToDoList());
		text.setSize(500, 200);
		sc.setContent(comp);
		sc.setExpandHorizontal(true);
		sc.setExpandVertical(true);
		return sc;
	}
}

⌨️ 快捷键说明

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