List of usage examples for org.eclipse.swt.widgets Display sleep
public boolean sleep()
From source file:Snippet28.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setMaximized(true);/*from w w w . j av a2 s.c o m*/ shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:ShellWindowToolTip.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setToolTipText("Shell \n toolTip"); shell.open();/*from w w w . j a va 2s.co m*/ while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:MainClass.java
public static void main(String[] a) { Display d = new Display(); Shell s = new Shell(d); s.setSize(500, 500);//w ww . j a v a2 s.c o m s.open(); ChildShell cs = new ChildShell(s); while (!s.isDisposed()) { if (!d.readAndDispatch()) d.sleep(); } d.dispose(); }
From source file:org.eclipse.swt.snippets.Snippet1.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Snippet 1"); shell.open();/* www . j ava 2 s .c o m*/ while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:SWTEventHandlingDisplay.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Hello, world!"); shell.open();/* ww w . ja v a 2 s. c o m*/ while (!shell.isDisposed()) { // Event loop. if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:org.eclipse.swt.snippets.Snippet27.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Snippet 27"); shell.setMinimized(true);//from w ww . j a v a 2 s . co m shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:org.eclipse.swt.snippets.Snippet28.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Snippet 28"); shell.setMaximized(true);//from w w w.j av a2 s .c o m shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:Snippet74.java
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); Caret caret = new Caret(shell, SWT.NONE); caret.setBounds(10, 10, 2, 32);// www.j a v a 2s . c o m shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
From source file:MainClass.java
public static void main(String[] a) { Display d = new Display(); Shell s = new Shell(d); s.setSize(500, 500);/* w w w .j av a2s. c o m*/ s.setImage(new Image(d, "c:\\icons\\yourico.ico")); s.setText("A Shell Example"); s.open(); while (!s.isDisposed()) { if (!d.readAndDispatch()) d.sleep(); } d.dispose(); }
From source file:org.eclipse.swt.snippets.Snippet348.java
public static void main(String[] args) { final Display display = new Display(); Shell shell = createShell();/* ww w . j a va 2 s . c om*/ shell.open(); while (!display.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } }