Search in sources :

Example 1 with TimeGraphArrowRender

use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender in project lttng-scope by lttng.

the class StubModelArrowProvider1 method getArrowRender.

@Override
public TimeGraphArrowRender getArrowRender(TimeGraphTreeRender treeRender, TimeRange timeRange, @Nullable FutureTask<?> task) {
    TimeGraphArrowSeries series = getArrowSeries();
    List<TimeGraphTreeElement> treeElems = treeRender.getAllTreeElements();
    /* Draw 3 arrows total */
    TimeGraphEvent startEvent = new TimeGraphEvent(ts(timeRange, 0.1), treeElems.get(0));
    TimeGraphEvent endEvent = new TimeGraphEvent(ts(timeRange, 0.3), treeElems.get(5));
    TimeGraphArrow arrow1 = new TimeGraphArrow(startEvent, endEvent, series);
    startEvent = new TimeGraphEvent(ts(timeRange, 0.2), treeElems.get(3));
    endEvent = new TimeGraphEvent(ts(timeRange, 0.5), treeElems.get(12));
    TimeGraphArrow arrow2 = new TimeGraphArrow(startEvent, endEvent, series);
    startEvent = new TimeGraphEvent(ts(timeRange, 0.6), treeElems.get(15));
    endEvent = new TimeGraphEvent(ts(timeRange, 0.8), treeElems.get(2));
    TimeGraphArrow arrow3 = new TimeGraphArrow(startEvent, endEvent, series);
    List<TimeGraphArrow> arrows = ImmutableList.of(arrow1, arrow2, arrow3);
    return new TimeGraphArrowRender(timeRange, arrows);
}
Also used : TimeGraphArrowSeries(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowSeries) TimeGraphEvent(com.efficios.jabberwocky.views.timegraph.model.render.TimeGraphEvent) TimeGraphArrowRender(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender) TimeGraphTreeElement(com.efficios.jabberwocky.views.timegraph.model.render.tree.TimeGraphTreeElement) TimeGraphArrow(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow)

Example 2 with TimeGraphArrowRender

use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender in project lttng-scope by lttng.

the class StubModelArrowProvider2 method getArrowRender.

@Override
public TimeGraphArrowRender getArrowRender(TimeGraphTreeRender treeRender, TimeRange timeRange, @Nullable FutureTask<?> task) {
    TimeGraphArrowSeries series = getArrowSeries();
    List<TimeGraphTreeElement> treeElems = treeRender.getAllTreeElements();
    /* Draw 2 arrows total */
    TimeGraphEvent startEvent = new TimeGraphEvent(ts(timeRange, 0.3), treeElems.get(6));
    TimeGraphEvent endEvent = new TimeGraphEvent(ts(timeRange, 0.8), treeElems.get(4));
    TimeGraphArrow arrow1 = new TimeGraphArrow(startEvent, endEvent, series);
    startEvent = new TimeGraphEvent(ts(timeRange, 0.5), treeElems.get(10));
    endEvent = new TimeGraphEvent(ts(timeRange, 0.6), treeElems.get(7));
    TimeGraphArrow arrow2 = new TimeGraphArrow(startEvent, endEvent, series);
    List<TimeGraphArrow> arrows = ImmutableList.of(arrow1, arrow2);
    return new TimeGraphArrowRender(timeRange, arrows);
}
Also used : TimeGraphArrowSeries(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowSeries) TimeGraphEvent(com.efficios.jabberwocky.views.timegraph.model.render.TimeGraphEvent) TimeGraphArrowRender(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender) TimeGraphTreeElement(com.efficios.jabberwocky.views.timegraph.model.render.tree.TimeGraphTreeElement) TimeGraphArrow(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow)

Example 3 with TimeGraphArrowRender

use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender in project lttng-scope by lttng.

the class TimeGraphArrowLayer method paintArrowsOfProvider.

private void paintArrowsOfProvider(TimeGraphTreeRender treeRender, TimeRange timeRange, TimeGraphModelArrowProvider arrowProvider, @Nullable FutureTask<?> task) {
    ArrowConfig config = fArrowProvidersConfig.get(arrowProvider);
    if (config == null) {
        /* Should not happen... */
        return;
    }
    TimeGraphArrowRender arrowRender = arrowProvider.getArrowRender(treeRender, timeRange, task);
    Collection<Arrow> arrows = prepareArrows(treeRender, arrowRender, config.getStroke());
    Platform.runLater(() -> {
        config.getGroup().getChildren().clear();
        config.getGroup().getChildren().addAll(arrows);
    });
}
Also used : Arrow(org.lttng.scope.common.jfx.Arrow) TimeGraphArrowRender(com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender)

Aggregations

TimeGraphArrowRender (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender)3 TimeGraphEvent (com.efficios.jabberwocky.views.timegraph.model.render.TimeGraphEvent)2 TimeGraphArrow (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow)2 TimeGraphArrowSeries (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowSeries)2 TimeGraphTreeElement (com.efficios.jabberwocky.views.timegraph.model.render.tree.TimeGraphTreeElement)2 Arrow (org.lttng.scope.common.jfx.Arrow)1