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
The painter that is used to render the groupBy state.
-
Constructor Summary
ConstructorsConstructorDescriptionGroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider) GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) -
Method Summary
Modifier and TypeMethodDescriptionintgetGroupByColumnIndexAtXY(int x, int y) intintgetPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Get the preferred height of the cell when rendered by this painter.intgetPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Get the preferred width of the cell when rendered by this painter.voidpaintCell(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 Details
-
GroupByHeaderPainter
- Parameters:
groupByModel- TheGroupByModelneeded to retrieve the groupBy state.columnHeaderDataProvider- TheIDataProviderneeded to retrieve the column label.
-
GroupByHeaderPainter
public GroupByHeaderPainter(GroupByModel groupByModel, IDataProvider columnHeaderDataProvider, ColumnHeaderLayer columnHeaderLayer) - Parameters:
groupByModel- TheGroupByModelneeded to retrieve the groupBy state.columnHeaderDataProvider- TheIDataProviderneeded to retrieve the column label.columnHeaderLayer- TheColumnHeaderLayerneeded 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:ICellPainterGet 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:ICellPainterGet 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)
-