Class AbstractTimeGraphView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.tracecompass.tmf.ui.views.TmfView
org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView
- All Implemented Interfaces:
EventListener,org.eclipse.core.resources.IResourceChangeListener,org.eclipse.core.runtime.IAdaptable,org.eclipse.core.runtime.IExecutableExtension,ITmfComponent,ITmfAllowMultiple,ITmfFilterableControl,ITmfPinnable,ITmfTimeAligned,org.eclipse.ui.IPersistable,org.eclipse.ui.IViewPart,org.eclipse.ui.IWorkbenchPart,org.eclipse.ui.IWorkbenchPart2,org.eclipse.ui.IWorkbenchPart3,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
AbstractStateSystemTimeGraphView,BaseDataProviderTimeGraphView
public abstract class AbstractTimeGraphView
extends TmfView
implements ITmfTimeAligned, ITmfAllowMultiple, ITmfPinnable, org.eclipse.core.resources.IResourceChangeListener, ITmfFilterableControl
An abstract view all time graph views can inherit
This view contains a time graph viewer.
-
Field Summary
Fields inherited from class org.eclipse.tracecompass.tmf.ui.views.TmfView
VIEW_ID_SEPARATORFields inherited from interface org.eclipse.core.resources.IResourceChangeListener
PROPERTY_EVENT_MASKFields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a time graph view that contains a time graph viewer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPaintListener(org.eclipse.swt.events.PaintListener listener) Add a paint listener to the viewvoidcreatePartControl(org.eclipse.swt.widgets.Composite parent) voiddispose()Disposes this view and de-registers itself from the signal managervoidfilterUpdated(String regex, Set<@NonNull String> filterRegexes) The filters were updated by the user.<T> TgetAdapter(Class<T> adapter) intgetAvailableWidth(int requestedOffset) Get the available width for the specified time-axis offset.org.eclipse.jface.action.ActionGet the action to execute when the users asks for a filterGetter for the time graph viewerGet the time alignment information.getTrace()Gets the trace displayed in the view.booleanisDirty()Returns whether or not the time graph view is dirty.voidA marker event source has been updatedvoidperformAlign(int offset, int width) Perform the alignment by moving the time-axis to the specified offset and the resizing it to the specified width.voidregexFilterApplied(org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal signal) Set or remove the global regex filter valuevoidresourceChanged(org.eclipse.core.resources.IResourceChangeEvent event) voidCancel and restart the zoom thread.voidSignal indicating a data model element was selected somewherevoidHandler for the selection range signal.voidsetFocus()voidsetLegendProvider(ITimeGraphLegendProvider legendProvider) Sets the legend providervoidSet the pin state.voidtraceClosed(TmfTraceClosedSignal signal) Trace is closed: clear the data structures and the viewvoidtraceOpened(TmfTraceOpenedSignal signal) Handler for the trace opened signal.voidtraceSelected(TmfTraceSelectedSignal signal) Handler for the trace selected signalvoidtraceUpdated(TmfTraceUpdatedSignal signal) Trace is updated: update the view rangevoidvoidHandler for the window range signal.Methods inherited from class org.eclipse.tracecompass.tmf.ui.views.TmfView
broadcast, broadcastAsync, getName, getParentComposite, isPinnedMethods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationDataMethods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Constructor Details
-
AbstractTimeGraphView
Constructs a time graph view that contains a time graph viewer. By default, the view uses a single default column in the name space that shows the time graph entry name. To use multiple columns and/or customized label texts, the subclass constructor must callsetTreeColumns(String[])and/orsetTreeLabelProvider(TreeLabelProvider).- Parameters:
id- The id of the viewpres- The presentation provider
-
-
Method Details
-
getTimeGraphViewer
Getter for the time graph viewer- Returns:
- The time graph viewer
- Since:
- 4.1
-
getTrace
Description copied from interface:ITmfPinnableGets the trace displayed in the view.- Specified by:
getTracein interfaceITmfPinnable- Returns:
- the trace
- Since:
- 3.2
-
setLegendProvider
Sets the legend provider- Parameters:
legendProvider- the legend provider- Since:
- 3.3
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent) - Specified by:
createPartControlin interfaceorg.eclipse.ui.IWorkbenchPart- Overrides:
createPartControlin classTmfView
-
setFocus
public void setFocus()- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
setFocusin classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()Description copied from class:TmfViewDisposes this view and de-registers itself from the signal manager- Specified by:
disposein interfaceITmfComponent- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchPart- Overrides:
disposein classTmfView
-
resourceChanged
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event) - Specified by:
resourceChangedin interfaceorg.eclipse.core.resources.IResourceChangeListener- Since:
- 2.0
-
traceOpened
Handler for the trace opened signal.- Parameters:
signal- The incoming signal
-
traceSelected
Handler for the trace selected signal- Parameters:
signal- The incoming signal
-
traceClosed
Trace is closed: clear the data structures and the view- Parameters:
signal- the signal received
-
traceUpdated
Trace is updated: update the view range- Parameters:
signal- the signal received- Since:
- 3.1
-
selectionRangeUpdated
Handler for the selection range signal.- Parameters:
signal- The signal that's received- Since:
- 1.0
-
windowRangeUpdated
Handler for the window range signal.- Parameters:
signal- The signal that's received- Since:
- 1.0
-
updateTimeFormat
- Parameters:
signal- the format of the timestamps was updated.
-
markerEventSourceUpdated
A marker event source has been updated- Parameters:
signal- the signal- Since:
- 2.1
-
getTimeViewAlignmentInfo
Description copied from interface:ITmfTimeAlignedGet the time alignment information. The view provides information about where the time-axis is in addition to information necessary to decide whether or not views should be time-aligned with each other (Shell, location).- Specified by:
getTimeViewAlignmentInfoin interfaceITmfTimeAligned- Returns:
- the time alignment information
- Since:
- 1.0
-
getAvailableWidth
public int getAvailableWidth(int requestedOffset) Description copied from interface:ITmfTimeAlignedGet the available width for the specified time-axis offset. The implementation should return the width that would be available if the time-axis was to be at that offset. When about to perform a re-alignment, the alignment algorithm will choose the narrowest width to accommodate all views.- Specified by:
getAvailableWidthin interfaceITmfTimeAligned- Parameters:
requestedOffset- the requested time-axis offset. Greater or equal to zero.- Returns:
- the available width. Should be greater or equal to zero.
- Since:
- 1.0
-
performAlign
public void performAlign(int offset, int width) Description copied from interface:ITmfTimeAlignedPerform the alignment by moving the time-axis to the specified offset and the resizing it to the specified width. Implementations should handle cases were the requested width is greater than the width of the view. For example, Integer.MAX_VALUE can be requested in order to obtain the largest width possible.- Specified by:
performAlignin interfaceITmfTimeAligned- Parameters:
offset- the time-axis offset. Greater or equal to zero.width- the time-axis width. Greater or equal to zero. Can be Integer.MAX_VALUE.- Since:
- 1.0
-
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
-
isDirty
public boolean isDirty()Returns whether or not the time graph view is dirty. The time graph view is considered dirty if it has yet to completely update its model. This method is meant to be used by tests in order to know when it is safe to proceed. Note: If a trace is smaller than the initial window range (seeITmfTrace.getInitialRangeOffset()) this method will return true forever.- Returns:
- true if the time graph view has yet to completely update its model, false otherwise
- Since:
- 2.0
-
restartZoomThread
public void restartZoomThread()Cancel and restart the zoom thread.- Since:
- 4.0
-
addPaintListener
public void addPaintListener(org.eclipse.swt.events.PaintListener listener) Add a paint listener to the view- Parameters:
listener- The paint listener- Since:
- 4.0
-
getFilterAction
public org.eclipse.jface.action.Action getFilterAction()Description copied from interface:ITmfFilterableControlGet the action to execute when the users asks for a filter- Specified by:
getFilterActionin interfaceITmfFilterableControl- Returns:
- The action to execute
-
filterUpdated
Description copied from interface:ITmfFilterableControlThe filters were updated by the user. This is where the view can act on the filters entered by the user.- Specified by:
filterUpdatedin interfaceITmfFilterableControl- Parameters:
regex- The filter being entered in the textboxfilterRegexes- The saved filters, after the user has pressedenteron the filter box.
-
regexFilterApplied
public void regexFilterApplied(org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal signal) Set or remove the global regex filter value- Parameters:
signal- the signal carrying the regex value- Since:
- 4.2
-
selectionChanged
Signal indicating a data model element was selected somewhere- Parameters:
signal- the signal carrying the select data model metadata- Since:
- 4.2
-
getAdapter
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- Overrides:
getAdapterin classorg.eclipse.ui.part.WorkbenchPart
-