Class TmfTimeViewer
java.lang.Object
org.eclipse.tracecompass.tmf.core.component.TmfComponent
org.eclipse.tracecompass.tmf.ui.viewers.TmfViewer
org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer
- All Implemented Interfaces:
ITmfComponent,ITmfTimeProvider,ITmfViewer,ITmfPinnable
- Direct Known Subclasses:
AbstractTmfTreeViewer,TmfXYChartViewer
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 Summary
ConstructorsConstructorDescriptionDefault constructor.TmfTimeViewer(org.eclipse.swt.widgets.Composite parent) Constructor that initializes the parent of the viewerTmfTimeViewer(org.eclipse.swt.widgets.Composite parent, String name) Constructor that initializes the parent of the viewer and that sets the name of the viewer -
Method Summary
Modifier and TypeMethodDescriptionlongGets the end time of tracelongGets the begin time of the selected rangelongGets the end time of the selected rangelongGets the start time of tracegetTrace()Gets the trace that is displayed by this viewer.longGets the duration of the current time range displayedlongGets the end time of current time range displayedlongGets the start time of current time range displayedvoidA Method to load a trace into the viewer.voidreset()Resets the content of the viewervoidselectionRangeUpdated(@Nullable TmfSelectionRangeUpdatedSignal signal) Signal handler for handling of the selected range signal.voidSet the pin state.voidtraceClosed(@Nullable TmfTraceClosedSignal signal) Signal handler for handling of the trace closed signal.voidtraceOpened(TmfTraceOpenedSignal signal) Signal handler for handling of the trace opened signal.voidtraceRangeUpdated(@Nullable TmfTraceRangeUpdatedSignal signal) Signal handler for handling of the trace range updated signal.voidtraceSelected(TmfTraceSelectedSignal signal) Signal handler for handling of the trace selected signal.voidtraceUpdated(@Nullable TmfTraceUpdatedSignal signal) Signal handler for handling of the trace updated signal.voidupdateSelectionRange(long currentBeginTime, long currentEndTime) Method to notify about a change of the current selected time.voidupdateWindow(long windowStartTime, long windowEndTime) Updates the current time range window.voidwindowRangeUpdated(@Nullable TmfWindowRangeUpdatedSignal signal) Signal handler for handling of the window range signal.Methods inherited from class org.eclipse.tracecompass.tmf.core.component.TmfComponent
broadcast, broadcastAsync, dispose, getName, initMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.tracecompass.tmf.core.component.ITmfComponent
broadcast, broadcastAsync, dispose, getNameMethods inherited from interface org.eclipse.tracecompass.tmf.ui.viewers.ITmfViewer
getControl, refresh
-
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
Constructor that initializes the parent of the viewer and that sets the name of the viewer- Parameters:
parent- The parent composite that holds this viewername- The name of the viewer
-
-
Method Details
-
getTrace
Gets the trace that is displayed by this viewer.- Specified by:
getTracein interfaceITmfPinnable- Returns:
- the trace
- Since:
- 3.3
-
getStartTime
public long getStartTime()Description copied from interface:ITmfTimeProviderGets the start time of trace- Specified by:
getStartTimein interfaceITmfTimeProvider- Returns:
- start time of trace
-
getEndTime
public long getEndTime()Description copied from interface:ITmfTimeProviderGets the end time of trace- Specified by:
getEndTimein interfaceITmfTimeProvider- Returns:
- End time of trace
-
getWindowStartTime
public long getWindowStartTime()Description copied from interface:ITmfTimeProviderGets the start time of current time range displayed- Specified by:
getWindowStartTimein interfaceITmfTimeProvider- Returns:
- start time of current time range
-
getWindowEndTime
public long getWindowEndTime()Description copied from interface:ITmfTimeProviderGets the end time of current time range displayed- Specified by:
getWindowEndTimein interfaceITmfTimeProvider- Returns:
- End time of current time range
-
getWindowDuration
public long getWindowDuration()Description copied from interface:ITmfTimeProviderGets the duration of the current time range displayed- Specified by:
getWindowDurationin interfaceITmfTimeProvider- Returns:
- duration of current time range
-
getSelectionBeginTime
public long getSelectionBeginTime()Description copied from interface:ITmfTimeProviderGets the begin time of the selected range- Specified by:
getSelectionBeginTimein interfaceITmfTimeProvider- Returns:
- the begin time of the selected range
-
getSelectionEndTime
public long getSelectionEndTime()Description copied from interface:ITmfTimeProviderGets the end time of the selected range- Specified by:
getSelectionEndTimein interfaceITmfTimeProvider- Returns:
- end time of the selected range
-
updateSelectionRange
public void updateSelectionRange(long currentBeginTime, long currentEndTime) Description copied from interface:ITmfTimeProviderMethod to notify about a change of the current selected time.- Specified by:
updateSelectionRangein interfaceITmfTimeProvider- Parameters:
currentBeginTime- The current selection begin timecurrentEndTime- The current selection end time
-
updateWindow
public void updateWindow(long windowStartTime, long windowEndTime) Description copied from interface:ITmfTimeProviderUpdates the current time range window.- Specified by:
updateWindowin interfaceITmfTimeProvider- Parameters:
windowStartTime- The window start timewindowEndTime- The window end time.
-
loadTrace
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
Description copied from interface:ITmfPinnableSet the pin state.- Specified by:
setPinnedin interfaceITmfPinnable- Parameters:
trace- The trace that the view should be pinned to, or null to unpin
-
traceOpened
Signal handler for handling of the trace opened signal.- Parameters:
signal- The trace opened signalTmfTraceOpenedSignal
-
traceSelected
Signal handler for handling of the trace selected signal.- Parameters:
signal- The trace selected signalTmfTraceSelectedSignal
-
traceClosed
Signal handler for handling of the trace closed signal.- Parameters:
signal- The trace closed signalTmfTraceClosedSignal
-
selectionRangeUpdated
Signal handler for handling of the selected range signal.- Parameters:
signal- TheTmfSelectionRangeUpdatedSignal- Since:
- 1.0
-
windowRangeUpdated
Signal handler for handling of the window range signal.- Parameters:
signal- TheTmfWindowRangeUpdatedSignal- Since:
- 1.0
-
traceRangeUpdated
Signal handler for handling of the trace range updated signal.- Parameters:
signal- The trace range signalTmfTraceRangeUpdatedSignal
-
traceUpdated
Signal handler for handling of the trace updated signal.- Parameters:
signal- The trace updated signalTmfTraceUpdatedSignal
-