Commit | Line | Data |
---|---|---|
739b9fec AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir | |
3 | * | |
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 | *******************************************************************************/ | |
9 | ||
10 | package org.eclipse.tracecompass.internal.provisional.tmf.core.views.timegraph2; | |
11 | ||
12 | import java.util.Collection; | |
13 | import java.util.Collections; | |
14 | import java.util.List; | |
15 | ||
16 | import com.google.common.collect.ImmutableList; | |
17 | ||
18 | public class TimeGraphModelRender { | |
19 | ||
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); | |
26 | ||
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; | |
33 | ||
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; | |
40 | fEndTime = endTime; | |
41 | fTreeRender = treeRender; | |
42 | fStateIntervals = ImmutableList.copyOf(stateIntervals); | |
43 | fDrawnEvents = ImmutableList.copyOf(drawnEvents); | |
44 | fArrowSeries = ImmutableList.copyOf(arrowSeries); | |
45 | } | |
46 | ||
47 | public long getStartTime() { | |
48 | return fStartTime; | |
49 | } | |
50 | ||
51 | public long getEndTime() { | |
52 | return fEndTime; | |
53 | } | |
54 | ||
55 | public TimeGraphTreeRender getTreeRender() { | |
56 | return fTreeRender; | |
57 | } | |
58 | ||
59 | public List<List<TimeGraphStateInterval>> getStateIntervals() { | |
60 | return fStateIntervals; | |
61 | } | |
62 | ||
63 | public List<List<TimeGraphDrawnEvent>> getDrawnEvents() { | |
64 | return fDrawnEvents; | |
65 | } | |
66 | ||
67 | public Collection<TimeGraphArrowSeries> getArrowsSeries() { | |
68 | return fArrowSeries; | |
69 | } | |
70 | ||
71 | } |