1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alvaro Sanchez-Leon - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
;
15 import org
.eclipse
.jface
.viewers
.ISelection
;
16 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
17 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.ITmfViewer
;
18 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.model
.ITimeEvent
;
19 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.model
.ITmfTimeAnalysisEntry
;
20 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.model
.TimeEvent
;
21 import org
.eclipse
.swt
.events
.ControlEvent
;
22 import org
.eclipse
.swt
.widgets
.Control
;
23 import org
.eclipse
.swt
.widgets
.ScrollBar
;
26 * <b><u>ITimeAnalysisWidget</u></b>
29 * TODO: Implement me. Please.
31 public interface ITimeAnalysisViewer
extends ITmfViewer
{
33 public enum TimeFormat
{
40 public void controlResized(ControlEvent e
);
46 * Specifies a fixed start time to the information to be
49 * Specifies a fixed end time to the information to be displayed
50 * @param updateTimeBounds
51 * If True - Time Range boundaries update is required
53 public abstract void display(ITmfTimeAnalysisEntry
[] traceArr
, long start
,
54 long end
, boolean updateTimeBounds
);
57 * The start and End time are taken from the limits used by the children
62 public abstract void display(ITmfTimeAnalysisEntry
[] traceArr
);
64 public void addWidgetSelectionListner(ITmfTimeSelectionListener listener
);
66 public void addWidgetTimeScaleSelectionListner(
67 ITmfTimeScaleSelectionListener listener
);
69 public void filterTraces();
71 public ITmfTimeAnalysisEntry
getSelectedTrace();
73 public ISelection
getSelection();
75 public void groupTraces(boolean on
);
77 public boolean isInFocus();
79 public void removeWidgetSelectionListner(ITmfTimeSelectionListener listener
);
81 public void removeWidgetTimeScaleSelectionListner(
82 ITmfTimeScaleSelectionListener listener
);
84 public void resetStartFinishTime();
86 public void selectNextEvent();
88 public void selectPrevEvent();
90 public void selectNextTrace();
92 public void selectPrevTrace();
94 public void showLegend();
98 public void zoomOut();
100 public void setSelectedTime(long time
, boolean ensureVisible
, Object source
);
102 public void setSelectedEvent(ITimeEvent event
, Object Source
);
104 public void setSelectedTraceTime(ITmfTimeAnalysisEntry trace
, long time
, Object Source
);
106 public void setSelectVisTimeWindow(long time0
, long time1
, Object Source
);
108 public void setAcceptSelectionAPIcalls(boolean acceptCalls
);
110 public void setTimeCalendarFormat(boolean toAbsoluteCaltime
);
112 public boolean isCalendarFormat();
114 public boolean isVisibleVerticalScroll();
116 public void setVisibleVerticalScroll(boolean visibleVerticalScroll
);
118 public int getBorderWidth();
120 public void setBorderWidth(int borderWidth
);
122 public int getHeaderHeight();
124 public void setHeaderHeight(int headerHeight
);
126 public int getItemHeight();
128 public void setItemHeight(int rowHeight
);
130 public void setMinimumItemWidth(int width
);
132 public void resizeControls();
134 public void setSelectedTrace(ITmfTimeAnalysisEntry trace
);
136 public ISelection
getSelectionTrace();
138 public void setNameWidthPref(int width
);
140 public int getNameWidthPref(int width
);
142 public void addFilterSelectionListner(ITmfTimeFilterSelectionListener listener
);
144 public void removeFilterSelectionListner(
145 ITmfTimeFilterSelectionListener listener
);
147 public int getTimeSpace();
149 public void itemUpdate(ITmfTimeAnalysisEntry parent
, TimeEvent item
);
151 public Control
getControl();
153 public ISelectionProvider
getSelectionProvider();
157 * Provide the possibility to control the wait cursor externally
160 * e.g. data requests in progress
164 * - true change to wait cursor
166 public void waitCursor(boolean waitInd
);
168 public void setFocus();
171 * Update the time bounds without changing the visible range
176 public void setTimeBounds(long beginTime
, long endTime
);
179 * Get the horizontal scrollbar
180 * @return the horizontal scrollbar
182 public ScrollBar
getHorizontalBar();
185 * Get the vertical scrollbar
186 * @return the vertical scrollbar
188 public ScrollBar
getVerticalBar();
192 * @param index the top index
194 public void setTopIndex(int index
);