Class TimeGraphViewer

java.lang.Object
org.eclipse.jface.viewers.Viewer
org.eclipse.tracecompass.tmf.ui.widgets.timegraph.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

public class TimeGraphViewer extends org.eclipse.jface.viewers.Viewer implements ITimeDataProvider, IMarkerAxisListener, org.eclipse.swt.events.SelectionListener, IImageSave
Generic time graph viewer implementation
Author:
Patrick Tasse, and others
  • Field Details

    • ALL_LEVELS

      public static final int ALL_LEVELS
      Constant 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 object
      style - The style to use
  • Method Details

    • setTimeGraphContentProvider

      public void setTimeGraphContentProvider(ITimeGraphContentProvider timeGraphContentProvider)
      Sets the timegraph content provider used by this timegraph viewer.
      Parameters:
      timeGraphContentProvider - the timegraph content provider
    • getTimeGraphContentProvider

      public ITimeGraphContentProvider getTimeGraphContentProvider()
      Gets the timegraph content provider used by this timegraph viewer.
      Returns:
      the timegraph content provider
      Since:
      3.3
    • setTimeGraphProvider

      public void setTimeGraphProvider(ITimeGraphPresentationProvider timeGraphProvider)
      Sets the timegraph presentation provider used by this timegraph viewer.
      Parameters:
      timeGraphProvider - the timegraph provider
    • getTimeGraphProvider

      public ITimeGraphPresentationProvider 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

      public void setFilterColumns(String[] columnNames)
      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

      public void setInput(Object inputElement)
      Specified by:
      setInput in class org.eclipse.jface.viewers.Viewer
    • getInput

      public Object getInput()
      Specified by:
      getInput in interface org.eclipse.jface.viewers.IInputProvider
      Specified by:
      getInput in class org.eclipse.jface.viewers.Viewer
    • setLinks

      public void setLinks(List<ILinkEvent> links)
      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:
      refresh in class org.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

      public void setTimeRange(ITimeGraphEntry[] entries)
      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 bounds
      endTime - 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

      public ITimeGraphEntry getSelection()
      Get the view's current selection
      Specified by:
      getSelection in interface org.eclipse.jface.viewers.ISelectionProvider
      Specified by:
      getSelection in class org.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:
      getTime0 in interface ITimeDataProvider
      Returns:
      The current window start time
    • getTime1

      public long getTime1()
      Specified by:
      getTime1 in interface ITimeDataProvider
      Returns:
      The current window end time
    • getMinTimeInterval

      public long getMinTimeInterval()
      Specified by:
      getMinTimeInterval in interface ITimeDataProvider
      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:
      getNameSpace in interface ITimeDataProvider
      Returns:
      The names' width
    • setNameSpace

      public void setNameSpace(int width)
      Description copied from interface: ITimeDataProvider
      Set the names' width
      Specified by:
      setNameSpace in interface ITimeDataProvider
      Parameters:
      width -
    • getTimeSpace

      public int getTimeSpace()
      Specified by:
      getTimeSpace in interface ITimeDataProvider
      Returns:
      The width for timestamps
    • getBeginTime

      public long getBeginTime()
      Description copied from interface: ITimeDataProvider
      Get the user-specified bounds begin time. May be set to SWT.DEFAULT. For the actual bound use ITimeDataProvider.getMinTime().
      Specified by:
      getBeginTime in interface ITimeDataProvider
      Returns:
      The user-specified begin time, or SWT.DEFAULT if input bound used
    • getEndTime

      public long getEndTime()
      Description copied from interface: ITimeDataProvider
      Get the user-specified bounds end time. May be set to SWT.DEFAULT. For the actual bound use ITimeDataProvider.getMaxTime().
      Specified by:
      getEndTime in interface ITimeDataProvider
      Returns:
      The user-specified end time, or SWT.DEFAULT if input bound used
    • getMaxTime

      public long getMaxTime()
      Specified by:
      getMaxTime in interface ITimeDataProvider
      Returns:
      The bounds maximum time
    • getMinTime

      public long getMinTime()
      Specified by:
      getMinTime in interface ITimeDataProvider
      Returns:
      The bounds minimum time
    • getSelectionBegin

      public long getSelectionBegin()
      Specified by:
      getSelectionBegin in interface ITimeDataProvider
      Returns:
      The begin time of the current selection
    • getSelectionEnd

      public long getSelectionEnd()
      Specified by:
      getSelectionEnd in interface ITimeDataProvider
      Returns:
      The end time of the current selection
    • setStartFinishTimeNotify

      public void setStartFinishTimeNotify(long time0, long time1)
      Description copied from interface: ITimeDataProvider
      Updates the window range and notify the range listeners.
      Specified by:
      setStartFinishTimeNotify in interface ITimeDataProvider
      Parameters:
      time0 - the window start time
      time1 - the window end time
    • notifyStartFinishTime

      public void notifyStartFinishTime()
      Description copied from interface: ITimeDataProvider
      Notify the range listeners without updating the time range.
      Specified by:
      notifyStartFinishTime in interface ITimeDataProvider
    • setStartFinishTime

      public void setStartFinishTime(long time0, long time1)
      Description copied from interface: ITimeDataProvider
      Update the window range but do not notify the range listeners.
      Specified by:
      setStartFinishTime in interface ITimeDataProvider
      Parameters:
      time0 - the window start time
      time1 - the window end time
    • resetStartFinishTime

      public void resetStartFinishTime()
      Description copied from interface: ITimeReset
      Reset the start and end times and broadcast the signal to all classes with TmfSignalHandler for TmfWindowRangeUpdatedSignal
      Specified by:
      resetStartFinishTime in interface ITimeReset
    • resetStartFinishTime

      public void resetStartFinishTime(boolean notify)
      Description copied from interface: ITimeDataProvider
      Reset the start and end times.
      Specified by:
      resetStartFinishTime in interface ITimeDataProvider
      Specified by:
      resetStartFinishTime in interface ITimeReset
      Parameters:
      notify - if true, notify the registered listeners
      Since:
      2.0
    • setSelectedTimeNotify

      public void setSelectedTimeNotify(long time, boolean ensureVisible)
      Description copied from interface: ITimeDataProvider
      Updates 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:
      setSelectedTimeNotify in interface ITimeDataProvider
      Parameters:
      time - the selection time
      ensureVisible - if true, ensure visibility of the new selection time
    • setSelectedTime

      public void setSelectedTime(long time, boolean ensureVisible)
      Description copied from interface: ITimeDataProvider
      Updates 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:
      setSelectedTime in interface ITimeDataProvider
      Parameters:
      time - the selection time
      ensureVisible - if true, ensure visibility of the new selection time
    • setSelectionRangeNotify

      public void setSelectionRangeNotify(long beginTime, long endTime, boolean ensureVisible)
      Description copied from interface: ITimeDataProvider
      Updates 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:
      setSelectionRangeNotify in interface ITimeDataProvider
      Parameters:
      beginTime - the selection begin time
      endTime - the selection end time
      ensureVisible - 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: ITimeDataProvider
      Updates 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:
      setSelectionRange in interface ITimeDataProvider
      Parameters:
      beginTime - the selection begin time
      endTime - the selection end time
      ensureVisible - 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:
      widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener
    • widgetSelected

      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
      Specified by:
      widgetSelected in interface org.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

      public void setLegendProvider(ITimeGraphLegendProvider legendProvider)
      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

      public void addSelectionListener(ITimeGraphSelectionListener listener)
      Add a selection listener
      Parameters:
      listener - The listener to add
    • removeSelectionListener

      public void removeSelectionListener(ITimeGraphSelectionListener listener)
      Remove a selection listener
      Parameters:
      listener - The listener to remove
    • addTimeListener

      public void addTimeListener(ITimeGraphTimeListener listener)
      Add a time listener
      Parameters:
      listener - The listener to add
    • removeTimeListener

      public void removeTimeListener(ITimeGraphTimeListener listener)
      Remove a time listener
      Parameters:
      listener - The listener to remove
    • addRangeListener

      public void addRangeListener(ITimeGraphRangeListener listener)
      Add a range listener
      Parameters:
      listener - The listener to add
    • removeRangeListener

      public void removeRangeListener(ITimeGraphRangeListener listener)
      Remove a range listener
      Parameters:
      listener - The listener to remove
    • addBookmarkListener

      public void addBookmarkListener(ITimeGraphBookmarkListener listener)
      Add a bookmark listener
      Parameters:
      listener - The listener to add
      Since:
      2.0
    • removeBookmarkListener

      public void removeBookmarkListener(ITimeGraphBookmarkListener listener)
      Remove a bookmark listener
      Parameters:
      listener - The listener to remove
      Since:
      2.0
    • setBookmarks

      public void setBookmarks(List<IMarkerEvent> bookmarks)
      Set the bookmarks list.
      Parameters:
      bookmarks - The bookmarks list, or null
      Since:
      2.0
    • getBookmarks

      public List<IMarkerEvent> getBookmarks()
      Get the bookmarks list.
      Returns:
      The bookmarks list
      Since:
      2.0
    • setMarkerCategories

      public void setMarkerCategories(List<String> categories)
      Set the list of marker categories.
      Parameters:
      categories - The list of marker categories, or null
      Since:
      2.0
    • setMarkerCategoryVisible

      public void setMarkerCategoryVisible(String category, boolean visible)
      Description copied from interface: IMarkerAxisListener
      Set the visibility of a marker category.
      Specified by:
      setMarkerCategoryVisible in interface IMarkerAxisListener
      Parameters:
      category - the marker category
      visible - true if the marker category should be visible, false otherwise
      Since:
      2.0
    • isMarkerCategoryVisible

      public boolean isMarkerCategoryVisible(String category)
      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

      public void setMarkers(List<IMarkerEvent> markers)
      Set the markers list.
      Parameters:
      markers - The markers list, or null
      Since:
      2.0
    • getMarkers

      public List<IMarkerEvent> getMarkers()
      Get the markers list.
      Returns:
      The markers list, or null
      Since:
      2.0
    • addMarkerListener

      public void addMarkerListener(ITimeGraphMarkerListener listener)
      Add a marker listener
      Parameters:
      listener - The listener to add
      Since:
      7.1
    • removeMarkerListener

      public void removeMarkerListener(ITimeGraphMarkerListener listener)
      Remove a marker listener
      Parameters:
      listener - The listener to remove
      Since:
      7.1
    • setSelectedEvent

      public void setSelectedEvent(ITimeEvent event, Object source)
      Callback to set a selected event in the view
      Parameters:
      event - The event that was selected
      source - The source of this selection event
    • setSelectedTraceTime

      public void setSelectedTraceTime(ITimeGraphEntry trace, long time, Object source)
      Set the seeked time of a trace
      Parameters:
      trace - The trace that was seeked
      time - The target time
      source - The source of this seek event
    • setSelection

      public void setSelection(org.eclipse.jface.viewers.ISelection selection, boolean reveal)
      Specified by:
      setSelection in class org.eclipse.jface.viewers.Viewer
    • setSelectVisTimeWindow

      public void setSelectVisTimeWindow(long time0, long time1, Object source)
      Callback for a time window selection
      Parameters:
      time0 - Start time of the range
      time1 - End time of the range
      source - Source of the event
    • getTimeFormat

      public Utils.TimeFormat getTimeFormat()
      Specified by:
      getTimeFormat in interface ITimeDataProvider
      Returns:
      the time format, one of:
    • setTimeFormat

      public void setTimeFormat(Utils.TimeFormat tf)
      Parameters:
      tf - the Utils.TimeFormat used 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: IImageSave
      Returns the primary control associated with this view.
      Specified by:
      getControl in interface IImageSave
      Specified by:
      getControl in class org.eclipse.jface.viewers.Viewer
      Returns:
      the SWT control which displays this view's content
    • getTimeGraphControl

      public TimeGraphControl 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

      public void setColumns(String[] columnNames)
      Sets the columns for this time graph viewer's name space.
      Parameters:
      columnNames - the column names
      Since:
      2.3
    • getTimeGraphScale

      public TimeGraphScale 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 - true to make the controls visible or false to hide them
      Since:
      6.0
    • setMarkerAxisControlVisible

      public void setMarkerAxisControlVisible(boolean visible)
      Sets if the marker axis control is visible.
      Parameters:
      visible - true to make the control visible or false to hide it
      Since:
      6.0
    • setHorizontalScrollBarVisible

      public void setHorizontalScrollBarVisible(boolean visible)
      Sets if the horizontal scroll bar is visible.
      Parameters:
      visible - true to make the control visible or false to 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 calling setInput(Object) or refresh(). 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_LEVELS means that all subtrees should be expanded.

      Parameters:
      level - non-negative level, or ALL_LEVELS to expand all levels of the tree
    • getAutoExpandLevel

      public int getAutoExpandLevel()
      Returns the auto-expand level.
      Returns:
      non-negative level, or ALL_LEVELS if all levels of the tree are expanded automatically
      See Also:
    • getExpandedState

      public boolean getExpandedState(ITimeGraphEntry entry)
      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

      public void setExpandedState(ITimeGraphEntry entry, boolean expanded)
      Set the expanded state of an entry
      Parameters:
      entry - The entry to expand/collapse
      expanded - True for expanded, false for collapsed
    • setExpandedState

      public void setExpandedState(Iterable<ITimeGraphEntry> entries, boolean expanded)
      Set the expanded state of a given list of entries
      Parameters:
      entries - The list of entries
      expanded - 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

      public void selectAndReveal(@NonNull ITimeGraphEntry entry)
      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

      public ITimeGraphEntry[] 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

      public @NonNull Set<@NonNull ITimeGraphEntry> getAllCollapsedElements()
      Get the collapsed (visible or not) time graph entries.
      Returns:
      The array of collapsed time graph entries
      Since:
      3.1
    • addTreeListener

      public void addTreeListener(ITimeGraphTreeListener listener)
      Add a tree listener
      Parameters:
      listener - The listener to add
    • removeTreeListener

      public void removeTreeListener(ITimeGraphTreeListener listener)
      Remove a tree listener
      Parameters:
      listener - The listener to remove
    • addViewerFilterListener

      public void addViewerFilterListener(ITimeGraphViewerFilterListener listener)
      Add a viewer filter listener
      Parameters:
      listener - The listener to add
      Since:
      3.2
    • removeViewerFilterListener

      public void removeViewerFilterListener(ITimeGraphViewerFilterListener listener)
      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

      public ShowFilterDialogAction 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 - a MenuDetectListener
      See Also:
    • removeTimeGraphEntryMenuListener

      public void removeTimeGraphEntryMenuListener(org.eclipse.swt.events.MenuDetectListener listener)
      Parameters:
      listener - a MenuDetectListener
      See Also:
    • addTimeEventMenuListener

      public void addTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener)
      Parameters:
      listener - a MenuDetectListener
      See Also:
    • removeTimeEventMenuListener

      public void removeTimeEventMenuListener(org.eclipse.swt.events.MenuDetectListener listener)
      Parameters:
      listener - a MenuDetectListener
      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

      public TmfTimeViewAlignmentInfo 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 offset
      width - 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