1 /*****************************************************************************
2 * Copyright (c) 2007, 2015 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 any registered
32 * listeners about the new time range (if necessary)
34 * @param beginTime the selection begin time
35 * @param endTime the selection end time
37 void setSelectionRangeNotify(long beginTime
, long endTime
);
40 * Updates the selection begin and end time
42 * @param beginTime the selection begin time
43 * @param endTime the selection end time
45 void setSelectionRange(long beginTime
, long endTime
);
48 * @return The begin time of the current selection
50 long getSelectionBegin();
53 * @return The end time of the current selection
55 long getSelectionEnd();
58 * Get the user-specified bounds begin time. May be set to SWT.DEFAULT. For
59 * the actual bound use {@link #getMinTime()}.
61 * @return The user-specified begin time, or SWT.DEFAULT if input bound used
66 * Get the user-specified bounds end time. May be set to SWT.DEFAULT. For
67 * the actual bound use {@link #getMaxTime()}.
69 * @return The user-specified end time, or SWT.DEFAULT if input bound used
74 * @return The bounds minimum time
79 * @return The bounds maximum time
84 * @return The current window start time
89 * @return The current window end time
94 * @return The minimal time interval
96 long getMinTimeInterval();
99 * Updates the time range and notify registered listeners
104 void setStartFinishTimeNotify(long time0
, long time1
);
107 * Update the time range but do not trigger event notification
112 void setStartFinishTime(long time0
, long time1
);
115 * Notify registered listeners without updating the time range
117 void notifyStartFinishTime();
120 * Updates the selected time, adjusts the time range if necessary and
121 * notifies any registered listeners about the new selected time and new
122 * range (if necessary)
126 * @param ensureVisible
127 * Ensure visibility of new time (will adjust time range if
130 void setSelectedTimeNotify(long time
, boolean ensureVisible
);
133 * Updates the selected time and adjusts the time range if necessary without
134 * notifying registered listeners.
138 * @param ensureVisible
139 * Ensure visibility of new time (will adjust time range if
142 void setSelectedTime(long time
, boolean ensureVisible
);
145 * Reset the start and end times and notify the registered listeners
147 void resetStartFinishTime();
150 * @return The names' width
155 * Set the names' width
159 void setNameSpace(int width
);
162 * @return The width for timestamps
167 * @return the time format, one of:
169 * <li>{@link TimeFormat#CALENDAR} absolute time, displayed as year/month/day/hours/minutes/seconds/ms/us/ns
170 * <li>{@link TimeFormat#RELATIVE} relative time, displayed as seconds/ms/us/ns
171 * <li>{@link TimeFormat#NUMBER} number, displayed as long values.
174 TimeFormat
getTimeFormat();
This page took 0.036008 seconds and 6 git commands to generate.