Class GroupByHeaderPainter
- 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 Summary
Constructors Constructor Description GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider)
GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getGroupByColumnIndexAtXY(int x, int y)
int
getPreferredHeight()
int
getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
Get the preferred height of the cell when rendered by this painter.int
getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
Get the preferred width of the cell when rendered by this painter.void
paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
getCellPainterAt
-
-
-
-
Constructor Detail
-
GroupByHeaderPainter
public GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider)
- Parameters:
groupByModel
- TheGroupByModel
needed to retrieve the groupBy state.columnHeaderDataProvider
- TheIDataProvider
needed to retrieve the column label.
-
GroupByHeaderPainter
public GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer)
- Parameters:
groupByModel
- TheGroupByModel
needed to retrieve the groupBy state.columnHeaderDataProvider
- TheIDataProvider
needed to retrieve the column label.columnHeaderLayer
- TheColumnHeaderLayer
needed to retrieve the column label in case a user renamed a column.- Since:
- 1.5
-
-
Method Detail
-
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)
-
-