use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow 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);
}
use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow 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);
}
Aggregations