Search in sources :

Example 1 with StubTrace

use of org.lttng.scope.common.tests.StubTrace in project lttng-scope by lttng.

the class TimeGraphWidgetTestBase method setupClass.

/**
 * Class initialization
 */
@BeforeClass
public static void setupClass() {
    StubTrace trace = new StubTrace();
    StubProject stubProject = new StubProject(trace);
    Platform.setImplicitExit(false);
    StubView view = new StubView();
    TimeGraphModelControl control = view.getControl();
    TimeGraphWidget viewer = view.getViewer();
    assertNotNull(viewer);
    JfxUtils.runLaterAndWait(() -> {
        stage = new Stage();
        stage.setScene(new Scene(viewer.getRootNode()));
        stage.show();
        /* Make sure the window has some reasonable dimensions. */
        stage.setHeight(500);
        stage.setWidth(1600);
    });
    JfxTestUtils.updateUI();
    /* Disable automatic redraw. We'll trigger view painting manually. */
    viewer.getDebugOptions().isPaintingEnabled.set(false);
    /* Disable mouse listeners in case the mouse dwells inside the view. */
    viewer.getDebugOptions().isScrollingListenersEnabled.set(false);
    JfxTestUtils.updateUI();
    control.getViewContext().switchProject(stubProject.getTraceProject());
    JfxTestUtils.updateUI();
    sfProject = stubProject;
    sfView = view;
    sfWidget = viewer;
    sfControl = control;
}
Also used : StubTrace(org.lttng.scope.common.tests.StubTrace) Stage(javafx.stage.Stage) StubProject(org.lttng.scope.common.tests.StubProject) TimeGraphModelControl(com.efficios.jabberwocky.views.timegraph.control.TimeGraphModelControl) Scene(javafx.scene.Scene) BeforeClass(org.junit.BeforeClass)

Aggregations

TimeGraphModelControl (com.efficios.jabberwocky.views.timegraph.control.TimeGraphModelControl)1 Scene (javafx.scene.Scene)1 Stage (javafx.stage.Stage)1 BeforeClass (org.junit.BeforeClass)1 StubProject (org.lttng.scope.common.tests.StubProject)1 StubTrace (org.lttng.scope.common.tests.StubTrace)1