📄 testmainwindow3.java
字号:
}
});
new MenuItem(this.editMenu,SWT.SEPARATOR);
MenuItem l_menuItem9;
l_menuItem9 = new MenuItem(this.editMenu,SWT.PUSH);
l_menuItem9.setText("Cu&t");
l_menuItem9.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.editCutAction != null )
{
TestMainWindow3.this.editCutAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
MenuItem l_menuItem10;
l_menuItem10 = new MenuItem(this.editMenu,SWT.PUSH);
l_menuItem10.setText("&Copy");
l_menuItem10.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.editCopyAction != null )
{
TestMainWindow3.this.editCopyAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
MenuItem l_menuItem11;
l_menuItem11 = new MenuItem(this.editMenu,SWT.PUSH);
l_menuItem11.setText("&Paste");
l_menuItem11.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.editPasteAction != null )
{
TestMainWindow3.this.editPasteAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
new MenuItem(this.editMenu,SWT.SEPARATOR);
MenuItem l_menuItem12;
l_menuItem12 = new MenuItem(this.editMenu,SWT.PUSH);
l_menuItem12.setText("&Find...");
l_menuItem12.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.editFindAction != null )
{
TestMainWindow3.this.editFindAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
CoolBar l_coolBar;
l_coolBar = new CoolBar(iParent,SWT.NONE);
l_coolBar.addListener(SWT.Resize, new Listener()
{
public void handleEvent(Event event)
{
iParent.layout();
}
});
this.toolBar = new ToolBar(l_coolBar,SWT.FLAT);
ToolItem l_toolItem1;
l_toolItem1 = new ToolItem(this.toolBar,SWT.PUSH);
l_toolItem1.setImage(new Image(l_toolItem1.getDisplay(),new ByteArrayInputStream(IMAGE0_DATA)));
l_toolItem1.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.fileNewAction != null )
{
TestMainWindow3.this.fileNewAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
new ToolItem(this.toolBar,SWT.SEPARATOR);
ToolItem l_toolItem2;
l_toolItem2 = new ToolItem(this.toolBar,SWT.PUSH);
l_toolItem2.setImage(new Image(l_toolItem2.getDisplay(),new ByteArrayInputStream(IMAGE1_DATA)));
l_toolItem2.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.fileOpenAction != null )
{
TestMainWindow3.this.fileOpenAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
this.toolBar.pack();
CoolItem l_coolItem;
Point l_coolItemSize;
Point l_coolItemPreferredSize;
l_coolItemSize = this.toolBar.getSize();
l_coolItem = new CoolItem(l_coolBar,SWT.NONE);
l_coolItem.setControl(this.toolBar);
l_coolItemPreferredSize = l_coolItem.computeSize(l_coolItemSize.x,l_coolItemSize.y);
l_coolItem.setPreferredSize(l_coolItemPreferredSize);
this.Toolbar = new ToolBar(l_coolBar,SWT.FLAT);
ToolItem l_toolItem3;
l_toolItem3 = new ToolItem(this.Toolbar,SWT.PUSH);
l_toolItem3.setImage(new Image(l_toolItem3.getDisplay(),new ByteArrayInputStream(IMAGE2_DATA)));
l_toolItem3.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.fileSaveAction != null )
{
TestMainWindow3.this.fileSaveAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
new ToolItem(this.Toolbar,SWT.SEPARATOR);
ToolItem l_toolItem4;
l_toolItem4 = new ToolItem(this.Toolbar,SWT.PUSH);
l_toolItem4.setImage(new Image(l_toolItem4.getDisplay(),new ByteArrayInputStream(IMAGE3_DATA)));
l_toolItem4.addSelectionListener(
new SelectionListener()
{
public void widgetSelected( SelectionEvent iEvent )
{
if ( TestMainWindow3.this.filePrintAction != null )
{
TestMainWindow3.this.filePrintAction.run();
}
}
public void widgetDefaultSelected( SelectionEvent iEvent )
{
this.widgetSelected(iEvent);
}
});
this.Toolbar.pack();
l_coolItemSize = this.Toolbar.getSize();
l_coolItem = new CoolItem(l_coolBar,SWT.NONE);
l_coolItem.setControl(this.Toolbar);
l_coolItemPreferredSize = l_coolItem.computeSize(l_coolItemSize.x,l_coolItemSize.y);
l_coolItem.setPreferredSize(l_coolItemPreferredSize);
Composite l_composite1;
l_composite1 = new Composite(iParent,SWT.NONE);
GridLayout l_gridLayout;
l_gridLayout = new GridLayout();
l_composite1.setLayout(l_gridLayout);
l_gridLayout.numColumns = 1;
l_gridLayout.marginLeft = 5;
l_gridLayout.marginTop = 5;
l_gridLayout.marginRight = 5;
l_gridLayout.marginBottom = 5;
l_gridLayout.horizontalSpacing = 5;
l_gridLayout.verticalSpacing = 5;
this.textLabel10 = new Label(l_composite1,SWT.NONE);
this.textLabel10.setSize(192,16);
this.textLabel10.setText("Test Browser:");
this.textBrowser1 = new Browser(l_composite1,SWT.BORDER);
this.textBrowser1.setSize(192,128);
this.textBrowser1.setText("The quick brown fox jumped over the lazy dog.");
GridData l_gridData;
l_gridData = new GridData();
l_gridData.horizontalAlignment = GridData.FILL;
l_gridData.grabExcessHorizontalSpace = true;
l_gridData.verticalAlignment = GridData.CENTER;
l_gridData.grabExcessVerticalSpace = false;
this.textLabel10.setLayoutData(l_gridData);
l_gridData = new GridData();
l_gridData.horizontalAlignment = GridData.FILL;
l_gridData.grabExcessHorizontalSpace = true;
l_gridData.verticalAlignment = GridData.FILL;
l_gridData.grabExcessVerticalSpace = true;
this.textBrowser1.setLayoutData(l_gridData);
iParent.setLayout(new FormLayout());
FormData l_formData;
l_formData = new FormData();
l_formData.top = new FormAttachment(0);
l_formData.left = new FormAttachment(0);
l_formData.right = new FormAttachment(100);
l_coolBar.setLayoutData(l_formData);
l_formData = new FormData();
l_formData.top = new FormAttachment(l_coolBar);
l_formData.left = new FormAttachment(0);
l_formData.right = new FormAttachment(100);
l_formData.bottom = new FormAttachment(100);
l_composite1.setLayoutData(l_formData);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -