Java Code Examples for org.eclipse.core.databinding.observable.Realm#runWithDefault()
The following examples show how to use
org.eclipse.core.databinding.observable.Realm#runWithDefault() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RadioGroupViewerSnippet01.java From nebula with Eclipse Public License 2.0 | 6 votes |
public static void main(String[] arrrrgs) { final Display display = new Display(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { Shell shell = createShell(); shell.open(); while (!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); display.dispose(); } }); }
Example 2
Source File: SnippetCompositeTableDataBinding.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * Main entry point. * * @param args */ public static void main(String[] args) { final Display display = new Display(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { Shell shell = new Shell(display); shell.setText("Jules Verne's Heroes"); shell.setBounds(0, 0, 400, 200); shell.setLayout(new FormLayout()); // creation of the composite containing the table MainCompo compo = new MainCompo(shell, SWT.NONE); // position it on the shell FormData data = new FormData(); data.left = new FormAttachment(0, 100, 5); data.right = new FormAttachment(100, 100, -5); data.top = new FormAttachment(0, 100, 5); data.bottom = new FormAttachment(100, 100, -5); compo.setLayoutData(data); // add some data to the model populateModel(compo.getModel()); // binding the UI with the model compo.binding(); // start the UI shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } }); display.dispose(); }
Example 3
Source File: DateChooserDataBindingSnippet.java From nebula with Eclipse Public License 2.0 | 5 votes |
public static void main(String[] args) { final Display display = Display.getDefault(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { DateChooserDataBindingSnippet snippet = new DateChooserDataBindingSnippet(); Shell shell = snippet.createShell(); shell.open(); while ( ! shell.isDisposed() ) { if (!display.readAndDispatch()) display.sleep(); } } }); }
Example 4
Source File: DateChooserComboDataBindingSnippet.java From nebula with Eclipse Public License 2.0 | 5 votes |
public static void main(String[] args) { final Display display = Display.getDefault(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { DateChooserComboDataBindingSnippet snippet = new DateChooserComboDataBindingSnippet(); Shell shell = snippet.createShell(); shell.open(); while ( ! shell.isDisposed() ) { if (!display.readAndDispatch()) display.sleep(); } } }); }
Example 5
Source File: NumberFormatterDataBindingSnippet.java From nebula with Eclipse Public License 2.0 | 5 votes |
public static void main(String[] args) { final Display display = Display.getDefault(); Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { public void run() { NumberFormatterDataBindingSnippet snippet = new NumberFormatterDataBindingSnippet(); Shell shell = snippet.createShell(); shell.open(); while ( ! shell.isDisposed() ) { if (!display.readAndDispatch()) display.sleep(); } } }); }