Class CellPainterFixture
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
-
- org.eclipse.nebula.widgets.nattable.test.fixture.CellPainterFixture
-
- All Implemented Interfaces:
ICellPainter
public class CellPainterFixture extends AbstractCellPainter
Painter fixture for unit tests. Helps probe state after a paint call has been made to it. Does not do any actual painting.
-
-
Constructor Summary
Constructors Constructor Description CellPainterFixture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Rectangle
getLastPaintedBounds()
ILayerCell
getLastPaintedCell()
IConfigRegistry
getLastPaintedConfigRegistry()
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.boolean
isPainted()
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.AbstractCellPainter
getCellPainterAt
-
-
-
-
Method Detail
-
getPreferredHeight
public int getPreferredHeight(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
Description copied from interface:ICellPainter
Get the preferred height of the cell when rendered by this painter. Used for auto-resize.- Parameters:
cell
- The cell for which the preferred height is requested.gc
- The GC that is used for rendering.configRegistry
- The IConfigRegistry that contains the configuration used for rendering.- Returns:
- The preferred height of the given cell when rendered by this painter.
-
getPreferredWidth
public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
Description copied from interface:ICellPainter
Get the preferred width of the cell when rendered by this painter. Used for auto-resize.- Parameters:
cell
- The cell for which the preferred width is requested.gc
- The GC that is used for rendering.configRegistry
- The IConfigRegistry that contains the configuration used for rendering.- Returns:
- The preferred width of the given cell when rendered by this painter.
-
paintCell
public void paintCell(ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, IConfigRegistry configRegistry)
-
getLastPaintedCell
public ILayerCell getLastPaintedCell()
-
getLastPaintedBounds
public org.eclipse.swt.graphics.Rectangle getLastPaintedBounds()
-
getLastPaintedConfigRegistry
public IConfigRegistry getLastPaintedConfigRegistry()
-
isPainted
public boolean isPainted()
-
-