📄 sashform.jvt
字号:
import
org.eclipse.swt.SWT
org.eclipse.swt.custom.SashForm
org.eclipse.swt.layout.FillLayout
org.eclipse.swt.widgets.Display
org.eclipse.swt.widgets.Group
org.eclipse.swt.widgets.Shell
method
public static void main(String args[]) {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setText("SashForm test");
shell.setLayout(new FillLayout(SWT.VERTICAL));
{
final SashForm form = new SashForm(shell, SWT.VERTICAL);
{
final Group group = new Group(form, SWT.BORDER);
group.setText("Group 1");
}
{
final Group group = new Group(form, SWT.BORDER);
group.setText("Group 2");
}
{
final Group group = new Group(form, SWT.BORDER);
group.setText("Group 3");
}
form.setWeights(new int[] { 1, 2, 3 });
}
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -