Class BackgroundPainter
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
-
- org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
-
- org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
-
- All Implemented Interfaces:
ICellPainter
- Direct Known Subclasses:
AbstractTextPainter
,ImagePainter
,TableCellPainter
,XPBackgroundDecorator
public class BackgroundPainter extends CellPainterWrapper
Paints the background of the cell using the color from the cell style. If no background color is registered in theConfigRegistry
the painting is skipped.Example: The
TextPainter
inherits this and uses the paint method in this class to paint the background of the cell. Can be used as a cell painter or a decorator.
-
-
Constructor Summary
Constructors Constructor Description BackgroundPainter()
BackgroundPainter(ICellPainter painter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.graphics.Color
getBackgroundColour(ILayerCell cell, IConfigRegistry configRegistry)
void
paintCell(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.CellPainterWrapper
getCellPainterAt, getPreferredHeight, getPreferredWidth, getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
-
-
-
-
Constructor Detail
-
BackgroundPainter
public BackgroundPainter()
-
BackgroundPainter
public BackgroundPainter(ICellPainter painter)
-
-
Method Detail
-
paintCell
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
- Specified by:
paintCell
in interfaceICellPainter
- Overrides:
paintCell
in classCellPainterWrapper
-
getBackgroundColour
protected org.eclipse.swt.graphics.Color getBackgroundColour(ILayerCell cell, IConfigRegistry configRegistry)
-
-