当前位置: 首页>>代码示例>>Java>>正文


Java Shell.setLayout方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Shell.setLayout方法的典型用法代码示例。如果您正苦于以下问题:Java Shell.setLayout方法的具体用法?Java Shell.setLayout怎么用?Java Shell.setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Shell的用法示例。


在下文中一共展示了Shell.setLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的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

示例2: openWithWaitShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的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

示例3: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.viewer = interfaceService.createModelViewer();

	Shell shell = new Shell(display);
	shell.setText("Point Model");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:17,代码来源:KnownModelsTest.java

示例4: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的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, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    final ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart,
            true);
    frame.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:SWTBarChartDemo1.java

示例5: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.model = new MultiStepModel();

	Shell shell = new Shell(display);
	shell.setText("Multi-Step");
	shell.setLayout(new GridLayout(1, false));

	this.ui = new MultiStepComposite(shell, SWT.NONE);

	this.controller = BeanService.getInstance().createController(ui, model);
	controller.beanToUI();
	controller.switchState(true);

	this.service = new MockScannableConnector(null);
	AnnotationManager manager = new AnnotationManager(Inject.class);
	manager.addDevices(ui);
	manager.invoke(Inject.class, service, model);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();
	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:26,代码来源:MultiStepCompositeTest.java

示例6: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.bbox = new BoundingBox();
	bbox.setFastAxisName("stage_x");
	bbox.setSlowAxisName("T");
    bbox.setFastAxisStart(0);
	bbox.setSlowAxisStart(1);
	bbox.setFastAxisLength(10);
	bbox.setSlowAxisLength(11);
	bbox.setRegionName("fred");

	this.viewer = interfaceService.createModelViewer();

	Shell shell = new Shell(display);
	shell.setText("Bounding Box");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);
	viewer.setModel(bbox);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:27,代码来源:BoundingBoxTest.java

示例7: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.config = new SampleData();
	config.setName("Sample name");
	config.setDescription("Hello World");

	this.viewer = interfaceService.createModelViewer();

	Shell shell = new Shell(display);
	shell.setText("Sample");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);
	viewer.setModel(config);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:22,代码来源:SampleInformationTest.java

示例8: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
public static void main( String[] args ) 
{
    final JFreeChart chart = createChart();
    final Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.setDisplayToolTips(false);
    frame.setHorizontalAxisTrace(true);
    frame.setVerticalAxisTrace(true);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:SWTMultipleAxisDemo1.java

示例9: openShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
public static void openShell(String format, int weight, int height, Function<Shell, Control> function) {

    Display display = new Display();

    Shell shell = new Shell(display);

    shell.setSize(weight, height);
    shell.setLayout(new FillLayout());

    function.apply(shell);

    shell.open();

    while(!shell.isDisposed()) {
      if(!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }
 
开发者ID:TRUEJASONFANS,项目名称:JavaFX-FrameRateMeter,代码行数:21,代码来源:SWTTestUtil.java

示例10: open

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Setup the Disk window and display (open) it.
 */
public void open() {
	shell = new Shell(parentShell, SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout());
	shell.setImage(imageManager.get(ImageManager.ICON_DISK));
	setStandardWindowTitle();
	shell.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent event) {
				dispose(event);
			}
		});
		
	CTabFolder tabFolder = new CTabFolder(shell, SWT.BOTTOM);
	new DiskExplorerTab(tabFolder, disks, imageManager, this);
	diskMapTabs = new DiskMapTab[disks.length];
	for (int i=0; i<disks.length; i++) {
		if (disks[i].supportsDiskMap()) {
			diskMapTabs[i] = new DiskMapTab(tabFolder, disks[i]);
		}
	}
	diskInfoTab = new DiskInfoTab(tabFolder, disks);
	tabFolder.setSelection(tabFolder.getItems()[0]);
	
	
	shell.open();
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:29,代码来源:DiskWindow.java

示例11: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
public static void main(String[] args) {
    final JFreeChart chart = createChart(createDataset());
    final Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Time series demo for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.setDisplayToolTips(true);
    frame.setHorizontalAxisTrace(false);
    frame.setVerticalAxisTrace(false);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:SWTTimeSeriesDemo.java

示例12: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display);
	int formWidth = 750;
	int formHeight = 280;
	shell.setSize(formWidth, formHeight);
	GridLayout gridLayout = new GridLayout(1, true);
	gridLayout.makeColumnsEqualWidth = false;
	shell.setLayout(gridLayout);

	Composite composite = new Composite(shell, SWT.NONE);
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	DirBrowseComposite dirBrowseComposite2 = new DirBrowseComposite(composite);
	dirBrowseComposite2.pack();
	DirBrowseComposite dirBrowseComposite3 = new DirBrowseComposite(shell);
	dirBrowseComposite3.pack();
	shell.pack();
	shell.open();

	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:26,代码来源:DirecroryBrowseLayoutEx.java

示例13: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
public static void main(String[] args) {
  // create a shell...
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setLayout(new FillLayout());
  shell.setText("KTable examples");

  // put a tab folder in it...
  TabFolder tabFolder = new TabFolder(shell, SWT.NONE);

  // Item 1: a Text Table
  TabItem item1 = new TabItem(tabFolder, SWT.NONE);
  item1.setText("Text Table");
  Composite comp1 = new Composite(tabFolder, SWT.NONE);
  item1.setControl(comp1);
  comp1.setLayout(new FillLayout());

  // put a table in tabItem1...
  KTable table = new KTable(comp1, SWT.V_SCROLL | SWT.H_SCROLL);
  table.setRowSelectionMode(true);
  //table.setMultiSelectionMode(true);
  table.setModel(new KTableModelExample());

  // display the shell...
  shell.setSize(600, 600);
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch())
      display.sleep();
  }
  display.dispose();
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:33,代码来源:KTable.java

