Class XYChartLegendImageProvider

java.lang.Object
org.eclipse.tracecompass.tmf.ui.viewers.xychart.XYChartLegendImageProvider
All Implemented Interfaces:
ILegendImageProvider2

public class XYChartLegendImageProvider extends Object implements ILegendImageProvider2
Provides a legend image from an XY chart viewer. With a name, desired height and width, an image is created.
Since:
6.0
Author:
Yonni Chen
  • Constructor Details

    • XYChartLegendImageProvider

      public XYChartLegendImageProvider(TmfCommonXAxisChartViewer chartViewer)
      Constructor
      Parameters:
      chartViewer - XY Chart with which we create a legend image
  • Method Details

    • getLegendImage

      public org.eclipse.swt.graphics.Image getLegendImage(int imageHeight, int imageWidth, @NonNull Long id)
      Description copied from interface: ILegendImageProvider2
      Returns an image that represents the legend.
      Specified by:
      getLegendImage in interface ILegendImageProvider2
      Parameters:
      imageHeight - Desired image height
      imageWidth - Desired image width
      id - Id associate with a legend image
      Returns:
      A legend image