Class TmfTimeViewer

All Implemented Interfaces:
ITmfComponent, ITmfTimeProvider, ITmfViewer, ITmfPinnable
Direct Known Subclasses:
AbstractTmfTreeViewer, TmfXYChartViewer

public abstract class TmfTimeViewer extends TmfViewer implements ITmfTimeProvider, ITmfPinnable
Abstract class that extends TmfViewer that adds methods to synchronize with a trace's time information. This class will be extended by viewers who require time information to update their content.
 It provides three times of data:
   - start and end time of the trace (available)
   - start, end and duration of the current time window, ie the visible time range
   - start and end of the time range selected
 
Author:
Bernd Hufmann, Geneviève Bastien
  • Constructor Details

    • TmfTimeViewer

      public TmfTimeViewer()
      Default constructor.
    • TmfTimeViewer

      public TmfTimeViewer(org.eclipse.swt.widgets.Composite parent)
      Constructor that initializes the parent of the viewer
      Parameters:
      parent - The parent composite that holds this viewer
    • TmfTimeViewer

      public TmfTimeViewer(org.eclipse.swt.widgets.Composite parent, String name)
      Constructor that initializes the parent of the viewer and that sets the name of the viewer
      Parameters:
      parent - The parent composite that holds this viewer
      name - The name of the viewer
  • Method Details

    • getTrace

      public ITmfTrace getTrace()
      Gets the trace that is displayed by this viewer.
      Specified by:
      getTrace in interface ITmfPinnable
      Returns:
      the trace
      Since:
      3.3
    • getStartTime

      public long getStartTime()
      Description copied from interface: ITmfTimeProvider
      Gets the start time of trace
      Specified by:
      getStartTime in interface ITmfTimeProvider
      Returns:
      start time of trace
    • getEndTime

      public long getEndTime()
      Description copied from interface: ITmfTimeProvider
      Gets the end time of trace
      Specified by:
      getEndTime in interface ITmfTimeProvider
      Returns:
      End time of trace
    • getWindowStartTime

      public long getWindowStartTime()
      Description copied from interface: ITmfTimeProvider
      Gets the start time of current time range displayed
      Specified by:
      getWindowStartTime in interface ITmfTimeProvider
      Returns:
      start time of current time range
    • getWindowEndTime

      public long getWindowEndTime()
      Description copied from interface: ITmfTimeProvider
      Gets the end time of current time range displayed
      Specified by:
      getWindowEndTime in interface ITmfTimeProvider
      Returns:
      End time of current time range
    • getWindowDuration

      public long getWindowDuration()
      Description copied from interface: ITmfTimeProvider
      Gets the duration of the current time range displayed
      Specified by:
      getWindowDuration in interface ITmfTimeProvider
      Returns:
      duration of current time range
    • getSelectionBeginTime

      public long getSelectionBeginTime()
      Description copied from interface: ITmfTimeProvider
      Gets the begin time of the selected range
      Specified by:
      getSelectionBeginTime in interface ITmfTimeProvider
      Returns:
      the begin time of the selected range
    • getSelectionEndTime

      public long getSelectionEndTime()
      Description copied from interface: ITmfTimeProvider
      Gets the end time of the selected range
      Specified by:
      getSelectionEndTime in interface ITmfTimeProvider
      Returns:
      end time of the selected range
    • updateSelectionRange

      public void updateSelectionRange(long currentBeginTime, long currentEndTime)
      Description copied from interface: ITmfTimeProvider
      Method to notify about a change of the current selected time.
      Specified by:
      updateSelectionRange in interface ITmfTimeProvider
      Parameters:
      currentBeginTime - The current selection begin time
      currentEndTime - The current selection end time
    • updateWindow

      public void updateWindow(long windowStartTime, long windowEndTime)
      Description copied from interface: ITmfTimeProvider
      Updates the current time range window.
      Specified by:
      updateWindow in interface ITmfTimeProvider
      Parameters:
      windowStartTime - The window start time
      windowEndTime - The window end time.
    • loadTrace

      public void loadTrace(ITmfTrace trace)
      A Method to load a trace into the viewer.
      Parameters:
      trace - A trace to apply in the viewer
    • reset

      public void reset()
      Resets the content of the viewer
    • setPinned

      public void setPinned(ITmfTrace trace)
      Description copied from interface: ITmfPinnable
      Set the pin state.
      Specified by:
      setPinned in interface ITmfPinnable
      Parameters:
      trace - The trace that the view should be pinned to, or null to unpin
    • traceOpened

      public void traceOpened(TmfTraceOpenedSignal signal)
      Signal handler for handling of the trace opened signal.
      Parameters:
      signal - The trace opened signal TmfTraceOpenedSignal
    • traceSelected

      public void traceSelected(TmfTraceSelectedSignal signal)
      Signal handler for handling of the trace selected signal.
      Parameters:
      signal - The trace selected signal TmfTraceSelectedSignal
    • traceClosed

      public void traceClosed(@Nullable TmfTraceClosedSignal signal)
      Signal handler for handling of the trace closed signal.
      Parameters:
      signal - The trace closed signal TmfTraceClosedSignal
    • selectionRangeUpdated

      public void selectionRangeUpdated(@Nullable TmfSelectionRangeUpdatedSignal signal)
      Signal handler for handling of the selected range signal.
      Parameters:
      signal - The TmfSelectionRangeUpdatedSignal
      Since:
      1.0
    • windowRangeUpdated

      public void windowRangeUpdated(@Nullable TmfWindowRangeUpdatedSignal signal)
      Signal handler for handling of the window range signal.
      Parameters:
      signal - The TmfWindowRangeUpdatedSignal
      Since:
      1.0
    • traceRangeUpdated

      public void traceRangeUpdated(@Nullable TmfTraceRangeUpdatedSignal signal)
      Signal handler for handling of the trace range updated signal.
      Parameters:
      signal - The trace range signal TmfTraceRangeUpdatedSignal
    • traceUpdated

      public void traceUpdated(@Nullable TmfTraceUpdatedSignal signal)
      Signal handler for handling of the trace updated signal.
      Parameters:
      signal - The trace updated signal TmfTraceUpdatedSignal