use of org.csstudio.display.builder.representation.javafx.ScriptsDialog in project org.csstudio.display.builder by kasemir.
the class JFXScriptsDialogDemo method start.
@Override
public void start(final Stage stage) {
final List<ScriptInfo> scripts = new ArrayList<>();
scripts.add(new ScriptInfo("/tmp/demo1.py", true, new ScriptPV("pv1")));
scripts.add(new ScriptInfo("/tmp/demo2.py", false, new ScriptPV("pv1"), new ScriptPV("pv2", false)));
final ScriptsDialog dialog = new ScriptsDialog(new Widget("demo"), scripts);
final Optional<List<ScriptInfo>> result = dialog.showAndWait();
if (result.isPresent()) {
for (ScriptInfo info : result.get()) System.out.println(info + ", embedded text: " + info.getText());
} else
System.out.println("Cancelled");
}
Aggregations