Interface ITimeGraphPresentationProvider

All Known Implementing Classes:
TimeChartAnalysisProvider, TimeGraphPresentationProvider

public interface ITimeGraphPresentationProvider
Interface for the time graph widget provider
Author:
Patrick Tasse
  • Field Details

    • INVISIBLE

      static final int INVISIBLE
      State table index for an invisible event
      See Also:
    • TRANSPARENT

      static final int TRANSPARENT
      State table index for a transparent event (only borders drawn)
      See Also:
  • Method Details

    • getStateTypeName

      String getStateTypeName()
      Returns the name of state types.
      Returns:
      the name of state types
    • getStateTypeName

      String getStateTypeName(ITimeGraphEntry entry)
      Returns the name of state type depending on the given entry. Note that this overwrites the name which is return by getStateTypeName().
      Parameters:
      entry - the entry
      Returns:
      the name of state type depending on the given entry or null.
    • getStateTable

      StateItem[] getStateTable()
      Returns table of states with state name to state color relationship.
      Returns:
      table of states with color and name
      See Also:
    • getStateTableIndex

      int getStateTableIndex(ITimeEvent event)
      Returns the index in the state table corresponding to this time event. The index should correspond to a state in the state table, otherwise the color SWT.COLOR_BLACK will be used. If the index returned is TRANSPARENT, only the event borders will be drawn. If the index returned is INVISIBLE or another negative, the event will not be drawn.
      Parameters:
      event - the time event
      Returns:
      the corresponding state table index
      See Also:
    • postDrawControl

      void postDrawControl(org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc)
      Called after drawing the control
      Parameters:
      bounds - The drawing rectangle
      gc - The graphics context
    • postDrawEntry

      void postDrawEntry(ITimeGraphEntry entry, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc)
      Called after drawing an entry
      Parameters:
      entry - the entry that was drawn
      bounds - the drawing rectangle
      gc - the graphics context
    • postDrawEvent

      void postDrawEvent(ITimeEvent event, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.GC gc)
      Called after drawing an event
      Parameters:
      event - the event that was drawn
      bounds - the drawing rectangle
      gc - the graphics context
    • getItemHeight

      int getItemHeight(ITimeGraphEntry entry)
      Returns the height of this item. This value is ignored if the time graph has a fixed item height.
      Parameters:
      entry - the entry
      Returns:
      the item height
      See Also:
    • getItemImage

      org.eclipse.swt.graphics.Image getItemImage(ITimeGraphEntry entry)
      Provides the image icon for a given entry.
      Parameters:
      entry - the entry
      Returns:
      the image icon
    • getEventName

      String getEventName(ITimeEvent event)
      Returns the name of this event.
      Parameters:
      event - The event
      Returns:
      The event name
    • getEventHoverToolTipInfo

      Map<String,String> getEventHoverToolTipInfo(ITimeEvent event)
      Returns a map of name and value providing additional information to display in the tool tip for this event.
      Parameters:
      event - the time event
      Returns:
      a map of tool tip information
    • getEventHoverToolTipInfo

      Map<String,String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime)
      Returns a map of name and value providing additional information to display in the tool tip for this event.
      Parameters:
      event - the time event
      hoverTime - the time corresponding to the mouse hover position
      Returns:
      a map of tool tip information
    • getLinkTypeName

      default String getLinkTypeName()
      Get the name of the link type
      Returns:
      The name of the link type
      Since:
      4.0
    • displayTimesInTooltip

      boolean displayTimesInTooltip()
      Check whether time and duration should be displayed in tooltip (after items from getEventHoverToolTipInfo(ITimeEvent)).
      Returns:
      true if times and duration should be displayed on tooltip, false otherwise.
    • getEventStyle

      default Map<String,Object> getEventStyle(ITimeEvent event)
      Get the style map of a given ITimeEvent
      Parameters:
      event - the time event
      Returns:
      the style map, as detailed in StyleProperties
      Since:
      3.0
    • getPreferenceKey

      default String getPreferenceKey()
      Get the id of the state provider
      Returns:
      The preference key, if there are many instances of a class, this method needs to be overridden
      Since:
      4.1
    • getSpecificEventStyle

      default Map<String,Object> getSpecificEventStyle(ITimeEvent event)
      Get the specific style map for a given event.
      Parameters:
      event - the time event
      Returns:
      a style map containing the elements as detailed in StyleProperties to override
      Since:
      3.0
    • refresh

      default void refresh()
      Signal the provider that its color settings have changed
      Since:
      3.2
    • getDrawingHelper

      ITmfTimeGraphDrawingHelper getDrawingHelper()
      Returns the drawing helper for this presentation provider.
      Returns:
      The drawing helper
      Since:
      4.0
    • setDrawingHelper

      void setDrawingHelper(ITmfTimeGraphDrawingHelper helper)
      Sets this presentation provider's drawing helper. This helper be needed to know where to draw items, get its coordinates given a time, etc.
      Parameters:
      helper - The drawing helper
      Since:
      4.0
    • addColorListener

      void addColorListener(ITimeGraphColorListener listener)
      Adds a color settings listener, to be notified when the presentation provider's state colors change.
      Parameters:
      listener - The new listener for color settings changes
      Since:
      4.0
    • removeColorListener

      void removeColorListener(ITimeGraphColorListener listener)
      Removes a color settings listener.
      Parameters:
      listener - The color settings listener to remove
      Since:
      4.0
    • getFilterInput

      default @NonNull Map<String,String> getFilterInput(ITimeEvent event)
      Get input data used for filtering
      Parameters:
      event - The ongoing time event
      Returns:
      The map of input data
      Since:
      4.0