tmf: Add support for time range selection
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / widgets / timegraph / widgets / ITimeDataProvider.java
CommitLineData
be222f56 1/*****************************************************************************
c8422608 2 * Copyright (c) 2007, 2013 Intel Corporation, Ericsson.
be222f56
PT
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Intel Corporation - Initial API and implementation
10 * Ruslan A. Scherbakov, Intel - Initial API and implementation
11 * Alvaro Sanchez-Leon - Updated for TMF
12 * Patrick Tasse - Refactoring
be222f56
PT
13 *****************************************************************************/
14
15package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
16
026664b7
XR
17import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
18
be222f56
PT
19/**
20 * Time data provider interface, for use in the timegraph widget.
21 *
22 * @version 1.0
23 * @author Alvaro Sanchez-Leon
24 * @author Patrick Tasse
026664b7 25 * @author Xavier Raynaud
be222f56
PT
26 */
27public interface ITimeDataProvider {
28
29 /**
30 * @return The selected time
0fcf3b09
PT
31 *
32 * @deprecated As of 2.1, replaced by {@link ITimeDataProvider2#getSelectionBegin()} and {@link ITimeDataProvider2#getSelectionEnd()}
be222f56 33 */
0fcf3b09 34 @Deprecated
be222f56
PT
35 long getSelectedTime();
36
37 /**
38 * @return The beginning time
39 */
40 long getBeginTime();
41
42 /**
43 * @return The end time
44 */
45 long getEndTime();
46
47 /**
48 * @return The minimum time
49 */
50 long getMinTime();
51
52 /**
53 * @return The maximum time
54 */
55 long getMaxTime();
56
57 /**
58 * @return The start time of the current selection window
59 */
60 long getTime0();
61
62 /**
63 * @return The end time of the current selection window
64 */
65 long getTime1();
66
67 /**
68 * @return The minimal time interval
69 */
70 long getMinTimeInterval();
71
72 /**
73 * Updates the time range and notify registered listeners
74 *
75 * @param time0
76 * @param time1
77 */
78 void setStartFinishTimeNotify(long time0, long time1);
79
80 /**
81 * Update the time range but do not trigger event notification
82 *
83 * @param time0
84 * @param time1
85 */
86 void setStartFinishTime(long time0, long time1);
87
88 /**
89 * Notify registered listeners without updating the time range
90 */
91 void notifyStartFinishTime();
92
93 /**
94 * Updates the selected time, adjusts the time range if necessary and
95 * notifies any registered listeners about the new selected time and new
96 * range (if necessary)
97 *
98 * @param time
99 * A Time to set
100 * @param ensureVisible
101 * Ensure visibility of new time (will adjust time range if
102 * necessary)
103 */
f1fae91f 104 void setSelectedTimeNotify(long time, boolean ensureVisible);
be222f56
PT
105
106 /**
107 * Updates the selected time and adjusts the time range if necessary without
108 * notifying registered listeners.
109 *
110 * @param time
111 * A Time to set
112 * @param ensureVisible
113 * Ensure visibility of new time (will adjust time range if
114 * necessary)
115 */
f1fae91f 116 void setSelectedTime(long time, boolean ensureVisible);
be222f56
PT
117
118 /**
119 * Reset the start and end times
120 */
121 void resetStartFinishTime();
122
123 /**
124 * @return The names' width
125 */
126 int getNameSpace();
127
128 /**
129 * Set the names' width
130 *
131 * @param width
132 */
133 void setNameSpace(int width);
134
135 /**
136 * @return The width for timestamps
137 */
138 int getTimeSpace();
139
026664b7
XR
140 /**
141 * @return the time format, one of:
142 * <ul>
143 * <li>{@link TimeFormat#CALENDAR} absolute time, displayed as year/month/day/hours/minutes/seconds/ms/us/ns
144 * <li>{@link TimeFormat#RELATIVE} relative time, displayed as seconds/ms/us/ns
145 * <li>{@link TimeFormat#NUMBER} number, displayed as long values.
146 * </ul>
147 * @since 2.0
148 */
149 TimeFormat getTimeFormat();
be222f56 150}
This page took 0.041874 seconds and 5 git commands to generate.