Interface ILayerPainter
-
- All Known Implementing Classes:
CellLayerPainter
,ColumnGroupHeaderGridLineCellLayerPainter
,CompositeFreezeLayerPainter
,CompositeLayer.CompositeLayerPainter
,CopySelectionLayerPainter
,FillHandleLayerPainter
,GridLineCellLayerPainter
,NatGridLayerPainter
,NatLayerPainter
,RowGroupHeaderGridLineCellLayerPainter
,SelectionLayerPainter
public interface ILayerPainter
Classes implementing this interface are responsible for painting to the relevantDevice
. Every layer has a layer painter. A layer can contribute to painting by providing its own painter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.Rectangle
adjustCellBounds(int columnPosition, int rowPosition, org.eclipse.swt.graphics.Rectangle cellBounds)
This method is used to adjust the cell bounds when painting the layer.void
paintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configuration)
-
-
-
Method Detail
-
paintLayer
void paintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configuration)
- Parameters:
natLayer
- The layer to paint.gc
- GC used for paintingxOffset
- x offset of the layer from the origin of the tableyOffset
- y offset of the layer from the origin of the tablerectangle
- area the layer can paint inconfiguration
-IConfigRegistry
in use by NatTable. Useful for looking up associated painters.
-
adjustCellBounds
org.eclipse.swt.graphics.Rectangle adjustCellBounds(int columnPosition, int rowPosition, org.eclipse.swt.graphics.Rectangle cellBounds)
This method is used to adjust the cell bounds when painting the layer. This is most often used to reduce the size of the cell to accommodate grid lines.- Parameters:
columnPosition
- The column position.rowPosition
- The row position.cellBounds
- The actual cell bounds.- Returns:
- The adjusted cell bounds.
-
-