本文整理汇总了Java中org.eclipse.swt.widgets.Composite.setBackgroundMode方法的典型用法代码示例。如果您正苦于以下问题:Java Composite.setBackgroundMode方法的具体用法?Java Composite.setBackgroundMode怎么用?Java Composite.setBackgroundMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Composite
的用法示例。
在下文中一共展示了Composite.setBackgroundMode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFooter
import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private Composite createFooter ( final Composite parent )
{
final Composite footer = new Composite ( parent, SWT.NONE );
footer.setLayout ( new RowLayout () );
footer.setData ( RWT.CUSTOM_VARIANT, "footer" );
footer.setBackgroundMode ( SWT.INHERIT_DEFAULT );
final Label label = new Label ( footer, SWT.NONE );
label.setText ( System.getProperty ( Properties.FOOTER_TEXT, "Eclipse SCADA Admin Console" ) );
return footer;
}
示例2: createPartControl
import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl ( final Composite parent )
{
parent.setBackgroundMode ( SWT.INHERIT_FORCE );
this.view = new DetailsView ( parent );
getViewSite ().getWorkbenchWindow ().getSelectionService ().addSelectionListener ( new ISelectionListener () {
@Override
public void selectionChanged ( final IWorkbenchPart part, final ISelection selection )
{
ConnectionDetailsView.this.view.setSelection ( selection );
}
} );
this.view.setSelection ( getViewSite ().getWorkbenchWindow ().getSelectionService ().getSelection () );
}
示例3: createToolTipContentArea
import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Composite createToolTipContentArea ( final Event event, final Composite parent )
{
parent.setLayout ( new FillLayout () );
final Composite wrapper = new Composite ( parent, SWT.NONE );
wrapper.addDisposeListener ( new DisposeListener () {
@Override
public void widgetDisposed ( final DisposeEvent e )
{
DataItemToolTip.this.resourceManager.dispose ();
}
} );
final GridLayout layout = new GridLayout ( 2, false );
layout.marginHeight = 10;
layout.marginWidth = 10;
layout.horizontalSpacing = 20;
layout.verticalSpacing = 20;
wrapper.setLayout ( layout );
wrapper.setBackground ( wrapper.getDisplay ().getSystemColor ( SWT.COLOR_WHITE ) );
wrapper.setBackgroundMode ( SWT.INHERIT_DEFAULT );
this.headerLabel = new Label ( wrapper, SWT.NONE );
this.headerLabel.setText ( this.item.getId () );
this.headerLabel.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false, 2, 1 ) );
this.headerLabel.setFont ( JFaceResources.getHeaderFont () );
final Label warnIcon = new Label ( wrapper, SWT.NONE );
warnIcon.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, false, false ) );
warnIcon.setImage ( Activator.getDefault ().getImageRegistry ().get ( Activator.IMG_WARN_BIG ) );
this.text = new StyledText ( wrapper, SWT.MULTI );
this.text.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );
if ( this.currentText != null )
{
this.text.setText ( this.currentText.getString () );
this.text.setStyleRanges ( this.currentText.getStyleRanges () );
}
return wrapper;
}