use of org.csstudio.display.builder.representation.javafx.AutocompleteMenu in project org.csstudio.display.builder by kasemir.
the class DisplayEditorPart method createPartControl.
@Override
public void createPartControl(final Composite parent) {
parent.setLayout(new FillLayout());
final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(parent, () -> {
editor = new DisplayEditor(toolkit, Preferences.getUndoSize());
final Parent root = editor.create();
editor.getToolBar().getItems().add(new ExecuteDisplayButton(this));
return new Scene(root);
});
final Scene scene = wrapper.getScene();
EditorUtil.setSceneStyle(scene);
JFXCursorFix.apply(scene, parent.getDisplay());
final AutocompleteMenu ac_menu = editor.getSelectedWidgetUITracker().getAutocompleteMenu();
ac_menu.setUpdater(new AutoCompleteUpdater(ac_menu));
editor.getUndoableActionManager().addListener(undo_redo_listener);
final Control fx_canvas = wrapper.getFXCanvas();
fx_canvas.setMenu(createContextMenu(fx_canvas));
createRetargetableActionHandlers(fx_canvas);
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.csstudio.display.builder.editor.rcp.display_builder");
loadModel();
}
use of org.csstudio.display.builder.representation.javafx.AutocompleteMenu in project org.csstudio.display.builder by kasemir.
the class RulesDialogDemo method start.
/**
* JavaFX Start
*/
@Override
public void start(final Stage stage) {
final AutocompleteMenu menu = new AutocompleteMenu();
final UndoableActionManager undo = new UndoableActionManager(10);
final Widget widget = new LabelWidget();
final List<RuleInfo> rules = widget.propRules().getValue();
final RulesDialog dialog = new RulesDialog(undo, rules, widget, menu);
System.out.println(dialog.showAndWait());
}
Aggregations