Class SortIconPainter

All Implemented Interfaces:
ICellPainter

public class SortIconPainter extends ImagePainter
Paints the triangular sort icon images. It is used to decorate column header cells to show the current sort state.
  • Constructor Details

    • SortIconPainter

      public SortIconPainter()
      Create a SortIconPainter that uses the default icons (black triangles) and renders the background.
    • SortIconPainter

      public SortIconPainter(boolean paintBg)
      Create a SortIconPainter that uses the default icons (black triangles).
      Parameters:
      paintBg - true if it should render the background itself, false if the background rendering should be skipped in here.
    • SortIconPainter

      public SortIconPainter(boolean paintBg, boolean invertIcons)
      Create a SortIconPainter.
      Parameters:
      paintBg - true if it should render the background itself, false if the background rendering should be skipped in here.
      invertIcons - Specify whether the default icons should be used (black triangles) or if inverted icons should be used (white triangles).
  • Method Details

    • getImage

      protected org.eclipse.swt.graphics.Image getImage(ILayerCell cell, IConfigRegistry configRegistry)
      Overrides:
      getImage in class ImagePainter
      Parameters:
      cell - The ILayerCell for which this ImagePainter is called.
      configRegistry - The current IConfigRegistry to retrieve the cell style information from.
      Returns:
      The Image that should be painted by this ImagePainter.
    • selectUpImage

      protected org.eclipse.swt.graphics.Image selectUpImage(int sortSequence)
      Returns the sort icon that should be used to indicate ascending sorting state.
      Parameters:
      sortSequence - The sort sequence number for which the sort icon is requested.
      Returns:
      The sort icon that should be rendered to indicate the current sort state.
    • selectDownImage

      protected org.eclipse.swt.graphics.Image selectDownImage(int sortSequence)
      Returns the sort icon that should be used to indicate descending sorting state.
      Parameters:
      sortSequence - The sort sequence number for which the sort icon is requested.
      Returns:
      The sort icon that should be rendered to indicate the current sort state.
    • setSortImages

      public void setSortImages(org.eclipse.swt.graphics.Image upImage0, org.eclipse.swt.graphics.Image upImage1, org.eclipse.swt.graphics.Image upImage2, org.eclipse.swt.graphics.Image downImage0, org.eclipse.swt.graphics.Image downImage1, org.eclipse.swt.graphics.Image downImage2)
      Set the images that should be used to indicate the current sort state.
      Parameters:
      upImage0 - Image to be used to indicate first level ascending sorting.
      upImage1 - Image to be used to indicate second level ascending sorting.
      upImage2 - Image to be used to indicate third level ascending sorting.
      downImage0 - Image to be used to indicate first level descending sorting.
      downImage1 - Image to be used to indicate second level descending sorting.
      downImage2 - Image to be used to indicate third level descending sorting.
    • setSortImages

      public void setSortImages(List<org.eclipse.swt.graphics.Image> upImages, List<org.eclipse.swt.graphics.Image> downImages)
      Set the images that should be used to indicate the current sort state.
      Parameters:
      upImages - Images that should be used to indicate ascending sorting.
      downImages - Images that should be used to indicate descending sorting.
      Since:
      2.3