[WIP] CFV Refactor
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / internal / provisional / tmf / core / views / timegraph2 / ITimeGraphModelRenderProvider.java
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.List;
13 import java.util.Set;
14
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
18
19 public interface ITimeGraphModelRenderProvider {
20
21 // ------------------------------------------------------------------------
22 // Configuration option classes
23 // ------------------------------------------------------------------------
24
25 class SortingMode {
26
27 private final String fName;
28
29 public SortingMode(String name) {
30 fName = name;
31 }
32
33 public String getName() {
34 return fName;
35 }
36 }
37
38 class FilterMode {
39
40 private final String fName;
41
42 public FilterMode(String name) {
43 fName = name;
44 }
45
46 public String getName() {
47 return fName;
48 }
49 }
50
51 // ------------------------------------------------------------------------
52 // Render generation methods
53 // ------------------------------------------------------------------------
54
55 default TimeGraphModelRender getRender(ITmfTrace trace,
56 long rangeStart, long rangeEnd, long resolution) {
57 return getRender(trace, rangeStart, rangeEnd, resolution, null);
58 }
59
60 TimeGraphModelRender getRender(ITmfTrace trace, long rangeStart, long rangeEnd,
61 long resolution, @Nullable IProgressMonitor monitor);
62
63 // ------------------------------------------------------------------------
64 // Sorting modes
65 // ------------------------------------------------------------------------
66
67 List<SortingMode> getSortingModes();
68
69 SortingMode getCurrentSortingMode();
70
71 void setCurrentSortingMode(int index);
72
73 // ------------------------------------------------------------------------
74 // Filter modes
75 // ------------------------------------------------------------------------
76
77 List<FilterMode> getFilterModes();
78
79 void enableFilterMode(int index);
80
81 void disableFilterMode(int index);
82
83 Set<FilterMode> getActiveFilterModes();
84
85 // ------------------------------------------------------------------------
86 // Other configuration options
87 // ------------------------------------------------------------------------
88
89 /**
90 * Set the time range configuration option. The timestamps should normally
91 * refer to a valid time range within the backing trace or other database.
92 * For GUI views it will usually refer to the visible time range of a
93 * zoomed-in viewport.
94 *
95 * This can then be used by other configuration options. For example, a
96 * filtering mode could be provided to filter out entries that do not change
97 * state within the configured time range.
98 *
99 * The implementation is free to ignore the configured time range if it does
100 * not provide anything special for it.
101 *
102 * @param startTime
103 * The start of the configured time range
104 * @param endTime
105 * The end of the configured time range.
106 */
107 void setConfiguredTimeRange(long startTime, long endTime);
108 }
This page took 0.033145 seconds and 5 git commands to generate.