org.eclipse.nebula.widgets.nattable.painter.cell
Class BackgroundPainter

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
      extended by org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
          extended by 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 the ConfigRegistry 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
BackgroundPainter()
           
BackgroundPainter(ICellPainter painter)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface ICellPainter
Overrides:
paintCell in class CellPainterWrapper

getBackgroundColour

protected org.eclipse.swt.graphics.Color getBackgroundColour(ILayerCell cell,
                                                             IConfigRegistry configRegistry)


Copyright © 2014. All rights reserved.