1 /*****************************************************************************
2 * Copyright (c) 2007, 2016 Intel Corporation, Ericsson
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Intel Corporation - Initial API and implementation
11 * Ruslan A. Scherbakov, Intel - Initial API and implementation
12 * Alvaro Sanchez-Leon - Updated for TMF
13 * Geneviève Bastien - Added methods to save a time range selection
14 * Patrick Tasse - Refactoring, support for range selection
15 *****************************************************************************/
17 package org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.widgets
;
19 import org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.widgets
.Utils
.TimeFormat
;
22 * Time data provider interface, for use in the timegraph widget.
24 * @author Alvaro Sanchez-Leon
25 * @author Patrick Tasse
26 * @author Xavier Raynaud
28 public interface ITimeDataProvider
{
31 * Updates the selection begin and end time and notifies the selection
32 * listeners about the new selection range (if it has changed).
34 * If ensureVisible is true, the window range will be centered either on the
35 * selection begin time (if it has changed) or otherwise on the selection
36 * end time, if and only if that time is outside of the current window. If
37 * the window range is modified, the range listeners will be notified.
40 * the selection begin time
42 * the selection end time
43 * @param ensureVisible
44 * if true, ensure visibility of the new selection range boundary
47 void setSelectionRangeNotify(long beginTime
, long endTime
, boolean ensureVisible
);
50 * Updates the selection begin and end time.
52 * If ensureVisible is true, the window range will be centered either on the
53 * selection begin time (if it has changed) or otherwise on the selection
54 * end time, if and only if that time is outside of the current window. If
55 * the window range is modified, the range listeners will be notified.
58 * the selection begin time
60 * the selection end time
61 * @param ensureVisible
62 * if true, ensure visibility of the new selection range boundary
65 void setSelectionRange(long beginTime
, long endTime
, boolean ensureVisible
);
68 * @return The begin time of the current selection
70 long getSelectionBegin();
73 * @return The end time of the current selection
75 long getSelectionEnd();
78 * Get the user-specified bounds begin time. May be set to SWT.DEFAULT. For
79 * the actual bound use {@link #getMinTime()}.
81 * @return The user-specified begin time, or SWT.DEFAULT if input bound used
86 * Get the user-specified bounds end time. May be set to SWT.DEFAULT. For
87 * the actual bound use {@link #getMaxTime()}.
89 * @return The user-specified end time, or SWT.DEFAULT if input bound used
94 * @return The bounds minimum time
99 * @return The bounds maximum time
104 * @return The current window start time
109 * @return The current window end time
114 * @return The minimal time interval
116 long getMinTimeInterval();
119 * Updates the window range and notify the range listeners.
122 * the window start time
124 * the window end time
126 void setStartFinishTimeNotify(long time0
, long time1
);
129 * Update the window range but do not notify the range listeners.
132 * the window start time
134 * the window end time
136 void setStartFinishTime(long time0
, long time1
);
139 * Notify the range listeners without updating the time range.
141 void notifyStartFinishTime();
144 * Updates the selection time and notifies the selection listeners about the
145 * new selection time (if it has changed).
147 * If ensureVisible is true, the window range will be centered on the
148 * selection time, if and only if that time is outside of the current
149 * window. If the window range is modified, the range listeners will be
154 * @param ensureVisible
155 * if true, ensure visibility of the new selection time
157 void setSelectedTimeNotify(long time
, boolean ensureVisible
);
160 * Updates the selection time.
162 * If ensureVisible is true, the window range will be centered on the
163 * selection time, if and only if that time is outside of the current
164 * window. If the window range is modified, the range listeners will be
169 * @param ensureVisible
170 * if true, ensure visibility of the new selection time
172 void setSelectedTime(long time
, boolean ensureVisible
);
175 * Reset the start and end times and notify the registered listeners
177 void resetStartFinishTime();
180 * Reset the start and end times.
183 * if true, notify the registered listeners
186 default void resetStartFinishTime(boolean notify
) {
188 setStartFinishTimeNotify(getMinTime(), getMaxTime());
190 setStartFinishTime(getMinTime(), getMaxTime());
195 * @return The names' width
200 * Set the names' width
204 void setNameSpace(int width
);
207 * @return The width for timestamps
212 * @return the time format, one of:
214 * <li>{@link TimeFormat#CALENDAR} absolute time, displayed as year/month/day/hours/minutes/seconds/ms/us/ns
215 * <li>{@link TimeFormat#RELATIVE} relative time, displayed as seconds/ms/us/ns
216 * <li>{@link TimeFormat#NUMBER} number, displayed as long values.
217 * <li>{@link TimeFormat#CYCLES} cycles, displayed as long values.
220 TimeFormat
getTimeFormat();
This page took 0.036246 seconds and 5 git commands to generate.