shell.jvt
来自「SWT_designer安装软件」· JVT 代码 · 共 53 行
JVT
53 行
import
org.eclipse.swt.SWT
org.eclipse.swt.widgets.Display
org.eclipse.swt.widgets.Shell
method
/**
* Launch the application
* @param args
*/
public static void main(String args[]) {
try {
Display display = Display.getDefault();
%TypeName% shell = new %TypeName%(display, SWT.SHELL_TRIM);
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
} catch (Exception e) {
e.printStackTrace();
}
}
method
/**
* Create the shell
* @param display
* @param style
*/
public %TypeName% (Display display, int style) {
super(display, style);
%CreateMethod%();
}
method
/**
* Create contents of the window
*/
protected void %CreateMethod%() {
setText("SWT Application");
setSize(%DefaultFormSize%);
%SWTCompositeLayout%
}
method
@Override
protected void checkSubclass () {
// Disable the check that prevents subclassing of SWT components
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?