示例14: createFakeToolTip

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Create the Shell and Label for the fake tooltip showing URLs
 */
private void createFakeToolTip() {
    fakeToolTip = new Shell(GUI.shell, SWT.ON_TOP);
    fakeToolTip.setLayout(LayoutShop.createFillLayout(2, 2));
    fakeToolTip.setForeground(GUI.display
            .getSystemColor(SWT.COLOR_INFO_FOREGROUND));
    fakeToolTip.setBackground(GUI.display
            .getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    fakeToolTipLabel = new Label(fakeToolTip, SWT.NONE);
    fakeToolTipLabel.setForeground(GUI.display
            .getSystemColor(SWT.COLOR_INFO_FOREGROUND));
    fakeToolTipLabel.setBackground(GUI.display
            .getSystemColor(SWT.COLOR_INFO_BACKGROUND));
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:17,代码来源:FakeToolTip.java

示例15: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
public static void main(String[] args) {
	Shell shell = new Shell(new Display());
	shell.setSize(1200, 500);
	shell.setLayout(new GridLayout());
	shell.setLocation(100, 150);
	
	Figure root = new Figure();
	root.setFont(shell.getFont());
	//		XYLayout layout = new XYLayout();
	//		root.setLayoutManager(layout);
	
	org.eclipse.draw2d.GridLayout layout = new org.eclipse.draw2d.GridLayout(2,false);
	layout.horizontalSpacing = 100;
	root.setLayoutManager(layout);
	
	Canvas canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
	canvas.setBackground(ColorConstants.white);
	canvas.setLayoutData(new GridData(GridData.FILL_BOTH));
	
	MatrixWidget widget = new MatrixWidget();
	MockArray array = new MockArray("int[]", new int[]{1,2,3}, new int[]{4,5,6}, new int[]{7,8,9}, new int[]{10,11,12});
	root.add(widget.createFigure(array));
	
	LightweightSystem lws = new LightweightSystem(canvas);
	lws.setContents(root);
	
	Display display = shell.getDisplay();
	shell.open();
	while (!shell.isDisposed()) {
		while (!display.readAndDispatch()) {
			display.sleep();
		}
	}
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:35,代码来源:TestMatrixWidget.java


注:本文中的org.eclipse.swt.widgets.Shell.setLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。