Search in sources :

Example 11 with JFX_SWT_Wrapper

use of org.csstudio.javafx.swt.JFX_SWT_Wrapper in project org.csstudio.display.builder by kasemir.

the class DataBrowserWidgetFigure method createSWTWidget.

@Override
protected Control createSWTWidget(final Composite parent, final int style) {
    final JFX_SWT_Wrapper wrapper = new JFX_SWT_Wrapper(parent, () -> {
        Parent root;
        try {
            plot = new ModelBasedPlot(editPart.getExecutionMode() == ExecutionMode.RUN_MODE);
            root = plot.getPlot();
        } catch (Exception ex) {
            logger.log(Level.WARNING, "Cannot create Data Browser OPI Widget's plot", ex);
            root = new Label("Cannot initialize Plot");
        }
        return new Scene(root);
    });
    return wrapper.getFXCanvas();
}
Also used : Parent(javafx.scene.Parent) Label(javafx.scene.control.Label) JFX_SWT_Wrapper(org.csstudio.javafx.swt.JFX_SWT_Wrapper) Scene(javafx.scene.Scene) ModelBasedPlot(org.csstudio.trends.databrowser3.ui.ModelBasedPlot)

Aggregations

JFX_SWT_Wrapper (org.csstudio.javafx.swt.JFX_SWT_Wrapper)11 Scene (javafx.scene.Scene)8 FillLayout (org.eclipse.swt.layout.FillLayout)5 Shell (org.eclipse.swt.widgets.Shell)4 Parent (javafx.scene.Parent)3 Control (org.eclipse.swt.widgets.Control)3 Display (org.eclipse.swt.widgets.Display)3 StackPane (javafx.scene.layout.StackPane)2 ModelBasedPlot (org.csstudio.trends.databrowser3.ui.ModelBasedPlot)2 Label (javafx.scene.control.Label)1 Stage (javafx.stage.Stage)1 DisplayEditor (org.csstudio.display.builder.editor.DisplayEditor)1 ExecuteDisplayButton (org.csstudio.display.builder.editor.rcp.actions.ExecuteDisplayButton)1 DisplayModel (org.csstudio.display.builder.model.DisplayModel)1 Macros (org.csstudio.display.builder.model.macros.Macros)1 AutocompleteMenu (org.csstudio.display.builder.representation.javafx.AutocompleteMenu)1 JFXRepresentation (org.csstudio.display.builder.representation.javafx.JFXRepresentation)1 JFXStageRepresentation (org.csstudio.display.builder.representation.javafx.JFXStageRepresentation)1 MacrosTable (org.csstudio.display.builder.representation.javafx.MacrosTable)1 RTValuePlot (org.csstudio.javafx.rtplot.RTValuePlot)1