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


Java FillLayout類代碼示例

本文整理匯總了Java中org.eclipse.swt.layout.FillLayout的典型用法代碼示例。如果您正苦於以下問題:Java FillLayout類的具體用法?Java FillLayout怎麽用?Java FillLayout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FillLayout類屬於org.eclipse.swt.layout包,在下文中一共展示了FillLayout類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createPartControl

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
@Override
public void createPartControl ( final Composite parent )
{
    this.container = parent;
    createEditingDomain ();

    parent.setLayout ( new FillLayout () );
    this.viewer = new TreeViewer ( parent );
    this.viewer.setAutoExpandLevel ( 2 );

    this.viewer.setContentProvider ( new AdapterFactoryContentProvider ( this.factory ) );
    this.viewer.setLabelProvider ( new AdapterFactoryLabelProvider ( this.factory ) );

    createContextMenuFor ( this.viewer );

    new AdapterFactoryTreeEditor ( this.viewer.getTree (), this.factory );
    getViewSite ().setSelectionProvider ( this.viewer );

    attachSelectionService ();

    getViewSite ().getActionBars ().getMenuManager ().add ( new Separator ( "additions" ) );

    this.actionBarContributor.init ( getViewSite ().getActionBars () );
    this.actionBarContributor.setViewPart ( this );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:26,代碼來源:ChartConfiguratorView.java

示例2: main

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
public static void main( String[] args ) 
{
    JFreeChart chart = createChart(createDataset());
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 400);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    final ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    //frame.setDisplayToolTips(false);
    frame.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:23,代碼來源:SWTPieChartDemo1.java

示例3: AudibleBrowser

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
public AudibleBrowser(Composite parent, String url) {
    this.parent = parent;
    try {
        browser = new Browser(parent, SWT.BORDER);
        browser.addTitleListener(event -> getShell().setText(event.title));
    } catch (SWTError e) {
        error = e;
        /* Browser widget could not be instantiated */
        parent.setLayout(new FillLayout());
        Label label = new Label(parent, SWT.CENTER | SWT.WRAP);
        label.setText(getResourceString("BrowserNotCreated"));
        // label.requestLayout();
        return;
    }
    initResources();
    if (url.length() > 0)
        browser.setUrl(getResourceString(url));

    if (true)
        show(false, null, null, true, true, true, true);
    else
        show(false, null, null, false, false, false, false);

}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:25,代碼來源:AudibleBrowser.java

示例4: DashboardComposite

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
/** {@code key} defines which data source will be used for display. */
public DashboardComposite(String key, Composite parent, int style) {
	super(parent, style);
	this.key = key;

	this.setLayout(new FillLayout());

	final SashForm sf = new SashForm(this, SWT.HORIZONTAL);
	sf.setLayout(new FillLayout());

	this.canvas = new VisualisationCanvas(sf, SWT.NONE);

	this.text = new Text(sf, SWT.LEFT | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
	text.setText("");

	createVisualisationControls(sf);
	sf.setWeights(new int[] { 45, 45, 10 });
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:19,代碼來源:DashboardComposite.java

示例5: createControl

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public void createControl(Composite parent) {
	Composite listComposite = new Composite(parent, NONE);
	listComposite.setLayout(new FillLayout());

	ListViewer projectListViewer = new ListViewer(listComposite, SWT.BORDER | SWT.MULTI);
	projectListViewer.setContentProvider(ArrayContentProvider.getInstance());
	projectListViewer.setInput(getNonTestProjects());

	// Data binding
	DataBindingContext databindingContext = new DataBindingContext();
	parent.addDisposeListener(e -> databindingContext.dispose());

	databindingContext.bindList(ViewersObservables.observeMultiSelection(projectListViewer),
			PojoProperties.list(N4MFProjectInfo.class, N4MFProjectInfo.TESTED_PROJECT_PROP_NAME)
					.observe(projectInfo));

	setControl(listComposite);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:21,代碼來源:N4MFWizardTestedProjectPage.java

示例6: createTabFolder

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
private void createTabFolder ( final Composite parent )
{
    this.tabFolder = new CTabFolder ( parent, SWT.TOP );
    this.tabFolder.setLayoutData ( new GridData ( GridData.FILL, GridData.FILL, true, true ) );

    for ( final GeneratorPageInformation page : this.pages )
    {
        final CTabItem tabItem = new CTabItem ( this.tabFolder, SWT.NONE );
        final Composite tabComposite = new Composite ( this.tabFolder, SWT.NONE );
        tabComposite.setLayout ( new FillLayout () );
        page.getGeneratorPage ().createPage ( tabComposite );
        tabItem.setText ( page.getLabel () );
        tabItem.setControl ( tabComposite );
        page.getGeneratorPage ().setTarget ( this );
    }

    this.tabFolder.setSelection ( 0 );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:19,代碼來源:GeneratorView.java

示例7: createPartControl

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
@Override
public void createPartControl ( final Composite parent )
{
    parent.setLayout ( new FillLayout () );

    this.wrapper = new Composite ( parent, SWT.NONE );
    this.wrapper.setLayout ( GridLayoutFactory.slimStack () );

    this.shell = parent.getShell ();

    PlatformUI.getWorkbench ().getHelpSystem ().setHelp ( this.wrapper, "org.eclipse.scada.ui.chart.view.chartView" ); //$NON-NLS-1$

    fillMenu ( getViewSite ().getActionBars ().getMenuManager () );
    fillToolbar ( getViewSite ().getActionBars ().getToolBarManager () );

    createChartControl ( parent );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:18,代碼來源:AbstractChartView.java

示例8: createComponents

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
private void createComponents ()
{
    final FillLayout layout = new FillLayout ( SWT.VERTICAL );
    layout.marginHeight = 12;
    layout.marginWidth = 12;
    setLayout ( layout );

    final Text filterTextField = new Text ( this, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL );
    filterTextField.setText ( this.filter );
    filterTextField.addKeyListener ( new KeyAdapter () {
        @Override
        public void keyReleased ( final KeyEvent e )
        {
            verifyFilter ( filterTextField.getText () );
        }
    } );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:18,代碼來源:FilterFreeFormComposite.java

示例9: TrendControlImage

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
public TrendControlImage ( final Composite parent, final int style, final String connectionId, final String itemId, final String queryString )
{
    super ( parent, style );

    this.connectionId = connectionId;
    this.itemId = itemId;
    this.queryString = queryString;

    setLayout ( new FillLayout () );

    final Button button = new Button ( parent, SWT.PUSH | SWT.FLAT );
    button.setImage ( org.eclipse.scada.vi.details.swt.Activator.getDefault ().getImageRegistry ().get ( org.eclipse.scada.vi.details.swt.Activator.IMG_TREND ) );
    button.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            startHdView ();
        }
    } );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:TrendControlImage.java

示例10: DescriptorLabel

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
public DescriptorLabel ( final Composite parent, final int style, final String text, final DataItemDescriptor descriptor )
{
    super ( parent, SWT.NONE );

    setLayout ( new FillLayout () );
    Label label = new Label ( this, style );

    if ( text != null )
    {
        label.setText ( text );
    }

    // TODO: make properties
    if ( SessionManager.getDefault ().hasRole ( "developer" ) ) //$NON-NLS-1$
    {
        label.setToolTipText ( String.format ( "%s", descriptor ) ); //$NON-NLS-1$
    }

}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:20,代碼來源:DescriptorLabel.java

示例11: LabelComposite

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
public LabelComposite ( final Composite parent, final int style, final DataItemDescriptor descriptor, final String format )
{
    super ( parent, style, null, null );

    setLayout ( new FillLayout () );
    this.label = new Label ( this, SWT.NONE );

    this.format = format;
    if ( descriptor != null )
    {
        this.registrationManager.registerItem ( "value", descriptor.getItemId (), descriptor.getConnectionInformation (), false, false ); //$NON-NLS-1$
    }
    else
    {
        this.label.setText ( format );
    }

}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:19,代碼來源:LabelComposite.java

示例12: createFillLayout

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
private void createFillLayout ( final Composite parent, final FillLayoutComponent component, final Map<String, String> properties )
{
    final VisibilityProvider provider = this.visibleFactory.createProvider ( component.getVisibility () );

    final ComponentVisibility visibility = new ComponentVisibility ( provider, new SubTrackingVisibleComponent () {

        @Override
        public void create ()
        {

            final Composite childParent = new Composite ( parent, SWT.NONE );
            childParent.setLayout ( new FillLayout ( SWT.VERTICAL ) );

            for ( final Component child : component.getChildren () )
            {
                final DetailComponentImpl comp = new DetailComponentImpl ( child, DetailComponentImpl.this.viewContext );
                comp.init ( DetailComponentImpl.this.visibleFactory, childParent, properties );
                trackSub ( comp );
            }
            trackControl ( childParent );
        }

    } );

    addComponent ( visibility );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:DetailComponentImpl.java

示例13: createPartControl

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
@Override
public void createPartControl ( final Composite parent )
{
    addListener ();

    parent.setLayout ( new FillLayout () );
    this.table = new Table ( parent, SWT.FULL_SELECTION );
    this.table.setHeaderVisible ( true );

    this.indexCol = new TableColumn ( this.table, SWT.NONE );
    this.indexCol.setText ( Messages.QueryDataView_ColIndex );
    this.indexCol.setWidth ( 50 );

    this.qualityCol = new TableColumn ( this.table, SWT.NONE );
    this.qualityCol.setText ( Messages.QueryDataView_ColQuality );
    this.qualityCol.setWidth ( 75 );

    this.manualCol = new TableColumn ( this.table, SWT.NONE );
    this.manualCol.setText ( Messages.QueryDataView_ColManual );
    this.manualCol.setWidth ( 75 );

    this.invalidColor = JFaceColors.getErrorBackground ( getDisplay () );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:24,代碼來源:QueryDataView.java

示例14: openWithWaitShell

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
protected void openWithWaitShell ( final Shell parentShell, final String detailViewId, final Map<String, String> parameters )
{

    final Shell waitShell = new Shell ( parentShell, SWT.PRIMARY_MODAL | SWT.BORDER );
    waitShell.setLayout ( new FillLayout () );
    final Label label = new Label ( waitShell, SWT.NONE );
    label.setText ( "Opening view…" );

    waitShell.pack ();
    waitShell.open ();

    // make sure the text is visible
    waitShell.getDisplay ().update ();

    try
    {
        open ( parentShell, detailViewId, parameters );
    }
    finally
    {
        // close the wait shell
        waitShell.close ();
    }

}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:26,代碼來源:ShowDetailDialog.java

示例15: ServersViewer

import org.eclipse.swt.layout.FillLayout; //導入依賴的package包/類
public ServersViewer ( final Composite parent )
{
    parent.setLayout ( new FillLayout () );
    this.viewer = new TreeViewer ( parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL );

    this.contentProvider = new ObservableSetTreeContentProvider ( new ObservableFactoryImpl (), null );
    this.viewer.setContentProvider ( this.contentProvider );
    this.labelProvider = new ServerLabelProvider ( this.contentProvider.getKnownElements () );
    this.viewer.setLabelProvider ( this.labelProvider );

    this.viewer.setInput ( HivesPlugin.getDefault ().getServerManager () );
    this.viewer.getControl ().addDisposeListener ( new DisposeListener () {

        @Override
        public void widgetDisposed ( final DisposeEvent e )
        {
            handleDispose ();
        }
    } );

    ColumnViewerToolTipSupport.enableFor ( this.viewer );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:23,代碼來源:ServersViewer.java


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