1 /*****************************************************************************
2 * Copyright (c) 2007, 2014 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
.linuxtools
.tmf
.ui
.widgets
.timegraph
.widgets
;
19 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.widgets
.Utils
.TimeFormat
;
22 * Time data provider interface, for use in the timegraph widget.
25 * @author Alvaro Sanchez-Leon
26 * @author Patrick Tasse
27 * @author Xavier Raynaud
29 public interface ITimeDataProvider
{
32 * Updates the selection begin and end time and notifies any registered
33 * listeners about the new time range (if necessary)
35 * @param beginTime the selection begin time
36 * @param endTime the selection end time
39 void setSelectionRangeNotify(long beginTime
, long endTime
);
42 * Updates the selection begin and end time
44 * @param beginTime the selection begin time
45 * @param endTime the selection end time
48 void setSelectionRange(long beginTime
, long endTime
);
51 * @return The begin time of the current selection
54 long getSelectionBegin();
57 * @return The end time of the current selection
60 long getSelectionEnd();
63 * @return The beginning time
68 * @return The end time
73 * @return The minimum time
78 * @return The maximum time
83 * @return The start time of the current selection window
88 * @return The end time of the current selection window
93 * @return The minimal time interval
95 long getMinTimeInterval();
98 * Updates the time range and notify registered listeners
103 void setStartFinishTimeNotify(long time0
, long time1
);
106 * Update the time range but do not trigger event notification
111 void setStartFinishTime(long time0
, long time1
);
114 * Notify registered listeners without updating the time range
116 void notifyStartFinishTime();
119 * Updates the selected time, adjusts the time range if necessary and
120 * notifies any registered listeners about the new selected time and new
121 * range (if necessary)
125 * @param ensureVisible
126 * Ensure visibility of new time (will adjust time range if
129 void setSelectedTimeNotify(long time
, boolean ensureVisible
);
132 * Updates the selected time and adjusts the time range if necessary without
133 * notifying registered listeners.
137 * @param ensureVisible
138 * Ensure visibility of new time (will adjust time range if
141 void setSelectedTime(long time
, boolean ensureVisible
);
144 * Reset the start and end times
146 void resetStartFinishTime();
149 * @return The names' width
154 * Set the names' width
158 void setNameSpace(int width
);
161 * @return The width for timestamps
166 * @return the time format, one of:
168 * <li>{@link TimeFormat#CALENDAR} absolute time, displayed as year/month/day/hours/minutes/seconds/ms/us/ns
169 * <li>{@link TimeFormat#RELATIVE} relative time, displayed as seconds/ms/us/ns
170 * <li>{@link TimeFormat#NUMBER} number, displayed as long values.
174 TimeFormat
getTimeFormat();
This page took 0.099279 seconds and 5 git commands to generate.