Commit | Line | Data |
---|---|---|
b0d3496e | 1 | /*******************************************************************************\r |
a5823d5f | 2 | * Copyright (c) 2009, 2010 Ericsson\r |
b0d3496e ASL |
3 | * \r |
4 | * All rights reserved. This program and the accompanying materials are\r | |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
8 | * \r | |
9 | * Contributors:\r | |
10 | * Alvaro Sanchez-Leon - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
12 | \r | |
13 | package org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis;\r | |
14 | \r | |
15 | import org.eclipse.jface.viewers.ISelection;\r | |
16 | import org.eclipse.jface.viewers.ISelectionProvider;\r | |
17 | import org.eclipse.linuxtools.tmf.ui.viewers.ITmfViewer;\r | |
18 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITimeEvent;\r | |
19 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITmfTimeAnalysisEntry;\r | |
41dc35d0 | 20 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.TimeEvent;\r |
b0d3496e ASL |
21 | import org.eclipse.swt.events.ControlEvent;\r |
22 | import org.eclipse.swt.widgets.Control;\r | |
f9dd0622 | 23 | import org.eclipse.swt.widgets.ScrollBar;\r |
b0d3496e ASL |
24 | \r |
25 | /**\r | |
26 | * <b><u>ITimeAnalysisWidget</u></b>\r | |
27 | * <p>\r | |
28 | *\r | |
29 | * TODO: Implement me. Please.\r | |
30 | */\r | |
31 | public interface ITimeAnalysisViewer extends ITmfViewer {\r | |
32 | \r | |
33 | public enum TimeFormat {\r | |
34 | RELATIVE, ABSOLUTE\r | |
35 | };\r | |
36 | \r | |
37 | /**\r | |
38 | * @param e\r | |
39 | */\r | |
40 | public void controlResized(ControlEvent e);\r | |
41 | \r | |
42 | /**\r | |
43 | * \r | |
44 | * @param traceArr\r | |
45 | * @param start\r | |
46 | * Specifies a fixed start time to the information to be\r | |
47 | * displayed\r | |
48 | * @param end\r | |
49 | * Specifies a fixed end time to the information to be displayed\r | |
d712a5f3 FC |
50 | * @param updateTimeBounds\r |
51 | * If True - Time Range boundaries update is required\r | |
b0d3496e | 52 | */\r |
d712a5f3 FC |
53 | public abstract void display(ITmfTimeAnalysisEntry[] traceArr, long start,\r |
54 | long end, boolean updateTimeBounds);\r | |
b0d3496e ASL |
55 | \r |
56 | /**\r | |
57 | * The start and End time are taken from the limits used by the children\r | |
58 | * events\r | |
59 | * \r | |
60 | * @param traceArr\r | |
61 | */\r | |
62 | public abstract void display(ITmfTimeAnalysisEntry[] traceArr);\r | |
63 | \r | |
64 | public void addWidgetSelectionListner(ITmfTimeSelectionListener listener);\r | |
65 | \r | |
66 | public void addWidgetTimeScaleSelectionListner(\r | |
dfaf8391 | 67 | ITmfTimeScaleSelectionListener listener);\r |
b0d3496e ASL |
68 | \r |
69 | public void filterTraces();\r | |
70 | \r | |
71 | public ITmfTimeAnalysisEntry getSelectedTrace();\r | |
72 | \r | |
73 | public ISelection getSelection();\r | |
74 | \r | |
75 | public void groupTraces(boolean on);\r | |
76 | \r | |
77 | public boolean isInFocus();\r | |
78 | \r | |
79 | public void removeWidgetSelectionListner(ITmfTimeSelectionListener listener);\r | |
80 | \r | |
81 | public void removeWidgetTimeScaleSelectionListner(\r | |
dfaf8391 | 82 | ITmfTimeScaleSelectionListener listener);\r |
b0d3496e ASL |
83 | \r |
84 | public void resetStartFinishTime();\r | |
85 | \r | |
86 | public void selectNextEvent();\r | |
87 | \r | |
88 | public void selectPrevEvent();\r | |
89 | \r | |
90 | public void selectNextTrace();\r | |
91 | \r | |
92 | public void selectPrevTrace();\r | |
93 | \r | |
94 | public void showLegend();\r | |
95 | \r | |
96 | public void zoomIn();\r | |
97 | \r | |
98 | public void zoomOut();\r | |
99 | \r | |
100 | public void setSelectedTime(long time, boolean ensureVisible, Object source);\r | |
101 | \r | |
102 | public void setSelectedEvent(ITimeEvent event, Object Source);\r | |
103 | \r | |
104 | public void setSelectedTraceTime(ITmfTimeAnalysisEntry trace, long time, Object Source);\r | |
105 | \r | |
106 | public void setSelectVisTimeWindow(long time0, long time1, Object Source);\r | |
107 | \r | |
108 | public void setAcceptSelectionAPIcalls(boolean acceptCalls);\r | |
109 | \r | |
110 | public void setTimeCalendarFormat(boolean toAbsoluteCaltime);\r | |
111 | \r | |
112 | public boolean isCalendarFormat();\r | |
113 | \r | |
114 | public boolean isVisibleVerticalScroll();\r | |
115 | \r | |
116 | public void setVisibleVerticalScroll(boolean visibleVerticalScroll);\r | |
117 | \r | |
118 | public int getBorderWidth();\r | |
119 | \r | |
120 | public void setBorderWidth(int borderWidth);\r | |
121 | \r | |
122 | public int getHeaderHeight();\r | |
123 | \r | |
124 | public void setHeaderHeight(int headerHeight);\r | |
125 | \r | |
126 | public int getItemHeight();\r | |
127 | \r | |
128 | public void setItemHeight(int rowHeight);\r | |
129 | \r | |
ce62370f FC |
130 | public void setMinimumItemWidth(int width);\r |
131 | \r | |
b0d3496e ASL |
132 | public void resizeControls();\r |
133 | \r | |
134 | public void setSelectedTrace(ITmfTimeAnalysisEntry trace);\r | |
135 | \r | |
136 | public ISelection getSelectionTrace();\r | |
137 | \r | |
138 | public void setNameWidthPref(int width);\r | |
139 | \r | |
140 | public int getNameWidthPref(int width);\r | |
141 | \r | |
142 | public void addFilterSelectionListner(ITmfTimeFilterSelectionListener listener);\r | |
143 | \r | |
144 | public void removeFilterSelectionListner(\r | |
145 | ITmfTimeFilterSelectionListener listener);\r | |
146 | \r | |
147 | public int getTimeSpace();\r | |
148 | \r | |
149 | public void itemUpdate(ITmfTimeAnalysisEntry parent, TimeEvent item);\r | |
150 | \r | |
151 | public Control getControl();\r | |
152 | \r | |
153 | public ISelectionProvider getSelectionProvider();\r | |
41dc35d0 FC |
154 | \r |
155 | /**\r | |
156 | * <p>\r | |
157 | * Provide the possibility to control the wait cursor externally\r | |
158 | * </p>\r | |
159 | * <p>\r | |
160 | * e.g. data requests in progress\r | |
161 | * </p>\r | |
162 | * \r | |
163 | * @param waitInd\r | |
164 | * - true change to wait cursor\r | |
165 | */\r | |
166 | public void waitCursor(boolean waitInd);\r | |
167 | \r | |
a5823d5f ASL |
168 | public void setFocus();\r |
169 | \r | |
d61e0854 PT |
170 | /**\r |
171 | * Update the time bounds without changing the visible range\r | |
172 | * \r | |
173 | * @param beginTime\r | |
174 | * @param endTime\r | |
175 | */\r | |
176 | public void setTimeBounds(long beginTime, long endTime);\r | |
177 | \r | |
f9dd0622 PT |
178 | /**\r |
179 | * Get the horizontal scrollbar\r | |
180 | * @return the horizontal scrollbar\r | |
181 | */\r | |
182 | public ScrollBar getHorizontalBar();\r | |
183 | \r | |
184 | /**\r | |
185 | * Get the vertical scrollbar\r | |
186 | * @return the vertical scrollbar\r | |
187 | */\r | |
188 | public ScrollBar getVerticalBar();\r | |
189 | \r | |
190 | /**\r | |
191 | * Set the top index\r | |
0d9a6d76 | 192 | * @param index the top index\r |
f9dd0622 PT |
193 | */\r |
194 | public void setTopIndex(int index);\r | |
195 | \r | |
b0d3496e | 196 | } |