public class SelectionLayerPainter extends GridLineCellLayerPainter
gridLineWidth, renderGridLines| Constructor and Description |
|---|
SelectionLayerPainter()
Create a SelectionLayerPainter that renders gray grid lines and uses the
default clipping behaviour.
|
SelectionLayerPainter(boolean clipLeft,
boolean clipTop)
Create a SelectionLayerPainter that renders gray grid lines and uses the
specified clipping behaviour.
|
SelectionLayerPainter(org.eclipse.swt.graphics.Color gridColor)
Create a SelectionLayerPainter that renders grid lines in the specified
color and uses the default clipping behaviour.
|
SelectionLayerPainter(org.eclipse.swt.graphics.Color gridColor,
boolean clipLeft,
boolean clipTop)
Create a SelectionLayerPainter that renders grid lines in the specified
color and uses the specified clipping behaviour.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyBorderStyle(org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Deprecated.
|
protected org.eclipse.swt.graphics.Rectangle |
fixBoundsInGridLines(org.eclipse.swt.graphics.Rectangle cellBounds,
int xOffset,
int yOffset)
Returns a rectangle that will cover the left and top grid lines, if they
are present.
|
protected BorderStyle |
getBorderStyle(IConfigRegistry configRegistry)
Get the border style that should be used to render the border for cells
that are currently selected.
|
protected boolean |
isInCurrentLayer(int ix,
int iy,
int xOffset,
int yOffset,
org.eclipse.swt.graphics.Rectangle cellBounds,
BorderPainter.BorderCell[][] borderCells)
Tries to detect if the cell is part of the current layer.
|
void |
paintLayer(ILayer natLayer,
org.eclipse.swt.graphics.GC gc,
int xOffset,
int yOffset,
org.eclipse.swt.graphics.Rectangle pixelRectangle,
IConfigRegistry configRegistry) |
adjustCellBounds, drawGridLines, drawGridLines, getGridColorgetPositionRectangleFromPixelRectangle, getStartXOfColumnPosition, getStartYOfRowPosition, isClipLeft, isClipTop, paintCellpublic SelectionLayerPainter(org.eclipse.swt.graphics.Color gridColor)
gridColor - The color that should be used to render the grid lines.public SelectionLayerPainter()
public SelectionLayerPainter(org.eclipse.swt.graphics.Color gridColor,
boolean clipLeft,
boolean clipTop)
gridColor - The color that should be used to render the grid lines.clipLeft - Configure the rendering behaviour when cells overlap. If set
to true the left cell will be clipped, if set to
false the right cell will be clipped. The default
value is false.clipTop - Configure the rendering behaviour when cells overlap. If set
to true the top cell will be clipped, if set to
false the bottom cell will be clipped. The
default value is false.public SelectionLayerPainter(boolean clipLeft,
boolean clipTop)
clipLeft - Configure the rendering behaviour when cells overlap. If set
to true the left cell will be clipped, if set to
false the right cell will be clipped. The default
value is false.clipTop - Configure the rendering behaviour when cells overlap. If set
to true the top cell will be clipped, if set to
false the bottom cell will be clipped. The
default value is false.public void paintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle pixelRectangle, IConfigRegistry configRegistry)
paintLayer in interface ILayerPainterpaintLayer in class GridLineCellLayerPaintergc - GC used for paintingxOffset - of the layer from the origin of the tableyOffset - of the layer from the origin of the tablepixelRectangle - area the layer can paint inconfigRegistry - in use by NatTable. Useful for looking up associated painters.protected org.eclipse.swt.graphics.Rectangle fixBoundsInGridLines(org.eclipse.swt.graphics.Rectangle cellBounds,
int xOffset,
int yOffset)
cellBounds - the rectangle that needs to be consideredxOffset - the starting x coordinate of the area we can draw on. The fix
will not be applied if the cellBounds are placed
on this limit.yOffset - the starting y coordinate of the area we can draw on. The fix
will not be applied if the cellBounds are placed
on this limit.protected boolean isInCurrentLayer(int ix,
int iy,
int xOffset,
int yOffset,
org.eclipse.swt.graphics.Rectangle cellBounds,
BorderPainter.BorderCell[][] borderCells)
@Deprecated protected void applyBorderStyle(org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
getBorderStyle(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry) instead.protected BorderStyle getBorderStyle(IConfigRegistry configRegistry)
IConfigRegistry for a
registered IStyle for the
SelectionConfigAttributes.SELECTION_GRID_LINE_STYLE label or the
SelectionStyleLabels.SELECTION_ANCHOR_GRID_LINE_STYLE label. If
none is registered, a default line style will be returned.configRegistry - The IConfigRegistry to retrieve the style information
from.Copyright © 2017. All rights reserved.