本文整理汇总了Java中org.eclipse.swt.SWT.NO_FOCUS属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.NO_FOCUS属性的具体用法?Java SWT.NO_FOCUS怎么用?Java SWT.NO_FOCUS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.NO_FOCUS属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMainPanel
/** Creates a composite within the specified composite and sets its layout
* to a default FillLayout().
*
* @param composite to create your Composite under
* @return The newly created composite
*/
@Override
public Composite createMainPanel(Composite composite) {
TableViewSWTPanelCreator mainPanelCreator = getMainPanelCreator();
if (mainPanelCreator != null) {
return mainPanelCreator.createTableViewPanel(composite);
}
Composite panel = new Composite(composite, SWT.NO_FOCUS);
composite.getLayout();
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
panel.setLayout(layout);
Object parentLayout = composite.getLayout();
if (parentLayout == null || (parentLayout instanceof GridLayout)) {
panel.setLayoutData(new GridData(GridData.FILL_BOTH));
}
return panel;
}
示例2: BookButtonBar
BookButtonBar(Composite parent, int gridStyle) {
toolbar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
gd = new GridData(gridStyle);
toolbar.setLayoutData(gd);
for (Command cmd : cmds) {
addIconButton(toolbar, cmd);
}
BookNotifier.getInstance().addListener(this);
refresh();
}