Class RowGroupHeaderTextPainter
java.lang.Object
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
org.eclipse.nebula.widgets.nattable.group.painter.RowGroupHeaderTextPainter
- All Implemented Interfaces:
ICellPainter
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the defaultRowGroupHeaderTextPainterthat uses aTextPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell.RowGroupHeaderTextPainter(ICellPainter interiorPainter) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell.RowGroupHeaderTextPainter(ICellPainter interiorPainter, boolean paintBg, boolean interiorPainterToSpanFullWidth) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell.RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the specified edge of the cell.RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, boolean paintBg, int spacing, boolean paintDecorationDependent) RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with the givenICellPainterto use for sort related decoration on the specified edge of the cell.RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter, boolean paintBg, int spacing, boolean paintDecorationDependent) -
Method Summary
Modifier and TypeMethodDescriptionintgetPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Get the preferred width of the cell when rendered by this painter.Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
getCellPainterAt, getPreferredHeight, getWrappedPainter, getWrappedPainterBounds, paintCell, setWrappedPainter
-
Constructor Details
-
RowGroupHeaderTextPainter
public RowGroupHeaderTextPainter()Creates the defaultRowGroupHeaderTextPainterthat uses aTextPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell. -
RowGroupHeaderTextPainter
Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell.- Parameters:
interiorPainter- the baseICellPainterto use
-
RowGroupHeaderTextPainter
Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the specified edge of the cell.- Parameters:
interiorPainter- the baseICellPainterto usecellEdge- the edge of the cell on which the sort indicator decoration should be applied
-
RowGroupHeaderTextPainter
public RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with the givenICellPainterto use for sort related decoration on the specified edge of the cell.- Parameters:
interiorPainter- the baseICellPainterto usecellEdge- the edge of the cell on which the sort indicator decoration should be applieddecoratorPainter- theICellPainterthat should be used to paint the sort related decoration (by default theRowGroupExpandCollapseImagePainterwill be used)
-
RowGroupHeaderTextPainter
public RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, boolean paintBg, int spacing, boolean paintDecorationDependent) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainter. It will use theRowGroupExpandCollapseImagePainteras decorator for sort related decorations at the specified cell edge, which can be configured to render the background or not via method parameter. With the additional parameters, the behaviour of the createdCellPainterDecoratorcan be configured in terms of rendering.- Parameters:
interiorPainter- the baseICellPainterto usecellEdge- the edge of the cell on which the sort indicator decoration should be appliedpaintBg- flag to configure whether theRowGroupExpandCollapseImagePaintershould paint the background or notspacing- the number of pixels that should be used as spacing between cell edge and decorationpaintDecorationDependent- flag to configure if the baseICellPaintershould render decoration dependent or not. If it is set tofalse, the base painter will always paint at the same coordinates, using the whole cell bounds,truewill cause the bounds of the cell to shrink for the base painter.
-
RowGroupHeaderTextPainter
public RowGroupHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter, boolean paintBg, int spacing, boolean paintDecorationDependent) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainter. It will use the givenICellPainteras decorator for row group related decorations at the specified cell edge, which can be configured to render the background or not via method parameter. With the additional parameters, the behaviour of the createdCellPainterDecoratorcan be configured in terms of rendering.- Parameters:
interiorPainter- the baseICellPainterto usecellEdge- the edge of the cell on which the row group indicator decoration should be applieddecoratorPainter- theICellPainterthat should be used to paint the row group related decorationpaintBg- flag to configure whether theCellPainterDecoratorshould paint the background or notspacing- the number of pixels that should be used as spacing between cell edge and decorationpaintDecorationDependent- flag to configure if the baseICellPaintershould render decoration dependent or not. If it is set tofalse, the base painter will always paint at the same coordinates, using the whole cell bounds,truewill cause the bounds of the cell to shrink for the base painter.
-
RowGroupHeaderTextPainter
public RowGroupHeaderTextPainter(ICellPainter interiorPainter, boolean paintBg, boolean interiorPainterToSpanFullWidth) Creates aRowGroupHeaderTextPainterthat uses the givenICellPainteras baseICellPainterand decorate it with theRowGroupExpandCollapseImagePainteron the bottom edge of the cell. This constructor gives the opportunity to configure the behaviour of theRowGroupExpandCollapseImagePainterand theCellPainterDecoratorfor some attributes. Remains because of downwards compatibility.- Parameters:
interiorPainter- the baseICellPainterto usepaintBg- flag to configure whether theRowGroupExpandCollapseImagePaintershould paint the background or notinteriorPainterToSpanFullWidth- flag to configure how the bounds of the base painter should be calculated
-
-
Method Details
-
getPreferredWidth
public int getPreferredWidth(ILayerCell cell, org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry) Description copied from interface:ICellPainterGet the preferred width of the cell when rendered by this painter. Used for auto-resize.- Specified by:
getPreferredWidthin interfaceICellPainter- Overrides:
getPreferredWidthin classCellPainterWrapper- 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.
-