java.lang.Object
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByHeaderPainter
All Implemented Interfaces:
ICellPainter

public class GroupByHeaderPainter extends AbstractCellPainter
The painter that is used to render the groupBy state.
  • Constructor Details

    • GroupByHeaderPainter

      public GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider)
      Parameters:
      groupByModel - The GroupByModel needed to retrieve the groupBy state.
      columnHeaderDataProvider - The IDataProvider needed to retrieve the column label.
    • GroupByHeaderPainter

      public GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer)
      Parameters:
      groupByModel - The GroupByModel needed to retrieve the groupBy state.
      columnHeaderDataProvider - The IDataProvider needed to retrieve the column label.
      columnHeaderLayer - The ColumnHeaderLayer needed to retrieve the column label in case a user renamed a column.
      Since:
      1.5
  • Method Details

    • paintCell

      public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
    • getPreferredWidth

      public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
      Description copied from interface: ICellPainter
      Get the preferred width of the cell when rendered by this painter. Used for auto-resize.
      Parameters:
      cell - The cell for which the preferred width is requested.
      gc - The GC that is used for rendering.
      configRegistry - The IConfigRegistry that contains the configuration used for rendering.
      Returns:
      The preferred width of the given cell when rendered by this painter.
    • getPreferredHeight

      public int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
      Description copied from interface: ICellPainter
      Get the preferred height of the cell when rendered by this painter. Used for auto-resize.
      Parameters:
      cell - The cell for which the preferred height is requested.
      gc - The GC that is used for rendering.
      configRegistry - The IConfigRegistry that contains the configuration used for rendering.
      Returns:
      The preferred height of the given cell when rendered by this painter.
    • getPreferredHeight

      public int getPreferredHeight()
    • getGroupByColumnIndexAtXY

      public int getGroupByColumnIndexAtXY(int x, int y)