1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.provisional
.tmf
.core
.views
.timegraph2
;
12 import java
.util
.Collection
;
13 import java
.util
.Collections
;
14 import java
.util
.List
;
16 import com
.google
.common
.collect
.ImmutableList
;
18 public class TimeGraphModelRender
{
20 public static final TimeGraphModelRender EMPTY_RENDER
=
21 new TimeGraphModelRender(0, 0,
22 new TimeGraphTreeRender(Collections
.EMPTY_LIST
),
23 Collections
.EMPTY_LIST
,
24 Collections
.EMPTY_LIST
,
25 Collections
.EMPTY_LIST
);
27 private final long fStartTime
;
28 private final long fEndTime
;
29 private final TimeGraphTreeRender fTreeRender
;
30 private final List
<List
<TimeGraphStateInterval
>> fStateIntervals
;
31 private final List
<List
<TimeGraphDrawnEvent
>> fDrawnEvents
;
32 private final Collection
<TimeGraphArrowSeries
> fArrowSeries
;
34 public TimeGraphModelRender(long startTime
, long endTime
,
35 TimeGraphTreeRender treeRender
,
36 List
<List
<TimeGraphStateInterval
>> stateIntervals
,
37 List
<List
<TimeGraphDrawnEvent
>> drawnEvents
,
38 Collection
<TimeGraphArrowSeries
> arrowSeries
) {
39 fStartTime
= startTime
;
41 fTreeRender
= treeRender
;
42 fStateIntervals
= ImmutableList
.copyOf(stateIntervals
);
43 fDrawnEvents
= ImmutableList
.copyOf(drawnEvents
);
44 fArrowSeries
= ImmutableList
.copyOf(arrowSeries
);
47 public long getStartTime() {
51 public long getEndTime() {
55 public TimeGraphTreeRender
getTreeRender() {
59 public List
<List
<TimeGraphStateInterval
>> getStateIntervals() {
60 return fStateIntervals
;
63 public List
<List
<TimeGraphDrawnEvent
>> getDrawnEvents() {
67 public Collection
<TimeGraphArrowSeries
> getArrowsSeries() {