当前位置: 首页>>代码示例>>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;未经允许,请勿转载。