Search in sources :

Example 1 with TimeGraphArrowSeries

use of com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowSeries 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 TimeGraphArrowSeries

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

Aggregations

TimeGraphEvent (com.efficios.jabberwocky.views.timegraph.model.render.TimeGraphEvent)2 TimeGraphArrow (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrow)2 TimeGraphArrowRender (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowRender)2 TimeGraphArrowSeries (com.efficios.jabberwocky.views.timegraph.model.render.arrows.TimeGraphArrowSeries)2 TimeGraphTreeElement (com.efficios.jabberwocky.views.timegraph.model.render.tree.TimeGraphTreeElement)2