Class RowGroupHeaderTextPainter

    • Constructor Detail

      • RowGroupHeaderTextPainter

        public RowGroupHeaderTextPainter​(ICellPainter interiorPainter,
                                         CellEdgeEnum cellEdge,
                                         boolean paintBg,
                                         int spacing,
                                         boolean paintDecorationDependent)
        Creates a RowGroupHeaderTextPainter that uses the given ICellPainter as base ICellPainter. It will use the RowGroupExpandCollapseImagePainter as 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 created CellPainterDecorator can be configured in terms of rendering.
        Parameters:
        interiorPainter - the base ICellPainter to use
        cellEdge - the edge of the cell on which the sort indicator decoration should be applied
        paintBg - flag to configure whether the RowGroupExpandCollapseImagePainter should paint the background or not
        spacing - the number of pixels that should be used as spacing between cell edge and decoration
        paintDecorationDependent - flag to configure if the base ICellPainter should render decoration dependent or not. If it is set to false, the base painter will always paint at the same coordinates, using the whole cell bounds, true will 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 a RowGroupHeaderTextPainter that uses the given ICellPainter as base ICellPainter. It will use the given ICellPainter as 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 created CellPainterDecorator can be configured in terms of rendering.
        Parameters:
        interiorPainter - the base ICellPainter to use
        cellEdge - the edge of the cell on which the row group indicator decoration should be applied
        decoratorPainter - the ICellPainter that should be used to paint the row group related decoration
        paintBg - flag to configure whether the CellPainterDecorator should paint the background or not
        spacing - the number of pixels that should be used as spacing between cell edge and decoration
        paintDecorationDependent - flag to configure if the base ICellPainter should render decoration dependent or not. If it is set to false, the base painter will always paint at the same coordinates, using the whole cell bounds, true will cause the bounds of the cell to shrink for the base painter.
    • Method Detail

      • 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.
        Specified by:
        getPreferredWidth in interface ICellPainter
        Overrides:
        getPreferredWidth in class CellPainterWrapper
        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.