titleareadialog.jvt
来自「SWT_designer安装软件」· JVT 代码 · 共 54 行
JVT
54 行
import
org.eclipse.jface.dialogs.IDialogConstants
org.eclipse.jface.dialogs.TitleAreaDialog
org.eclipse.swt.SWT
org.eclipse.swt.graphics.Point
org.eclipse.swt.layout.GridData
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Shell
method
/**
* Create the dialog
* @param parentShell
*/
public %TypeName% (Shell parentShell) {
super(parentShell);
}
method
/**
* Create contents of the dialog
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayoutData(new GridData(GridData.FILL_BOTH));
%SWTContainerLayout%
return area;
}
method
/**
* Create contents of the button bar
* @param parent
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
method
/**
* Return the initial size of the dialog
*/
@Override
protected Point getInitialSize() {
return new Point(%DefaultFormSize%);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?