public class BackgroundImagePainter extends CellPainterWrapper
Modifier and Type | Field and Description |
---|---|
org.eclipse.swt.graphics.Color |
separatorColor |
Constructor and Description |
---|
BackgroundImagePainter(ICellPainter interiorPainter,
org.eclipse.swt.graphics.Image bgImage,
org.eclipse.swt.graphics.Color separatorColor) |
Modifier and Type | Method and Description |
---|---|
int |
getPreferredHeight(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred height of the cell when rendered by this painter.
|
int |
getPreferredWidth(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
IConfigRegistry configRegistry)
Get the preferred width of the cell when rendered by this painter.
|
void |
paintCell(ILayerCell cell,
org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rectangle,
IConfigRegistry configRegistry) |
getCellPainterAt, getWrappedPainter, getWrappedPainterBounds, setWrappedPainter
public BackgroundImagePainter(ICellPainter interiorPainter, org.eclipse.swt.graphics.Image bgImage, org.eclipse.swt.graphics.Color separatorColor)
interiorPainter
- used for painting the cell contentsbgImage
- to be used for painting the backgroundseparatorColor
- to be used for drawing left and right borders for the cell.
Set to null if the borders are not required.public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPainter
getPreferredWidth
in interface ICellPainter
getPreferredWidth
in class CellPainterWrapper
public int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
ICellPainter
getPreferredHeight
in interface ICellPainter
getPreferredHeight
in class CellPainterWrapper
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry)
paintCell
in interface ICellPainter
paintCell
in class CellPainterWrapper
Copyright © 2013. All Rights Reserved.