Class CompositeLayer.CompositeLayerPainter
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.CompositeLayerPainter
- All Implemented Interfaces:
ILayerPainter
- Direct Known Subclasses:
CompositeFreezeLayerPainter
- Enclosing class:
CompositeLayer
The
ILayerPainter that is used to render compositions.- Since:
- 1.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.graphics.RectangleadjustCellBounds(int columnPosition, int rowPosition, org.eclipse.swt.graphics.Rectangle cellBounds) This method is used to adjust the cell bounds when painting the layer.voidpaintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configuration) protected voidProcess the information stored in aILayerPainterof a composite region.
-
Constructor Details
-
CompositeLayerPainter
public CompositeLayerPainter()
-
-
Method Details
-
paintLayer
public void paintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configuration) - Specified by:
paintLayerin interfaceILayerPainter- 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-IConfigRegistryin use by NatTable. Useful for looking up associated painters.
-
processLayerPainterInformation
Process the information stored in aILayerPainterof a composite region. Needed to avoid that the information is lost if the same painter is used in all regions, e.g. the FillHandleLayerPainter.- Parameters:
painter- TheILayerPainterof a composite region.- Since:
- 2.5
-
adjustCellBounds
public org.eclipse.swt.graphics.Rectangle adjustCellBounds(int columnPosition, int rowPosition, org.eclipse.swt.graphics.Rectangle cellBounds) Description copied from interface:ILayerPainterThis 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.- Specified by:
adjustCellBoundsin interfaceILayerPainter- Parameters:
columnPosition- The column position.rowPosition- The row position.cellBounds- The actual cell bounds.- Returns:
- The adjusted cell bounds.
-