use of org.lttng.scope.common.tests.StubProject 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;
}
Aggregations