tmf: Fix inconsistent tree item expansion in TimeGraphCombo
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / widgets / timegraph / widgets / ITimeDataProvider.java
CommitLineData
be222f56 1/*****************************************************************************
baf92cac
AM
2 * Copyright (c) 2007, 2014 Intel Corporation, Ericsson
3 *
be222f56
PT
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
8 *
9 * Contributors:
10 * Intel Corporation - Initial API and implementation
11 * Ruslan A. Scherbakov, Intel - Initial API and implementation
12 * Alvaro Sanchez-Leon - Updated for TMF
baf92cac
AM
13 * Geneviève Bastien - Added methods to save a time range selection
14 * Patrick Tasse - Refactoring, support for range selection
be222f56
PT
15 *****************************************************************************/
16
2bdf0193 17package org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets;
be222f56 18
2bdf0193 19import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
026664b7 20
be222f56
PT
21/**
22 * Time data provider interface, for use in the timegraph widget.
23 *
24 * @version 1.0
25 * @author Alvaro Sanchez-Leon
26 * @author Patrick Tasse
026664b7 27 * @author Xavier Raynaud
be222f56
PT
28 */
29public interface ITimeDataProvider {
30
31 /**
baf92cac
AM
32 * Updates the selection begin and end time and notifies any registered
33 * listeners about the new time range (if necessary)
34 *
35 * @param beginTime the selection begin time
36 * @param endTime the selection end time
37 * @since 3.0
38 */
39 void setSelectionRangeNotify(long beginTime, long endTime);
40
41 /**
42 * Updates the selection begin and end time
0fcf3b09 43 *
baf92cac
AM
44 * @param beginTime the selection begin time
45 * @param endTime the selection end time
46 * @since 3.0
47 */
48 void setSelectionRange(long beginTime, long endTime);
49
50 /**
51 * @return The begin time of the current selection
52 * @since 3.0
53 */
54 long getSelectionBegin();
55
56 /**
57 * @return The end time of the current selection
58 * @since 3.0
be222f56 59 */
baf92cac 60 long getSelectionEnd();
be222f56
PT
61
62 /**
63 * @return The beginning time
64 */
65 long getBeginTime();
66
67 /**
68 * @return The end time
69 */
70 long getEndTime();
71
72 /**
73 * @return The minimum time
74 */
75 long getMinTime();
76
77 /**
78 * @return The maximum time
79 */
80 long getMaxTime();
81
82 /**
83 * @return The start time of the current selection window
84 */
85 long getTime0();
86
87 /**
88 * @return The end time of the current selection window
89 */
90 long getTime1();
91
92 /**
93 * @return The minimal time interval
94 */
95 long getMinTimeInterval();
96
97 /**
98 * Updates the time range and notify registered listeners
99 *
100 * @param time0
101 * @param time1
102 */
103 void setStartFinishTimeNotify(long time0, long time1);
104
105 /**
106 * Update the time range but do not trigger event notification
107 *
108 * @param time0
109 * @param time1
110 */
111 void setStartFinishTime(long time0, long time1);
112
113 /**
114 * Notify registered listeners without updating the time range
115 */
116 void notifyStartFinishTime();
117
118 /**
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)
122 *
123 * @param time
124 * A Time to set
125 * @param ensureVisible
126 * Ensure visibility of new time (will adjust time range if
127 * necessary)
128 */
f1fae91f 129 void setSelectedTimeNotify(long time, boolean ensureVisible);
be222f56
PT
130
131 /**
132 * Updates the selected time and adjusts the time range if necessary without
133 * notifying registered listeners.
134 *
135 * @param time
136 * A Time to set
137 * @param ensureVisible
138 * Ensure visibility of new time (will adjust time range if
139 * necessary)
140 */
f1fae91f 141 void setSelectedTime(long time, boolean ensureVisible);
be222f56
PT
142
143 /**
144 * Reset the start and end times
145 */
146 void resetStartFinishTime();
147
148 /**
149 * @return The names' width
150 */
151 int getNameSpace();
152
153 /**
154 * Set the names' width
155 *
156 * @param width
157 */
158 void setNameSpace(int width);
159
160 /**
161 * @return The width for timestamps
162 */
163 int getTimeSpace();
164
026664b7
XR
165 /**
166 * @return the time format, one of:
167 * <ul>
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.
171 * </ul>
172 * @since 2.0
173 */
174 TimeFormat getTimeFormat();
be222f56 175}
This page took 0.113939 seconds and 5 git commands to generate.