org.deidentifier.arx.gui.view.impl.common.datatable

## Class DataTableBackgroundImagePainter

- java.lang.Object
- - org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
  - - org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
    - - org.deidentifier.arx.gui.view.impl.common.datatable.DataTableBackgroundImagePainter

All Implemented Interfaces:
  org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter

    public class DataTableBackgroundImagePainter
    extends org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper

Paints the cell background using an image. Image is repeated to cover the background. Similar to HTML table painting.

Author:
  Fabian Prasser

### Field Summary

Fields
`org.eclipse.swt.graphics.Color` `separatorColor` Color

### Constructor Summary

Constructors
Constructor and Description
`DataTableBackgroundImagePainter(org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter interiorPainter, org.eclipse.swt.graphics.Image bgImage, org.eclipse.swt.graphics.Color separatorColor)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getPreferredHeight(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)`
`int` `getPreferredWidth(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)`
`void` `paintCell(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)`

### Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper

`getCellPainterAt, getWrappedPainter, getWrappedPainterBounds, setWrappedPainter`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### separatorColor

    public final org.eclipse.swt.graphics.Color separatorColor

Color

### Constructor Detail

#### DataTableBackgroundImagePainter

    public DataTableBackgroundImagePainter(org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter interiorPainter,
                                           org.eclipse.swt.graphics.Image bgImage,
                                           org.eclipse.swt.graphics.Color separatorColor)

Parameters:
  `interiorPainter` - used for painting the cell contents
  `bgImage` - to be used for painting the background
  `separatorColor` - to be used for drawing left and right borders for the cell. Set to null if the borders are not required.

### Method Detail

#### getPreferredHeight

    public int getPreferredHeight(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell,
                                  org.eclipse.swt.graphics.GC gc,
                                  org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)

Specified by:
  `getPreferredHeight` in interface `org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter`
Overrides:
  `getPreferredHeight` in class `org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper`

#### getPreferredWidth

    public int getPreferredWidth(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell,
                                 org.eclipse.swt.graphics.GC gc,
                                 org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)

Specified by:
  `getPreferredWidth` in interface `org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter`
Overrides:
  `getPreferredWidth` in class `org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper`

#### paintCell

    public void paintCell(org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell cell,
                          org.eclipse.swt.graphics.GC gc,
                          org.eclipse.swt.graphics.Rectangle rectangle,
                          org.eclipse.nebula.widgets.nattable.config.IConfigRegistry configRegistry)

Specified by:
  `paintCell` in interface `org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter`
Overrides:
  `paintCell` in class `org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper`