當前位置: 首頁>>代碼示例>>Java>>正文


Java Composite.setBackgroundMode方法代碼示例

本文整理匯總了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;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:15,代碼來源:MainEntryPoint.java

示例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 () );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:16,代碼來源:ConnectionDetailsView.java

示例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;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:46,代碼來源:DataItemToolTip.java


注:本文中的org.eclipse.swt.widgets.Composite.setBackgroundMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。