?? aboutdialog.java
字號:
/*
* 創(chuàng)建日期 2003-9-11
*
* 更改所生成文件模板為
* 窗口 > 首選項 > Java > 代碼生成 > 代碼和注釋
*/
package com.tanghan.plugin;
import java.util.ResourceBundle;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
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.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**
* @author Jerry Tang
* @version v0.1.0
* @copyright (C) 2003 Tanghan Studio
*
*/
public class AboutDialog extends Dialog {
/**資源文件*/
private static ResourceBundle res = TanghanPlugin.getDefault().getResourceBundle();
/**
* @param parentShell
*/
public AboutDialog(Shell parentShell) {
super(parentShell);
}
/* (非 Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
protected Control createDialogArea(Composite parent) {
getShell().setText(res.getString("Tanghan.Plugin.Abount"));
getShell().setMaximized(false);
getShell().setMinimized(false);
// create the top level composite for the dialog area
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 5;
layout.marginWidth = 5;
layout.numColumns = 1;
composite.setLayout(layout);
GridData data = new GridData(GridData.FILL_BOTH);
composite.setLayoutData(data);
Label lb = new Label(composite,SWT.NORMAL);
lb.setText(res.getString("Tanghan.Plugin.Copyright"));
lb = new Label(composite,SWT.NORMAL);
lb.setText(res.getString("Tanghan.Plugin.Author"));
lb = new Label(composite,SWT.NORMAL);
lb.setText(res.getString("Tanghan.Plugin.Author.Email"));
lb = new Label(composite,SWT.NORMAL);
lb.setText(res.getString("Tanghan.Plugin.Version"));
//this.createButtonBar()
return super.createDialogArea(parent);
}
/* (非 Javadoc)
* @see org.eclipse.jface.window.Window#open()
*/
public int open() {
return super.open();
}
/* (非 Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
*/
protected Control createButtonBar(Composite parent) {
Control ct = super.createButtonBar(parent);
getButton(IDialogConstants.CANCEL_ID).setVisible(false);
return ct;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -