public class NatGridLayerPainter extends NatLayerPainter
CellConfigAttributes.GRID_LINE_COLOR, where the ConfigRegistry entry
will win over direct configuration.
If there should be several fake rows rendered, you need to set the default row height that should be used for rendering the fake row lines. Otherwise this will be skipped and only the column lines will be rendered to the bottom.
| Constructor and Description |
|---|
NatGridLayerPainter(NatTable natTable) |
NatGridLayerPainter(NatTable natTable,
org.eclipse.swt.graphics.Color gridColor) |
NatGridLayerPainter(NatTable natTable,
org.eclipse.swt.graphics.Color gridColor,
int defaultRowHeight) |
NatGridLayerPainter(NatTable natTable,
int defaultRowHeight) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultRowHeight() |
protected void |
paintBackground(ILayer natLayer,
org.eclipse.swt.graphics.GC gc,
int xOffset,
int yOffset,
org.eclipse.swt.graphics.Rectangle rectangle,
IConfigRegistry configRegistry) |
void |
setDefaultRowHeight(int defaultRowHeight) |
adjustCellBounds, paintLayer, paintOverlayspublic NatGridLayerPainter(NatTable natTable)
natTable - The NatTable instance for which the NatGridLayerPainter should
render the background.public NatGridLayerPainter(NatTable natTable, org.eclipse.swt.graphics.Color gridColor)
natTable - The NatTable instance for which the NatGridLayerPainter should
render the background.gridColor - The Color that should be used to render the grid lines. Note
that an entry for CellConfigAttributes.GRID_LINE_COLOR
will override this value at runtime.public NatGridLayerPainter(NatTable natTable, int defaultRowHeight)
natTable - The NatTable instance for which the NatGridLayerPainter should
render the background.defaultRowHeight - The row height that should be used to render fake rows to the
bottom. Setting a value of 0 will avoid rendering fake row
lines.public NatGridLayerPainter(NatTable natTable, org.eclipse.swt.graphics.Color gridColor, int defaultRowHeight)
natTable - The NatTable instance for which the NatGridLayerPainter should
render the background.gridColor - The Color that should be used to render the grid lines. Note
that an entry for CellConfigAttributes.GRID_LINE_COLOR
will override this value at runtime.defaultRowHeight - The row height that should be used to render fake rows to the
bottom. Setting a value of 0 will avoid rendering fake row
lines.protected void paintBackground(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry)
paintBackground in class NatLayerPainterpublic int getDefaultRowHeight()
public void setDefaultRowHeight(int defaultRowHeight)
defaultRowHeight - The value that should be used to render fake rows. The value
needs to be given in pixels, as the scaling calculation is
done in here.Copyright © 2017. All rights reserved.