Class SortableHeaderTextPainter

All Implemented Interfaces:
ICellPainter

public class SortableHeaderTextPainter extends CellPainterWrapper
  • Constructor Details

    • SortableHeaderTextPainter

      public SortableHeaderTextPainter()
      Creates the default SortableHeaderTextPainter that uses a TextPainter as base ICellPainter and decorate it with the SortIconPainter on the right edge of the cell.
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter and decorate it with the SortIconPainter on the right edge of the cell.
      Parameters:
      interiorPainter - the base ICellPainter to use
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter and decorate it with the SortIconPainter on the specified edge of the cell.
      Parameters:
      interiorPainter - the base ICellPainter to use
      cellEdge - the edge of the cell on which the sort indicator decoration should be applied
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter and decorate it with the given ICellPainter to use for sort related decoration on the specified edge of the cell.
      Parameters:
      interiorPainter - the base ICellPainter to use
      cellEdge - the edge of the cell on which the sort indicator decoration should be applied
      decoratorPainter - the ICellPainter that should be used to paint the sort related decoration (by default the SortIconPainter will be used)
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, boolean paintBg, int spacing, boolean paintDecorationDependent)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter. It will use the SortIconPainter 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 SortIconPainter 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.
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter, CellEdgeEnum cellEdge, ICellPainter decoratorPainter, boolean paintBg, int spacing, boolean paintDecorationDependent)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter. It will use the given ICellPainter 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
      decoratorPainter - the ICellPainter that should be used to paint the sort 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.
    • SortableHeaderTextPainter

      public SortableHeaderTextPainter(ICellPainter interiorPainter, boolean paintBg, boolean interiorPainterToSpanFullWidth)
      Creates a SortableHeaderTextPainter that uses the given ICellPainter as base ICellPainter and decorate it with the SortIconPainter on the right edge of the cell. This constructor gives the opportunity to configure the behaviour of the SortIconPainter and the CellPainterDecorator for some attributes. Remains because of downwards compatibility.
      Parameters:
      interiorPainter - the base ICellPainter to use
      paintBg - flag to configure whether the SortIconPainter should paint the background or not
      interiorPainterToSpanFullWidth - flag to configure how the bounds of the base painter should be calculated