org.eclipse.nebula.widgets.nattable.painter.cell
Interface ICellPainter

All Known Implementing Classes:
AbstractCellPainter, AbstractTextPainter, AutomaticRowHeightTextPainter, BackgroundImagePainter, BackgroundPainter, BeveledBorderDecorator, BlendedBackgroundPainter, ButtonCellPainter, CellPainterDecorator, CellPainterFixture, CellPainterWrapper, CheckBoxPainter, ColumnGroupExpandCollapseImagePainter, ColumnGroupHeaderTextPainter, ColumnHeaderCheckBoxPainter, ComboBoxFilterIconPainter, ComboBoxPainter, CustomLineBorderDecorator, DisabledCheckboxPainter, FilterIconPainter, FilterRowPainter, GradientBackgroundPainter, GroupByCellTextPainter, GroupByHeaderPainter, ImagePainter, IndentedTreeImagePainter, LineBorderDecorator, PaddingDecorator, PasswordTextPainter, PercentageBarCellPainter, PercentageBarDecorator, RowGroupExpandCollapseImagePainter, RowGroupHeaderTextPainter, SortableHeaderTextPainter, SortIconPainter, TableCellPainter, TextPainter, TreeCheckBoxPainter, TreeImagePainter, VerticalTextImagePainter, VerticalTextPainter, XPBackgroundDecorator

public interface ICellPainter

Implementations are responsible for painting a cell. Custom ICellPainter can be registered in the IConfigRegistry. This is a mechanism for plugging in custom cell painting.

See Also:
PercentageBarCellPainter

Method Summary
 ICellPainter getCellPainterAt(int x, int y, ILayerCell cell, org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle adjustedCellBounds, IConfigRegistry configRegistry)
           
 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 bounds, IConfigRegistry configRegistry)
           
 

Method Detail

paintCell

void paintCell(ILayerCell cell,
               org.eclipse.swt.graphics.GC gc,
               org.eclipse.swt.graphics.Rectangle bounds,
               IConfigRegistry configRegistry)

getPreferredWidth

int getPreferredWidth(ILayerCell cell,
                      org.eclipse.swt.graphics.GC gc,
                      IConfigRegistry configRegistry)
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.

getPreferredHeight

int getPreferredHeight(ILayerCell cell,
                       org.eclipse.swt.graphics.GC gc,
                       IConfigRegistry configRegistry)
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.

getCellPainterAt

ICellPainter getCellPainterAt(int x,
                              int y,
                              ILayerCell cell,
                              org.eclipse.swt.graphics.GC gc,
                              org.eclipse.swt.graphics.Rectangle adjustedCellBounds,
                              IConfigRegistry configRegistry)


Copyright © 2014. All rights reserved.