Interface ITimelineStyleProvider

All Known Implementing Classes:
DefaultTimelineStyleProvider

public interface ITimelineStyleProvider
  • Method Summary

    Modifier and Type Method Description
    default void dispose()
    Called when the composite gets disposed.
    org.eclipse.swt.graphics.Color getBackgroundColor()
    Get diagram background color.
    org.eclipse.swt.graphics.Color getColor​(org.eclipse.swt.graphics.RGB rgb)
    Get a color for the given RGB value.
    org.eclipse.swt.graphics.Color getCursorColor()
    Get the color for a non-selected cursor.
    org.eclipse.draw2d.Border getDetailAreaBorder()
    Get the border for the detail area.
    org.eclipse.swt.graphics.Color getGridColor()
    Get the color of the grid.
    int getGridLineStyle()
    Get the line style for the grid.
    org.eclipse.swt.graphics.Color getLaneColor()
    Get the color for the next lane.
    int getLaneHeight()
    Get height for a given lane.
    org.eclipse.draw2d.Border getOverviewAreaBorder()
    Get the border for the overview area.
    org.eclipse.draw2d.geometry.Insets getOverviewInsets()
    Get the insets for the overview area.
    int getOverviewLaneHeight()
    Get height for a given lane in overview.
    int getOverviewSelectionBackgroundAlpha()
    Get the alpha value for the overview selection figure.
    org.eclipse.swt.graphics.Color getOverviewSelectionBackgroundColor()
    Get the background color for the overview selection.
    org.eclipse.draw2d.Border getOverviewSelectionBorder()
    Get the border for the overview selection figure.
    org.eclipse.swt.graphics.Color getSelectedCursorColor()
    Get the color for a selected cursor.
    java.lang.String getTimeLabel​(double timestamp, java.util.concurrent.TimeUnit unit)
    Get a human readable timestamp for a given time.
    org.eclipse.draw2d.Border getTrackBorder​(java.lang.String title)
    Get the border for a track.
    double getZoomFactor()
    Get the multiplier for the zoom factor to be applied on a zoomIn/zoomOut operation.
    void selectEvent​(EventFigure eventFigure)
    Apply styling to select an event figure.
    boolean showGrid()
    Display the grid in the detail area.
    boolean showOverview()
    Display the overview area.
    boolean showTimeAxis()
    Display the time axis below the detail area.
    void unselectEvent​(EventFigure eventFigure)
    Revert styling of an event figure selection.
  • Method Details

    • dispose

      default void dispose()
      Called when the composite gets disposed. Clean up colors and fonts.
    • getBackgroundColor

      org.eclipse.swt.graphics.Color getBackgroundColor()
      Get diagram background color.
      Returns:
      background color
    • getDetailAreaBorder

      org.eclipse.draw2d.Border getDetailAreaBorder()
      Get the border for the detail area.
      Returns:
      detail area border
    • getOverviewAreaBorder

      org.eclipse.draw2d.Border getOverviewAreaBorder()
      Get the border for the overview area.
      Returns:
      overview area border
    • showTimeAxis

      boolean showTimeAxis()
      Display the time axis below the detail area.
      Returns:
      true to display the time axis, false to hide
    • showGrid

      boolean showGrid()
      Display the grid in the detail area.
      Returns:
      true to display the grid, false to hide
    • showOverview

      boolean showOverview()
      Display the overview area.
      Returns:
      true to display the overview area, false to hide
    • getGridColor

      org.eclipse.swt.graphics.Color getGridColor()
      Get the color of the grid.
      Returns:
      grid color
    • getGridLineStyle

      int getGridLineStyle()
      Get the line style for the grid.
      Returns:
      grid line style
    • getOverviewSelectionBorder

      org.eclipse.draw2d.Border getOverviewSelectionBorder()
      Get the border for the overview selection figure.
      Returns:
      overview selection figure border
    • getOverviewSelectionBackgroundColor

      org.eclipse.swt.graphics.Color getOverviewSelectionBackgroundColor()
      Get the background color for the overview selection.
      Returns:
      figure background color
    • getOverviewSelectionBackgroundAlpha

      int getOverviewSelectionBackgroundAlpha()
      Get the alpha value for the overview selection figure.
      Returns:
      alpha value
    • getTrackBorder

      org.eclipse.draw2d.Border getTrackBorder​(java.lang.String title)
      Get the border for a track.
      Parameters:
      title - track title
      Returns:
      track border
    • getCursorColor

      org.eclipse.swt.graphics.Color getCursorColor()
      Get the color for a non-selected cursor.
      Returns:
      cursor color
    • getSelectedCursorColor

      org.eclipse.swt.graphics.Color getSelectedCursorColor()
      Get the color for a selected cursor.
      Returns:
      selected cursor color
    • getLaneColor

      org.eclipse.swt.graphics.Color getLaneColor()
      Get the color for the next lane.
      Returns:
      lane color
    • getLaneHeight

      int getLaneHeight()
      Get height for a given lane.
      Returns:
      height in pixels
    • getOverviewLaneHeight

      int getOverviewLaneHeight()
      Get height for a given lane in overview.
      Returns:
      height in pixels
    • selectEvent

      void selectEvent​(EventFigure eventFigure)
      Apply styling to select an event figure.
      Parameters:
      eventFigure - figure to style
    • unselectEvent

      void unselectEvent​(EventFigure eventFigure)
      Revert styling of an event figure selection.
      Parameters:
      eventFigure - figure to revert style
    • getZoomFactor

      double getZoomFactor()
      Get the multiplier for the zoom factor to be applied on a zoomIn/zoomOut operation.
      Returns:
      zoom factor multiplier
    • getColor

      org.eclipse.swt.graphics.Color getColor​(org.eclipse.swt.graphics.RGB rgb)
      Get a color for the given RGB value. The style provider should take care to buffer colors and to dispose them when the widget gets disposed.
      Parameters:
      rgb - RGB value to get color for
      Returns:
      color
    • getOverviewInsets

      org.eclipse.draw2d.geometry.Insets getOverviewInsets()
      Get the insets for the overview area. These insets will be applied within the border acquired from getOverviewAreaBorder(). The top inset will also be used for lane spacing.
      Returns:
      insets to be used for the overview area
    • getTimeLabel

      java.lang.String getTimeLabel​(double timestamp, java.util.concurrent.TimeUnit unit)
      Get a human readable timestamp for a given time. The provided label will be used for axis labels and cursor popups.
      Parameters:
      timestamp - timestamp in eventTime
      unit - time unit to be used
      Returns:
      time value