Class TmfEventTableColumn

java.lang.Object
org.eclipse.tracecompass.tmf.ui.viewers.events.columns.TmfEventTableColumn

@NonNullByDefault public class TmfEventTableColumn extends Object
A column in the TmfEventsTable. In addition to ones provided by default, trace types can extend this class to create additional columns specific to their events. Those additional columns can then be passed to the constructor org.eclipse.tracecompass.tmf.ui.viewers.events.TmfEventsTable#TmfEventsTable(org.eclipse.swt.widgets.Composite, int, java.util.Collection)
Author:
Alexandre Montplaisir
  • Constructor Details

    • TmfEventTableColumn

      public TmfEventTableColumn(ITmfEventAspect<?> aspect)
      Constructor
      Parameters:
      aspect - The ITmfEventAspect to be used to populate this column.
  • Method Details

    • addDuplicate

      public void addDuplicate(ITmfEventAspect<?> duplicate)
      Add another Aspect with the same name
      Parameters:
      duplicate - the aspect with the same name
      Since:
      5.0
    • getHeaderName

      public String getHeaderName()
      Get this column's header name, a.k.a. title
      Returns:
      The column's title
    • getHeaderTooltip

      public @Nullable String getHeaderTooltip()
      Get the tooltip text for the column header
      Returns:
      The header's tooltip
    • getItemString

      public String getItemString(ITmfEvent event)
      Get the string that should be displayed in this column's cell for a given trace event. Basically, this defines "what to print in this column for this event".
      Parameters:
      event - The trace event whose element we want to display
      Returns:
      The string to display in the column for this event
    • getEventAspect

      public ITmfEventAspect<?> getEventAspect()
      Get the event aspect assigned to this column
      Returns:
      The event aspect
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object