Search in sources :

Example 1 with ExecuteDisplayButton

use of org.csstudio.display.builder.editor.rcp.actions.ExecuteDisplayButton 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();
}
Also used : Control(org.eclipse.swt.widgets.Control) DisplayEditor(org.csstudio.display.builder.editor.DisplayEditor) Parent(javafx.scene.Parent) ExecuteDisplayButton(org.csstudio.display.builder.editor.rcp.actions.ExecuteDisplayButton) FillLayout(org.eclipse.swt.layout.FillLayout) JFX_SWT_Wrapper(org.csstudio.javafx.swt.JFX_SWT_Wrapper) AutocompleteMenu(org.csstudio.display.builder.representation.javafx.AutocompleteMenu) Scene(javafx.scene.Scene)

Aggregations

Parent (javafx.scene.Parent)1 Scene (javafx.scene.Scene)1 DisplayEditor (org.csstudio.display.builder.editor.DisplayEditor)1 ExecuteDisplayButton (org.csstudio.display.builder.editor.rcp.actions.ExecuteDisplayButton)1 AutocompleteMenu (org.csstudio.display.builder.representation.javafx.AutocompleteMenu)1 JFX_SWT_Wrapper (org.csstudio.javafx.swt.JFX_SWT_Wrapper)1 FillLayout (org.eclipse.swt.layout.FillLayout)1 Control (org.eclipse.swt.widgets.Control)1