Class TimeGraphViewer
- All Implemented Interfaces:
EventListener,org.eclipse.jface.viewers.IInputProvider,org.eclipse.jface.viewers.IInputSelectionProvider,org.eclipse.jface.viewers.ISelectionProvider,org.eclipse.swt.events.SelectionListener,IImageSave,ITimeReset,IMarkerAxisListener,ITimeDataProvider
- Author:
- Patrick Tasse, and others
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant indicating that all levels of the time graph should be expanded -
Constructor Summary
ConstructorsConstructorDescriptionTimeGraphViewer(org.eclipse.swt.widgets.Composite parent, int style) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a bookmark listenervoidaddFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Add a new viewer filter objectvoidaddMarkerListener(ITimeGraphMarkerListener listener) Add a marker listenervoidaddRangeListener(ITimeGraphRangeListener listener) Add a range listenervoidAdd a selection listenervoidaddTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener) voidaddTimeGraphEntryMenuListener(org.eclipse.swt.events.MenuDetectListener listener) voidaddTimeListener(ITimeGraphTimeListener listener) Add a time listenervoidaddTreeListener(ITimeGraphTreeListener listener) Add a tree listenervoidAdd a viewer filter listenervoidchangeFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Change the viewer filter objectvoidCollapses all nodes of the viewer's tree, starting with the root.voidcontrolMoved(org.eclipse.swt.events.ControlEvent e) Callback for when the control is movedvoidcontrolResized(org.eclipse.swt.events.ControlEvent e) Callback for when the control is resizedvoiddispose()Dispose the time graph viewer.voidExpands all entries of the viewer's tree, starting with the root.@NonNull Set<@NonNull ITimeGraphEntry> Get the collapsed (visible or not) time graph entries.intReturns the auto-expand level.intgetAvailableWidth(int requestedOffset) Return the available width for the time-axis.longGet the user-specified bounds begin time.Get the bookmarks list.intRetrieve the border widthorg.eclipse.swt.widgets.ControlReturns the primary control associated with this view.longGet the user-specified bounds end time.intGet the number of expanded (visible) time graph entries.Get the expanded (visible) time graph entries.booleangetExpandedState(ITimeGraphEntry entry) Get the expanded state of an entry.@NonNull org.eclipse.jface.viewers.ViewerFilter[]Returns this viewer's filters.org.eclipse.jface.action.ActionGet the follow arrow backward action.org.eclipse.jface.action.ActionGet the follow arrow forward action.org.eclipse.jface.action.MenuManagerGet the show gridlines menu.intRetrieve the height of the headerorg.eclipse.jface.action.ActiongetHideArrowsAction(org.eclipse.jface.dialogs.IDialogSettings dialogSettings) Get the hide arrows actionorg.eclipse.swt.widgets.SliderGet the horizontal scroll bar objectgetInput()intRetrieve the height of an item rowGet the markers list.org.eclipse.jface.action.MenuManagerGet the show markers menu.longlonglongintintgetNameWidthPref(int width) Retrieve the configure width for the name columnorg.eclipse.jface.action.ActionGet the the next event action.org.eclipse.jface.action.ActionGet the next item action.org.eclipse.jface.action.ActionGet the next marker action.org.eclipse.jface.action.ActionGet the previous event action.org.eclipse.jface.action.ActionGet the previous item action.org.eclipse.jface.action.ActionGet the previous marker action.org.eclipse.jface.action.ActionGet the reset scale action.Get the view's current selectionlonglongintGet the index of the current selectionorg.eclipse.jface.viewers.ISelectionProviderGet the selection providerGet the show filter dialog action.org.eclipse.jface.action.ActionGet the show legend action.longgetTime0()longgetTime1()org.eclipse.swt.widgets.CompositeReturns the composite containing all the controls that are time aligned, i.e.longgetTimeAtX(int x) Return the time corresponding to an x coordinateGets the timegraph content provider used by this timegraph viewer.Returns the time graph control associated with this viewer.Gets the timegraph presentation provider used by this timegraph viewer.Returns the time graph scale associated with this viewer.intReturn the time alignment informationorg.eclipse.jface.action.ActionGet the toggle bookmark action.intRetrieve the current top indexorg.eclipse.swt.widgets.TreegetTree()Returns the tree control associated with this viewer.org.eclipse.swt.widgets.SliderGet the vertical scroll bar objectintgetXForTime(long time) Return the x coordinate corresponding to a timeorg.eclipse.jface.action.ActionGet the zoom in actionorg.eclipse.jface.action.ActionGet the zoom out actionbooleanTells whether the timegraph has saved filters or notbooleanGet the current focus status of this view.booleanisMarkerCategoryVisible(String category) Returns true if the specified marker category is visiblebooleanGet the time event filtering status of the timegraphvoidNotify the range listeners without updating the time range.voidperformAlign(int offset, int width) Perform the alignment operation.voidrefresh()voidRemove a bookmark listenervoidremoveFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Remove the viewer filter objectvoidremoveMarkerListener(ITimeGraphMarkerListener listener) Remove a marker listenervoidremoveRangeListener(ITimeGraphRangeListener listener) Remove a range listenervoidRemove a selection listenervoidremoveTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener) voidremoveTimeGraphEntryMenuListener(org.eclipse.swt.events.MenuDetectListener listener) voidremoveTimeListener(ITimeGraphTimeListener listener) Remove a time listenervoidremoveTreeListener(ITimeGraphTreeListener listener) Remove a tree listenervoidRemove a viewer filter listenervoidReset the start and end times and broadcast the signal to all classes withTmfSignalHandlerforTmfWindowRangeUpdatedSignalvoidresetStartFinishTime(boolean notify) Reset the start and end times.voidResize the controlsvoidselectAndReveal(@NonNull ITimeGraphEntry entry) Select an entry and reveal itvoidselectNextEvent(boolean extend) Callback for when the next event is selectedvoidCallback for when the next item is selectedvoidselectPrevEvent(boolean extend) Callback for when the previous event is selectedvoidCallback for when the previous item is selectedvoidsetAutoExpandLevel(int level) Sets the auto-expand level to be used for new entries discovered when callingsetInput(Object)orrefresh().voidsetBookmarks(List<IMarkerEvent> bookmarks) Set the bookmarks list.voidsetBorderWidth(int borderWidth) Set the border widthvoidsetClockFrequency(long clockFrequency) Sets the clock frequency.voidsetColumns(String[] columnNames) Sets the columns for this time graph viewer's name space.voidsetExpandedState(Iterable<ITimeGraphEntry> entries, boolean expanded) Set the expanded state of a given list of entriesvoidsetExpandedState(ITimeGraphEntry entry, boolean expanded) Set the expanded state of an entryvoidsetFilterColumns(String[] columnNames) Sets the tree columns for this time graph combo's filter dialog.voidsetFilterContentProvider(org.eclipse.jface.viewers.ITreeContentProvider contentProvider) Sets the tree content provider used by the filter dialogvoidsetFilterLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider) Sets the tree label provider used by the filter dialogvoidsetFilters(@NonNull org.eclipse.jface.viewers.ViewerFilter[] filters) Sets the filters, replacing any previous filters, and triggers refiltering of the elements.voidsetFocus()Callback for when this view is focusedvoidsetHeaderHeight(int headerHeight) Set the height of the headervoidsetHideEmptyRowsFilterActive(boolean isHideEmptyRowsFilterActive) Set whether the NoEmptyRows action is active or notvoidsetHorizontalScrollBarVisible(boolean visible) Sets if the horizontal scroll bar is visible.voidvoidsetItemHeight(int rowHeight) Set the height of an item rowvoidsetLabelsVisible(boolean visible) Set the label visibility.voidsetLegendProvider(ITimeGraphLegendProvider legendProvider) Sets the legend providervoidsetLinks(List<ILinkEvent> links) Sets (or clears if null) the list of links to display on this combovoidsetMarkerAxisControlVisible(boolean visible) Sets if the marker axis control is visible.voidsetMarkerCategories(List<String> categories) Set the list of marker categories.voidsetMarkerCategoryVisible(String category, boolean visible) Set the visibility of a marker category.voidsetMarkers(List<IMarkerEvent> markers) Set the markers list.voidsetMinimumItemWidth(int width) Set the minimum item widthvoidsetNameSpace(int width) Set the names' widthvoidsetNameWidthPref(int width) Set the width for the name columnvoidsetSavedFilterStatus(boolean hasSavedFilter) Set whether filters have been saved or not.voidsetSelectedEvent(ITimeEvent event, Object source) Callback to set a selected event in the viewvoidsetSelectedTime(long time, boolean ensureVisible) Updates the selection time.voidsetSelectedTimeNotify(long time, boolean ensureVisible) Updates the selection time and notifies the selection listeners about the new selection time (if it has changed).voidsetSelectedTraceTime(ITimeGraphEntry trace, long time, Object source) Set the seeked time of a tracevoidsetSelection(org.eclipse.jface.viewers.ISelection selection, boolean reveal) voidsetSelectionRange(long beginTime, long endTime, boolean ensureVisible) Updates the selection begin and end time.voidsetSelectionRangeNotify(long beginTime, long endTime, boolean ensureVisible) Updates the selection begin and end time and notifies the selection listeners about the new selection range (if it has changed).voidsetSelectVisTimeWindow(long time0, long time1, Object source) Callback for a time window selectionvoidsetStartFinishTime(long time0, long time1) Update the window range but do not notify the range listeners.voidsetStartFinishTimeNotify(long time0, long time1) Updates the window range and notify the range listeners.voidRecalculate the current time window when bounds have changed.voidsetTimeBounds(long beginTime, long endTime) Set the time bounds to the provided values.voidsetTimeEventFilterApplied(boolean isFilterApplied) set whether a filtering on time events is active or notvoidvoidsetTimeGraphContentProvider(ITimeGraphContentProvider timeGraphContentProvider) Sets the timegraph content provider used by this timegraph viewer.voidsetTimeGraphLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider) Sets the tree label provider used for the name spacevoidsetTimeGraphProvider(ITimeGraphPresentationProvider timeGraphProvider) Sets the timegraph presentation provider used by this timegraph viewer.voidsetTimeGraphScaleVisible(boolean visible) Sets if the time graph scale control is visible.voidsetTimeRange(ITimeGraphEntry[] entries) Recalculate the time bounds based on the time graph entries, if the user-specified bound is set to SWT.DEFAULT.voidsetTopIndex(int index) Set the given index as the top onevoidsetWeights(int[] weights) Sets the relative horizontal weight of each part of the time graph viewer.voidCallback for the show legend actionvoidwaitCursor(boolean waitInd) Wait for the cursorvoidwidgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) voidwidgetSelected(org.eclipse.swt.events.SelectionEvent e) voidzoomIn()Callback for the Zoom In actionvoidzoomOut()Callback for the Zoom Out actionMethods inherited from class org.eclipse.jface.viewers.Viewer
addHelpListener, addSelectionChangedListener, getData, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelectionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.tracecompass.tmf.ui.viewers.IImageSave
saveImage
-
Field Details
-
ALL_LEVELS
public static final int ALL_LEVELSConstant indicating that all levels of the time graph should be expanded- See Also:
-
-
Constructor Details
-
TimeGraphViewer
public TimeGraphViewer(org.eclipse.swt.widgets.Composite parent, int style) Standard constructor.The default timegraph content provider accepts an ITimeGraphEntry[] as input element.
- Parameters:
parent- The parent UI composite objectstyle- The style to use
-
-
Method Details
-
setTimeGraphContentProvider
Sets the timegraph content provider used by this timegraph viewer.- Parameters:
timeGraphContentProvider- the timegraph content provider
-
getTimeGraphContentProvider
Gets the timegraph content provider used by this timegraph viewer.- Returns:
- the timegraph content provider
- Since:
- 3.3
-
setTimeGraphProvider
Sets the timegraph presentation provider used by this timegraph viewer.- Parameters:
timeGraphProvider- the timegraph provider
-
getTimeGraphProvider
Gets the timegraph presentation provider used by this timegraph viewer.- Returns:
- the timegraph presentation provider
- Since:
- 3.3
-
setTimeGraphLabelProvider
public void setTimeGraphLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider) Sets the tree label provider used for the name space- Parameters:
labelProvider- the tree label provider- Since:
- 2.3
-
setFilterColumns
Sets the tree columns for this time graph combo's filter dialog.- Parameters:
columnNames- the tree column names- Since:
- 1.2
-
setFilterContentProvider
public void setFilterContentProvider(org.eclipse.jface.viewers.ITreeContentProvider contentProvider) Sets the tree content provider used by the filter dialog- Parameters:
contentProvider- the tree content provider- Since:
- 1.2
-
setFilterLabelProvider
public void setFilterLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider) Sets the tree label provider used by the filter dialog- Parameters:
labelProvider- the tree label provider- Since:
- 1.2
-
setInput
- Specified by:
setInputin classorg.eclipse.jface.viewers.Viewer
-
getInput
- Specified by:
getInputin interfaceorg.eclipse.jface.viewers.IInputProvider- Specified by:
getInputin classorg.eclipse.jface.viewers.Viewer
-
setLinks
Sets (or clears if null) the list of links to display on this combo- Parameters:
links- the links to display in this time graph combo
-
refresh
public void refresh()- Specified by:
refreshin classorg.eclipse.jface.viewers.Viewer
-
controlMoved
public void controlMoved(org.eclipse.swt.events.ControlEvent e) Callback for when the control is moved- Parameters:
e- The caller event
-
controlResized
public void controlResized(org.eclipse.swt.events.ControlEvent e) Callback for when the control is resized- Parameters:
e- The caller event
-
dispose
public void dispose()Dispose the time graph viewer. -
resizeControls
public void resizeControls()Resize the controls -
setTimeRange
Recalculate the time bounds based on the time graph entries, if the user-specified bound is set to SWT.DEFAULT.- Parameters:
entries- The root time graph entries in the model
-
setTimeBounds
public void setTimeBounds(long beginTime, long endTime) Set the time bounds to the provided values.- Parameters:
beginTime- The bounds begin time, or SWT.DEFAULT to use the input boundsendTime- The bounds end time, or SWT.DEFAULT to use the input bounds
-
setTimeBounds
public void setTimeBounds()Recalculate the current time window when bounds have changed. -
setFocus
public void setFocus()Callback for when this view is focused -
isInFocus
public boolean isInFocus()Get the current focus status of this view.- Returns:
- If the view is currently focused, or not
-
getSelection
Get the view's current selection- Specified by:
getSelectionin interfaceorg.eclipse.jface.viewers.ISelectionProvider- Specified by:
getSelectionin classorg.eclipse.jface.viewers.Viewer- Returns:
- The entry that is selected
-
getSelectionIndex
public int getSelectionIndex()Get the index of the current selection- Returns:
- The index
-
getTime0
public long getTime0()- Specified by:
getTime0in interfaceITimeDataProvider- Returns:
- The current window start time
-
getTime1
public long getTime1()- Specified by:
getTime1in interfaceITimeDataProvider- Returns:
- The current window end time
-
getMinTimeInterval
public long getMinTimeInterval()- Specified by:
getMinTimeIntervalin interfaceITimeDataProvider- Returns:
- The minimal time interval
-
setWeights
public void setWeights(int[] weights) Sets the relative horizontal weight of each part of the time graph viewer. The first number is the name space weight, and the second number is the time space weight.- Parameters:
weights- The array of relative weights of each part of the viewer- Since:
- 2.3
-
getNameSpace
public int getNameSpace()- Specified by:
getNameSpacein interfaceITimeDataProvider- Returns:
- The names' width
-
setNameSpace
public void setNameSpace(int width) Description copied from interface:ITimeDataProviderSet the names' width- Specified by:
setNameSpacein interfaceITimeDataProvider- Parameters:
width-
-
getTimeSpace
public int getTimeSpace()- Specified by:
getTimeSpacein interfaceITimeDataProvider- Returns:
- The width for timestamps
-
getBeginTime
public long getBeginTime()Description copied from interface:ITimeDataProviderGet the user-specified bounds begin time. May be set to SWT.DEFAULT. For the actual bound useITimeDataProvider.getMinTime().- Specified by:
getBeginTimein interfaceITimeDataProvider- Returns:
- The user-specified begin time, or SWT.DEFAULT if input bound used
-
getEndTime
public long getEndTime()Description copied from interface:ITimeDataProviderGet the user-specified bounds end time. May be set to SWT.DEFAULT. For the actual bound useITimeDataProvider.getMaxTime().- Specified by:
getEndTimein interfaceITimeDataProvider- Returns:
- The user-specified end time, or SWT.DEFAULT if input bound used
-
getMaxTime
public long getMaxTime()- Specified by:
getMaxTimein interfaceITimeDataProvider- Returns:
- The bounds maximum time
-
getMinTime
public long getMinTime()- Specified by:
getMinTimein interfaceITimeDataProvider- Returns:
- The bounds minimum time
-
getSelectionBegin
public long getSelectionBegin()- Specified by:
getSelectionBeginin interfaceITimeDataProvider- Returns:
- The begin time of the current selection
-
getSelectionEnd
public long getSelectionEnd()- Specified by:
getSelectionEndin interfaceITimeDataProvider- Returns:
- The end time of the current selection
-
setStartFinishTimeNotify
public void setStartFinishTimeNotify(long time0, long time1) Description copied from interface:ITimeDataProviderUpdates the window range and notify the range listeners.- Specified by:
setStartFinishTimeNotifyin interfaceITimeDataProvider- Parameters:
time0- the window start timetime1- the window end time
-
notifyStartFinishTime
public void notifyStartFinishTime()Description copied from interface:ITimeDataProviderNotify the range listeners without updating the time range.- Specified by:
notifyStartFinishTimein interfaceITimeDataProvider
-
setStartFinishTime
public void setStartFinishTime(long time0, long time1) Description copied from interface:ITimeDataProviderUpdate the window range but do not notify the range listeners.- Specified by:
setStartFinishTimein interfaceITimeDataProvider- Parameters:
time0- the window start timetime1- the window end time
-
resetStartFinishTime
public void resetStartFinishTime()Description copied from interface:ITimeResetReset the start and end times and broadcast the signal to all classes withTmfSignalHandlerforTmfWindowRangeUpdatedSignal- Specified by:
resetStartFinishTimein interfaceITimeReset
-
resetStartFinishTime
public void resetStartFinishTime(boolean notify) Description copied from interface:ITimeDataProviderReset the start and end times.- Specified by:
resetStartFinishTimein interfaceITimeDataProvider- Specified by:
resetStartFinishTimein interfaceITimeReset- Parameters:
notify- if true, notify the registered listeners- Since:
- 2.0
-
setSelectedTimeNotify
public void setSelectedTimeNotify(long time, boolean ensureVisible) Description copied from interface:ITimeDataProviderUpdates the selection time and notifies the selection listeners about the new selection time (if it has changed).If ensureVisible is true, the window range will be centered on the selection time, if and only if that time is outside of the current window. If the window range is modified, the range listeners will be notified.
- Specified by:
setSelectedTimeNotifyin interfaceITimeDataProvider- Parameters:
time- the selection timeensureVisible- if true, ensure visibility of the new selection time
-
setSelectedTime
public void setSelectedTime(long time, boolean ensureVisible) Description copied from interface:ITimeDataProviderUpdates the selection time.If ensureVisible is true, the window range will be centered on the selection time, if and only if that time is outside of the current window. If the window range is modified, the range listeners will be notified.
- Specified by:
setSelectedTimein interfaceITimeDataProvider- Parameters:
time- the selection timeensureVisible- if true, ensure visibility of the new selection time
-
setSelectionRangeNotify
public void setSelectionRangeNotify(long beginTime, long endTime, boolean ensureVisible) Description copied from interface:ITimeDataProviderUpdates the selection begin and end time and notifies the selection listeners about the new selection range (if it has changed).If ensureVisible is true, the window range will be centered either on the selection begin time (if it has changed) or otherwise on the selection end time, if and only if that time is outside of the current window. If the window range is modified, the range listeners will be notified.
- Specified by:
setSelectionRangeNotifyin interfaceITimeDataProvider- Parameters:
beginTime- the selection begin timeendTime- the selection end timeensureVisible- if true, ensure visibility of the new selection range boundary- Since:
- 1.2
-
setSelectionRange
public void setSelectionRange(long beginTime, long endTime, boolean ensureVisible) Description copied from interface:ITimeDataProviderUpdates the selection begin and end time.If ensureVisible is true, the window range will be centered either on the selection begin time (if it has changed) or otherwise on the selection end time, if and only if that time is outside of the current window. If the window range is modified, the range listeners will be notified.
- Specified by:
setSelectionRangein interfaceITimeDataProvider- Parameters:
beginTime- the selection begin timeendTime- the selection end timeensureVisible- if true, ensure visibility of the new selection range boundary- Since:
- 1.2
-
widgetDefaultSelected
public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) - Specified by:
widgetDefaultSelectedin interfaceorg.eclipse.swt.events.SelectionListener
-
widgetSelected
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) - Specified by:
widgetSelectedin interfaceorg.eclipse.swt.events.SelectionListener
-
selectNextEvent
public void selectNextEvent(boolean extend) Callback for when the next event is selected- Parameters:
extend- true to extend selection range, false for single selection- Since:
- 1.0
-
selectPrevEvent
public void selectPrevEvent(boolean extend) Callback for when the previous event is selected- Parameters:
extend- true to extend selection range, false for single selection- Since:
- 1.0
-
selectNextItem
public void selectNextItem()Callback for when the next item is selected -
selectPrevItem
public void selectPrevItem()Callback for when the previous item is selected -
setLegendProvider
Sets the legend provider- Parameters:
legendProvider- the legend provider- Since:
- 3.3
-
showLegend
public void showLegend()Callback for the show legend action -
zoomIn
public void zoomIn()Callback for the Zoom In action -
zoomOut
public void zoomOut()Callback for the Zoom Out action -
addSelectionListener
Add a selection listener- Parameters:
listener- The listener to add
-
removeSelectionListener
Remove a selection listener- Parameters:
listener- The listener to remove
-
addTimeListener
Add a time listener- Parameters:
listener- The listener to add
-
removeTimeListener
Remove a time listener- Parameters:
listener- The listener to remove
-
addRangeListener
Add a range listener- Parameters:
listener- The listener to add
-
removeRangeListener
Remove a range listener- Parameters:
listener- The listener to remove
-
addBookmarkListener
Add a bookmark listener- Parameters:
listener- The listener to add- Since:
- 2.0
-
removeBookmarkListener
Remove a bookmark listener- Parameters:
listener- The listener to remove- Since:
- 2.0
-
setBookmarks
Set the bookmarks list.- Parameters:
bookmarks- The bookmarks list, or null- Since:
- 2.0
-
getBookmarks
Get the bookmarks list.- Returns:
- The bookmarks list
- Since:
- 2.0
-
setMarkerCategories
Set the list of marker categories.- Parameters:
categories- The list of marker categories, or null- Since:
- 2.0
-
setMarkerCategoryVisible
Description copied from interface:IMarkerAxisListenerSet the visibility of a marker category.- Specified by:
setMarkerCategoryVisiblein interfaceIMarkerAxisListener- Parameters:
category- the marker categoryvisible- true if the marker category should be visible, false otherwise- Since:
- 2.0
-
isMarkerCategoryVisible
Returns true if the specified marker category is visible- Parameters:
category- the marker category- Returns:
- true if the specified marker category is visible
- Since:
- 7.1
-
setMarkers
Set the markers list.- Parameters:
markers- The markers list, or null- Since:
- 2.0
-
getMarkers
Get the markers list.- Returns:
- The markers list, or null
- Since:
- 2.0
-
addMarkerListener
Add a marker listener- Parameters:
listener- The listener to add- Since:
- 7.1
-
removeMarkerListener
Remove a marker listener- Parameters:
listener- The listener to remove- Since:
- 7.1
-
setSelectedEvent
Callback to set a selected event in the view- Parameters:
event- The event that was selectedsource- The source of this selection event
-
setSelectedTraceTime
Set the seeked time of a trace- Parameters:
trace- The trace that was seekedtime- The target timesource- The source of this seek event
-
setSelection
public void setSelection(org.eclipse.jface.viewers.ISelection selection, boolean reveal) - Specified by:
setSelectionin classorg.eclipse.jface.viewers.Viewer
-
setSelectVisTimeWindow
Callback for a time window selection- Parameters:
time0- Start time of the rangetime1- End time of the rangesource- Source of the event
-
getTimeFormat
- Specified by:
getTimeFormatin interfaceITimeDataProvider- Returns:
- the time format, one of:
Utils.TimeFormat.CALENDARabsolute time, displayed as year/month/day/hours/minutes/seconds/ms/us/nsUtils.TimeFormat.RELATIVErelative time, displayed as seconds/ms/us/nsUtils.TimeFormat.NUMBERnumber, displayed as long values.Utils.TimeFormat.CYCLEScycles, displayed as long values.
-
setTimeFormat
- Parameters:
tf- theUtils.TimeFormatused to display timestamps
-
setClockFrequency
public void setClockFrequency(long clockFrequency) Sets the clock frequency. Used when the time format is set to CYCLES.- Parameters:
clockFrequency- the clock frequency in Hz
-
getBorderWidth
public int getBorderWidth()Retrieve the border width- Returns:
- The width
-
setBorderWidth
public void setBorderWidth(int borderWidth) Set the border width- Parameters:
borderWidth- The width
-
getHeaderHeight
public int getHeaderHeight()Retrieve the height of the header- Returns:
- The height
-
setHeaderHeight
public void setHeaderHeight(int headerHeight) Set the height of the header- Parameters:
headerHeight- The height to set
-
getItemHeight
public int getItemHeight()Retrieve the height of an item row- Returns:
- The height
-
setItemHeight
public void setItemHeight(int rowHeight) Set the height of an item row- Parameters:
rowHeight- The height to set
-
setMinimumItemWidth
public void setMinimumItemWidth(int width) Set the minimum item width- Parameters:
width- The min width
-
setNameWidthPref
public void setNameWidthPref(int width) Set the width for the name column- Parameters:
width- The width
-
getNameWidthPref
public int getNameWidthPref(int width) Retrieve the configure width for the name column- Parameters:
width- Unused?- Returns:
- The width
-
setLabelsVisible
public void setLabelsVisible(boolean visible) Set the label visibility. The default is true.- Parameters:
visible- true to show the labels, false otherwise- Since:
- 5.2
-
getControl
public org.eclipse.swt.widgets.Control getControl()Description copied from interface:IImageSaveReturns the primary control associated with this view.- Specified by:
getControlin interfaceIImageSave- Specified by:
getControlin classorg.eclipse.jface.viewers.Viewer- Returns:
- the SWT control which displays this view's content
-
getTimeGraphControl
Returns the time graph control associated with this viewer.- Returns:
- the time graph control
-
getTree
public org.eclipse.swt.widgets.Tree getTree()Returns the tree control associated with this viewer. The tree is only used for column handling of the name space and contains no tree items.- Returns:
- the tree control
- Since:
- 2.3
-
setColumns
Sets the columns for this time graph viewer's name space.- Parameters:
columnNames- the column names- Since:
- 2.3
-
getTimeGraphScale
Returns the time graph scale associated with this viewer.- Returns:
- the time graph scale
-
setTimeGraphScaleVisible
public void setTimeGraphScaleVisible(boolean visible) Sets if the time graph scale control is visible. This includes the header of the tree and the time graph scale itself.- Parameters:
visible-trueto make the controls visible orfalseto hide them- Since:
- 6.0
-
setMarkerAxisControlVisible
public void setMarkerAxisControlVisible(boolean visible) Sets if the marker axis control is visible.- Parameters:
visible-trueto make the control visible orfalseto hide it- Since:
- 6.0
-
setHorizontalScrollBarVisible
public void setHorizontalScrollBarVisible(boolean visible) Sets if the horizontal scroll bar is visible.- Parameters:
visible-trueto make the control visible orfalseto hide it- Since:
- 6.0
-
getTimeAlignedComposite
public org.eclipse.swt.widgets.Composite getTimeAlignedComposite()Returns the composite containing all the controls that are time aligned, i.e. TimeGraphScale, TimeGraphControl.- Returns:
- the time based composite
- Since:
- 1.0
-
getXForTime
public int getXForTime(long time) Return the x coordinate corresponding to a time- Parameters:
time- the time- Returns:
- the x coordinate corresponding to the time
-
getTimeAtX
public long getTimeAtX(int x) Return the time corresponding to an x coordinate- Parameters:
x- the x coordinate- Returns:
- the time corresponding to the x coordinate
-
getSelectionProvider
public org.eclipse.jface.viewers.ISelectionProvider getSelectionProvider()Get the selection provider- Returns:
- the selection provider
-
waitCursor
public void waitCursor(boolean waitInd) Wait for the cursor- Parameters:
waitInd- Wait indefinitely?
-
getHorizontalBar
public org.eclipse.swt.widgets.Slider getHorizontalBar()Get the horizontal scroll bar object- Returns:
- The scroll bar
-
getVerticalBar
public org.eclipse.swt.widgets.Slider getVerticalBar()Get the vertical scroll bar object- Returns:
- The scroll bar
-
setTopIndex
public void setTopIndex(int index) Set the given index as the top one- Parameters:
index- The index that will go to the top
-
getTopIndex
public int getTopIndex()Retrieve the current top index- Returns:
- The top index
-
setAutoExpandLevel
public void setAutoExpandLevel(int level) Sets the auto-expand level to be used for new entries discovered when callingsetInput(Object)orrefresh(). The value 0 means that there is no auto-expand; 1 means that top-level entries are expanded, but not their children; 2 means that top-level entries are expanded, and their children, but not grand-children; and so on.The value
ALL_LEVELSmeans that all subtrees should be expanded.- Parameters:
level- non-negative level, orALL_LEVELSto expand all levels of the tree
-
getAutoExpandLevel
public int getAutoExpandLevel()Returns the auto-expand level.- Returns:
- non-negative level, or
ALL_LEVELSif all levels of the tree are expanded automatically - See Also:
-
getExpandedState
Get the expanded state of an entry.- Parameters:
entry- The entry- Returns:
- true if the entry is expanded, false if collapsed
- Since:
- 1.1
-
setExpandedState
Set the expanded state of an entry- Parameters:
entry- The entry to expand/collapseexpanded- True for expanded, false for collapsed
-
setExpandedState
Set the expanded state of a given list of entries- Parameters:
entries- The list of entriesexpanded- True if expanded, false if collapsed- Since:
- 3.1
-
collapseAll
public void collapseAll()Collapses all nodes of the viewer's tree, starting with the root. -
expandAll
public void expandAll()Expands all entries of the viewer's tree, starting with the root. -
selectAndReveal
Select an entry and reveal it- Parameters:
entry- The entry to select- Since:
- 2.0
-
getExpandedElementCount
public int getExpandedElementCount()Get the number of expanded (visible) time graph entries. This includes leafs and does not include filtered-out entries.- Returns:
- The number of expanded (visible) time graph entries
-
getExpandedElements
Get the expanded (visible) time graph entries. This includes leafs and does not include filtered-out entries.- Returns:
- The array of expanded (visible) time graph entries
-
getAllCollapsedElements
Get the collapsed (visible or not) time graph entries.- Returns:
- The array of collapsed time graph entries
- Since:
- 3.1
-
addTreeListener
Add a tree listener- Parameters:
listener- The listener to add
-
removeTreeListener
Remove a tree listener- Parameters:
listener- The listener to remove
-
addViewerFilterListener
Add a viewer filter listener- Parameters:
listener- The listener to add- Since:
- 3.2
-
removeViewerFilterListener
Remove a viewer filter listener- Parameters:
listener- The listener to remove- Since:
- 3.2
-
getResetScaleAction
public org.eclipse.jface.action.Action getResetScaleAction()Get the reset scale action.- Returns:
- The Action object
-
getShowLegendAction
public org.eclipse.jface.action.Action getShowLegendAction()Get the show legend action.- Returns:
- The Action object
-
getNextEventAction
public org.eclipse.jface.action.Action getNextEventAction()Get the the next event action.- Returns:
- The action object
-
getPreviousEventAction
public org.eclipse.jface.action.Action getPreviousEventAction()Get the previous event action.- Returns:
- The Action object
-
getNextItemAction
public org.eclipse.jface.action.Action getNextItemAction()Get the next item action.- Returns:
- The Action object
-
getPreviousItemAction
public org.eclipse.jface.action.Action getPreviousItemAction()Get the previous item action.- Returns:
- The Action object
-
getZoomInAction
public org.eclipse.jface.action.Action getZoomInAction()Get the zoom in action- Returns:
- The Action object
-
getZoomOutAction
public org.eclipse.jface.action.Action getZoomOutAction()Get the zoom out action- Returns:
- The Action object
-
getHideArrowsAction
public org.eclipse.jface.action.Action getHideArrowsAction(org.eclipse.jface.dialogs.IDialogSettings dialogSettings) Get the hide arrows action- Parameters:
dialogSettings- The dialog settings section where the state should be stored, or null- Returns:
- The Action object
-
getFollowArrowFwdAction
public org.eclipse.jface.action.Action getFollowArrowFwdAction()Get the follow arrow forward action.- Returns:
- The Action object
-
getFollowArrowBwdAction
public org.eclipse.jface.action.Action getFollowArrowBwdAction()Get the follow arrow backward action.- Returns:
- The Action object
-
getShowFilterDialogAction
Get the show filter dialog action.- Returns:
- The Action object
- Since:
- 1.2
-
getToggleBookmarkAction
public org.eclipse.jface.action.Action getToggleBookmarkAction()Get the toggle bookmark action.- Returns:
- The Action object
- Since:
- 2.0
-
getNextMarkerAction
public org.eclipse.jface.action.Action getNextMarkerAction()Get the next marker action.- Returns:
- The Action object
- Since:
- 2.0
-
getPreviousMarkerAction
public org.eclipse.jface.action.Action getPreviousMarkerAction()Get the previous marker action.- Returns:
- The Action object
- Since:
- 2.0
-
getMarkersMenu
public org.eclipse.jface.action.MenuManager getMarkersMenu()Get the show markers menu.- Returns:
- The menu manager object
- Since:
- 2.0
-
getGridlinesMenu
public org.eclipse.jface.action.MenuManager getGridlinesMenu()Get the show gridlines menu.- Returns:
- The menu manager object
- Since:
- 4.0
-
addTimeGraphEntryMenuListener
public void addTimeGraphEntryMenuListener(org.eclipse.swt.events.MenuDetectListener listener) - Parameters:
listener- aMenuDetectListener- See Also:
-
removeTimeGraphEntryMenuListener
public void removeTimeGraphEntryMenuListener(org.eclipse.swt.events.MenuDetectListener listener) - Parameters:
listener- aMenuDetectListener- See Also:
-
addTimeEventMenuListener
public void addTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener) - Parameters:
listener- aMenuDetectListener- See Also:
-
removeTimeEventMenuListener
public void removeTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener) - Parameters:
listener- aMenuDetectListener- See Also:
-
addFilter
public void addFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Add a new viewer filter object- Parameters:
filter- The filter object to be attached to the view
-
changeFilter
public void changeFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Change the viewer filter object- Parameters:
filter- The filter object to be attached to the view- Since:
- 3.2
-
removeFilter
public void removeFilter(@NonNull org.eclipse.jface.viewers.ViewerFilter filter) Remove the viewer filter object- Parameters:
filter- The filter object to be attached to the view
-
getFilters
public @NonNull org.eclipse.jface.viewers.ViewerFilter[] getFilters()Returns this viewer's filters.- Returns:
- an array of viewer filters
- Since:
- 1.2
-
setFilters
public void setFilters(@NonNull org.eclipse.jface.viewers.ViewerFilter[] filters) Sets the filters, replacing any previous filters, and triggers refiltering of the elements.- Parameters:
filters- an array of viewer filters, or null- Since:
- 1.2
-
getTimeViewAlignmentInfo
Return the time alignment information- Returns:
- the time alignment information
- Since:
- 1.0
- See Also:
-
getAvailableWidth
public int getAvailableWidth(int requestedOffset) Return the available width for the time-axis.- Parameters:
requestedOffset- the requested offset- Returns:
- the available width for the time-axis
- Since:
- 1.0
- See Also:
-
performAlign
public void performAlign(int offset, int width) Perform the alignment operation.- Parameters:
offset- the alignment offsetwidth- the alignment width- Since:
- 1.0
- See Also:
-
setTimeEventFilterApplied
public void setTimeEventFilterApplied(boolean isFilterApplied) set whether a filtering on time events is active or not- Parameters:
isFilterApplied- The time events filtering status- Since:
- 4.0
-
isTimeEventFilterActive
public boolean isTimeEventFilterActive()Get the time event filtering status of the timegraph- Returns:
- True whether the view has time event filters, false otherwise
- Since:
- 4.0
-
setSavedFilterStatus
public void setSavedFilterStatus(boolean hasSavedFilter) Set whether filters have been saved or not.- Parameters:
hasSavedFilter- The saved filter status- Since:
- 4.0
-
hasSavedFilters
public boolean hasSavedFilters()Tells whether the timegraph has saved filters or not- Returns:
- True whether there is saved filters, false otherwise
- Since:
- 4.0
-
setHideEmptyRowsFilterActive
public void setHideEmptyRowsFilterActive(boolean isHideEmptyRowsFilterActive) Set whether the NoEmptyRows action is active or not- Parameters:
isHideEmptyRowsFilterActive- The HideEmptyRowsAction status- Since:
- 6.1
-