use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.
the class MacrosFieldEditor method getFXCanvas.
private void getFXCanvas(final Composite parent) {
if (fxcanvas == null) {
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(parent, () -> {
table = new MacrosTable(new Macros());
return new Scene(table.getNode());
});
fxcanvas = wrapper.getFXCanvas();
}
}
use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.
the class PropertyPage method createControl.
@Override
public void createControl(final Composite parent) {
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(parent, () -> {
// StackPane w/ panel as single child to 'fill' the available space.
final StackPane root = new StackPane(property_panel);
final Scene scene = new Scene(root, 200.0, 400.0);
EditorUtil.setSceneStyle(scene);
return scene;
});
canvas = wrapper.getFXCanvas();
}
use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.
the class RepresentationDemoJavaFXinSWT method main.
public static void main(final String[] args) throws Exception {
// final DisplayModel model = ExampleModels.getModel(1);
final DisplayModel model = ExampleModels.createModel();
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText(model.getPropertyValue(propName));
shell.setLayout(new FillLayout());
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(shell, () -> {
toolkit = new JFXRepresentation(false);
return new Scene(toolkit.createModelRoot());
});
final Scene scene = wrapper.getScene();
JFXRepresentation.setSceneStyle(scene);
final Parent parent = toolkit.getModelParent();
toolkit.representModel(parent, model);
final DummyRuntime runtime = new DummyRuntime(model);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
runtime.shutdown();
toolkit.shutdown();
display.dispose();
}
use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.
the class ZoomPanJavaFXinSWT method main.
public static void main(String[] args) throws Exception {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("Zoom Pan Demo");
shell.setLayout(new FillLayout());
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(shell, () -> ZoomPan.createScene());
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.
the class DragDropDemoJFXinSWT method main.
@SuppressWarnings("nls")
public static void main(String[] args) throws Exception {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("Drag Drop Demo");
shell.setLayout(new FillLayout());
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(shell, () -> DragDropDemo.createScene());
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
Aggregations