Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Display


    public PointsDatavis open() {
        new Thread(new Runnable() {
            @Override
            public void run() {
                final int ms = 1000 / 50;
                final Display display = new Display();
                final Shell shell = new Shell(display, SWT.SHELL_TRIM & ~SWT.RESIZE);
                final Canvas canvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);
                canvas.addPaintListener(PointsDatavis.this);
                canvas.setSize(512, 512);
                shell.setText("MDS");
                shell.pack();
                shell.open();
                display.timerExec(ms , new Runnable() {
                    @Override
                    public void run() {
                        if (shell.isDisposed()) return;
                        canvas.redraw();
                        display.timerExec(ms, this);
                    }
                });
                while (!shell.isDisposed()) {
                    if (!display.readAndDispatch())
                        display.sleep();
                }
                display.dispose();
                System.exit(-1);
            }
        }).start();
        return this;
    }
View Full Code Here


        setSize(Globals.getScreenDimension());
    }

    public static void main(String[] args) {
//        System.setProperty("java.awt.headless", "true");
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setLayout(new FillLayout());
        new SwtMain(shell);

        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
        }
        display.dispose();
    }
View Full Code Here

  private Shell shell;
  private WebUI webUI;

  @Before
  public void setUp() {
    display = new Display();
    shell = new Shell( display );
    webUI = new WebUI( shell );
  }
View Full Code Here

  private Display display;
  private Controller controller;

  @Before
  public void setUp() {
    display = new Display();
    Shell shell = new Shell( display );
    shell.setLayout( new StackLayout() );
    RemoteUI uiRenderer = mock( RemoteUI.class );
    when( uiRenderer.getPageParent() ).thenReturn( shell );
    controller = new Controller( uiRenderer, mock( UIDescriptor.class ) );
View Full Code Here

    ui.getPageOperator().openPage( "foo" );
  }

  private UIImpl createUI( Class<? extends AbstractPage> pageType) {
    UIConfiguration configuration = new UIConfiguration();
    Shell shell = new Shell( new Display() );
    shell.setLayout( new ZIndexStackLayout() );
    ActionConfiguration actionConfiguration = new ActionConfiguration( "bar", TestAction.class );
    configuration.addPageConfiguration( new PageConfiguration( "fooRoot", TestPage.class ).setTopLevel( true ) );
    configuration.addPageConfiguration( new PageConfiguration( "foo", pageType )
      .addActionConfiguration( actionConfiguration ) );
View Full Code Here

  @Rule
  public TabrisEnvironment environment = new TabrisEnvironment();

  @Before
  public void setUp() {
    new Display();
  }
View Full Code Here

  @Rule
  public TabrisEnvironment environment = new TabrisEnvironment();

  @Before
  public void setUp() {
    new Display();
  }
View Full Code Here

        });

        shell.pack();
        shell.open();

        Display display = parent.getDisplay();
        while (!shell.isDisposed()) {
          if (!display.readAndDispatch())
            display.sleep();
        }

      }
View Full Code Here

  private Display display;

  @Before
  public void setUp() {
    display = new Display();
  }
View Full Code Here

  private Shell shell;

  @Before
  public void setUp() {
    Display display = new Display();
    shell = new Shell( display );
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Display

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.