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
.List
;
15 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
16 import org
.eclipse
.jdt
.annotation
.Nullable
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
19 public interface ITimeGraphModelRenderProvider
{
21 // ------------------------------------------------------------------------
22 // Configuration option classes
23 // ------------------------------------------------------------------------
27 private final String fName
;
29 public SortingMode(String name
) {
33 public String
getName() {
40 private final String fName
;
42 public FilterMode(String name
) {
46 public String
getName() {
51 // ------------------------------------------------------------------------
52 // Render generation methods
53 // ------------------------------------------------------------------------
55 default TimeGraphModelRender
getRender(ITmfTrace trace
,
56 long rangeStart
, long rangeEnd
, long resolution
) {
57 return getRender(trace
, rangeStart
, rangeEnd
, resolution
, null);
60 TimeGraphModelRender
getRender(ITmfTrace trace
, long rangeStart
, long rangeEnd
,
61 long resolution
, @Nullable IProgressMonitor monitor
);
63 // ------------------------------------------------------------------------
65 // ------------------------------------------------------------------------
67 List
<SortingMode
> getSortingModes();
69 SortingMode
getCurrentSortingMode();
71 void setCurrentSortingMode(int index
);
73 // ------------------------------------------------------------------------
75 // ------------------------------------------------------------------------
77 List
<FilterMode
> getFilterModes();
79 void enableFilterMode(int index
);
81 void disableFilterMode(int index
);
83 Set
<FilterMode
> getActiveFilterModes();
85 // ------------------------------------------------------------------------
86 // Other configuration options
87 // ------------------------------------------------------------------------
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
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.
99 * The implementation is free to ignore the configured time range if it does
100 * not provide anything special for it.
103 * The start of the configured time range
105 * The end of the configured time range.
107 void setConfiguredTimeRange(long startTime
, long endTime
);