Class TmfEventsTable
java.lang.Object
org.eclipse.tracecompass.tmf.core.component.TmfComponent
org.eclipse.tracecompass.tmf.ui.viewers.events.TmfEventsTable
- All Implemented Interfaces:
EventListener,org.eclipse.jface.util.IPropertyChangeListener,org.eclipse.jface.viewers.ISelectionProvider,ITmfComponent,IColorSettingsListener,org.eclipse.ui.ide.IGotoMarker
public class TmfEventsTable
extends TmfComponent
implements org.eclipse.ui.ide.IGotoMarker, IColorSettingsListener, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.jface.util.IPropertyChangeListener
The generic TMF Events table
This is a view that will list events that are read from a trace.
- Author:
- Francois Chouinard, Patrick Tasse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe events table search/filter statestatic interfaceThe events table search/filter/data keys -
Constructor Summary
ConstructorsConstructorDescriptionTmfEventsTable(org.eclipse.swt.widgets.Composite parent, int cacheSize) Basic constructor, using the default set of columnsTmfEventsTable(org.eclipse.swt.widgets.Composite parent, int cacheSize, @NonNull Iterable<ITmfEventAspect<?>> aspects) Standard constructor, where we define which columns to use. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBookmark(org.eclipse.core.resources.IFile bookmarksFile) Add a bookmark to this event table.voidaddBookmark(org.eclipse.core.resources.IMarker... bookmarks) Add one or more bookmarks to this event table.voidaddSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) voidcacheUpdated(boolean completed) Notify that the event cache has been updatedvoidcolorSettingsChanged(ColorSetting[] colorSettings) Notify the listener that the color settings have changed.voiddispose()Dispose of the componentvoideventFilterApplied(org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal signal) Receive a signal to apply a filter.int[]Returns an array of zero-relative integers that map the creation order of the receiver's columns to the order in which they are currently being displayed.boolean[]Get whether the columns are resizableint[]Get column widthsString[]getItemStrings(ITmfEvent event) Get the contents of the row in the events table corresponding to an event.org.eclipse.jface.viewers.ISelectiongetTable()Get the virtual table contained in this event table.voidgotoMarker(org.eclipse.core.resources.IMarker marker) voidpropertyChange(org.eclipse.jface.util.PropertyChangeEvent event) voidrefresh()Refresh the tablevoidrefreshBookmarks(org.eclipse.core.resources.IFile bookmarksFile) Refresh the bookmarks assigned to this trace, from the contents of a bookmark file.voidregisterContextMenus(org.eclipse.ui.IWorkbenchPartSite site) Registers context menus with a site for extension.voidremoveBookmark(org.eclipse.core.resources.IMarker... bookmarks) Remove one or more bookmarks from this event table.voidremoveSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) voidHandler for the selection range signal.voidsetColumnOrder(int[] order) Sets the order that the columns in the receiver should be displayed in to the given argument which is described in terms of the zero-relative ordering of when the columns were added.voidsetColumnWidth(int[] width, boolean[] resizable) Sets the column width and resizabilityvoidsetFocus()Notify this table that is got the UI focus.voidsetLayoutData(Object layoutData) Assign a layout data object to this view.voidsetSelection(org.eclipse.jface.viewers.ISelection selection) voidsetStatusLineManager(org.eclipse.jface.action.IStatusLineManager statusLineManager) Assign the status line managervoidAssign a new trace to this event table.voidtraceUpdated(TmfTraceUpdatedSignal signal) Handler for the trace updated signalMethods inherited from class org.eclipse.tracecompass.tmf.core.component.TmfComponent
broadcast, broadcastAsync, getName, init
-
Constructor Details
-
TmfEventsTable
public TmfEventsTable(org.eclipse.swt.widgets.Composite parent, int cacheSize) Basic constructor, using the default set of columns- Parameters:
parent- The parent composite UI objectcacheSize- The size of the event table cache
-
TmfEventsTable
public TmfEventsTable(org.eclipse.swt.widgets.Composite parent, int cacheSize, @NonNull Iterable<ITmfEventAspect<?>> aspects) Standard constructor, where we define which columns to use.- Parameters:
parent- The parent composite UI objectcacheSize- The size of the event table cacheaspects- The event aspects to display in this table. One column per aspect will be created.The iteration order of this collection will correspond to the initial ordering of the columns in the table.
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:ITmfComponentDispose of the component- Specified by:
disposein interfaceITmfComponent- Overrides:
disposein classTmfComponent
-
setLayoutData
Assign a layout data object to this view.- Parameters:
layoutData- The layout data to assign
-
getTable
Get the virtual table contained in this event table.- Returns:
- The TMF virtual table
-
eventFilterApplied
public void eventFilterApplied(org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal signal) Receive a signal to apply a filter. This will apply the filter if the source is not this viewer already- Parameters:
signal- The signal- Since:
- 4.2
-
propertyChange
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) - Specified by:
propertyChangein interfaceorg.eclipse.jface.util.IPropertyChangeListener- Since:
- 1.0
-
getItemStrings
Get the contents of the row in the events table corresponding to an event. The order of the elements corresponds to the current order of the columns.- Parameters:
event- The event printed in this row- Returns:
- The event row entries
-
getColumnOrder
public int[] getColumnOrder()Returns an array of zero-relative integers that map the creation order of the receiver's columns to the order in which they are currently being displayed.Specifically, the indices of the returned array represent the current visual order of the columns, and the contents of the array represent the creation order of the columns.
- Returns:
- the current visual order of the receiver's columns
- Since:
- 1.0
-
getColumnWidth
public int[] getColumnWidth()Get column widths- Returns:
- the current visual widths of the receiver's columns
- Since:
- 2.1
-
getColumnResizable
public boolean[] getColumnResizable()Get whether the columns are resizable- Returns:
- an array stating if each column is resizable
- Since:
- 2.1
-
setColumnOrder
public void setColumnOrder(int[] order) Sets the order that the columns in the receiver should be displayed in to the given argument which is described in terms of the zero-relative ordering of when the columns were added.Specifically, the contents of the array represent the original position of each column at the time its creation.
- Parameters:
order- the new order to display the columns- Since:
- 1.0
-
setColumnWidth
public void setColumnWidth(int[] width, boolean[] resizable) Sets the column width and resizability- Parameters:
width- an array of widthsresizable- an array of bools saying if a column is resizable or not- Since:
- 2.1
-
setFocus
public void setFocus()Notify this table that is got the UI focus. -
registerContextMenus
public void registerContextMenus(org.eclipse.ui.IWorkbenchPartSite site) Registers context menus with a site for extension. This method can be called for part sites so that context menu contributions can be added.- Parameters:
site- the site that the context menus will be registered for- Since:
- 1.2
-
setTrace
Assign a new trace to this event table.- Parameters:
trace- The trace to assign to this event tabledisposeOnClose- true if the trace should be disposed when the table is disposed
-
setStatusLineManager
public void setStatusLineManager(org.eclipse.jface.action.IStatusLineManager statusLineManager) Assign the status line manager- Parameters:
statusLineManager- The status line manager, or null to disable status line messages
-
cacheUpdated
public void cacheUpdated(boolean completed) Notify that the event cache has been updated- Parameters:
completed- Also notify if the populating of the cache is complete, or not.
-
addSelectionChangedListener
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) - Specified by:
addSelectionChangedListenerin interfaceorg.eclipse.jface.viewers.ISelectionProvider
-
getSelection
public org.eclipse.jface.viewers.ISelection getSelection()- Specified by:
getSelectionin interfaceorg.eclipse.jface.viewers.ISelectionProvider
-
removeSelectionChangedListener
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) - Specified by:
removeSelectionChangedListenerin interfaceorg.eclipse.jface.viewers.ISelectionProvider
-
setSelection
public void setSelection(org.eclipse.jface.viewers.ISelection selection) - Specified by:
setSelectionin interfaceorg.eclipse.jface.viewers.ISelectionProvider
-
addBookmark
public void addBookmark(org.eclipse.core.resources.IFile bookmarksFile) Add a bookmark to this event table.- Parameters:
bookmarksFile- The file to use for the bookmarks
-
addBookmark
public void addBookmark(org.eclipse.core.resources.IMarker... bookmarks) Add one or more bookmarks to this event table.- Parameters:
bookmarks- The bookmarks to add- Since:
- 2.0
-
removeBookmark
public void removeBookmark(org.eclipse.core.resources.IMarker... bookmarks) Remove one or more bookmarks from this event table.- Parameters:
bookmarks- The bookmarks to remove- Since:
- 2.0
-
refreshBookmarks
public void refreshBookmarks(org.eclipse.core.resources.IFile bookmarksFile) Refresh the bookmarks assigned to this trace, from the contents of a bookmark file.- Parameters:
bookmarksFile- The bookmark file to use
-
gotoMarker
public void gotoMarker(org.eclipse.core.resources.IMarker marker) - Specified by:
gotoMarkerin interfaceorg.eclipse.ui.ide.IGotoMarker
-
colorSettingsChanged
Description copied from interface:IColorSettingsListenerNotify the listener that the color settings have changed.- Specified by:
colorSettingsChangedin interfaceIColorSettingsListener- Parameters:
colorSettings- The new color settings
-
traceUpdated
Handler for the trace updated signal- Parameters:
signal- The incoming signal
-
selectionRangeUpdated
Handler for the selection range signal.- Parameters:
signal- The incoming signal- Since:
- 1.0
-
refresh
public void refresh()Refresh the table
-