Class TreeImagePainter

All Implemented Interfaces:
ICellPainter

public class TreeImagePainter extends ImagePainter
  • Constructor Details

    • TreeImagePainter

      public TreeImagePainter()
      Create a TreeImagePainter that uses the default icons to show the tree state and renders the background.
    • TreeImagePainter

      public TreeImagePainter(boolean paintBg)
      Create a TreeImagePainter that uses the default icons to show the tree state.
      Parameters:
      paintBg - true if it should render the background itself, false if the background rendering should be skipped in here.
    • TreeImagePainter

      public TreeImagePainter(org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage)
      Create a TreeImagePainter that uses the given icons to show the tree state and renders the background.
      Parameters:
      plusImage - The image that should be shown for collapsed tree nodes.
      minusImage - The image that should be shown for expanded tree nodes.
      leafImage - The image that should be shown for leafs without children.
    • TreeImagePainter

      public TreeImagePainter(boolean paintBg, org.eclipse.swt.graphics.Image plusImage, org.eclipse.swt.graphics.Image minusImage, org.eclipse.swt.graphics.Image leafImage)
      Create a TreeImagePainter that uses the given icons to show the tree state.
      Parameters:
      paintBg - true if it should render the background itself, false if the background rendering should be skipped in here.
      plusImage - The image that should be shown for collapsed tree nodes.
      minusImage - The image that should be shown for expanded tree nodes.
      leafImage - The image that should be shown for leafs without children.
  • Method Details

    • getPlusImage

      public org.eclipse.swt.graphics.Image getPlusImage()
    • getMinusImage

      public org.eclipse.swt.graphics.Image getMinusImage()
    • getLeafImage

      public org.eclipse.swt.graphics.Image getLeafImage()
    • 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.
    • setExpandCollapseImages

      public void setExpandCollapseImages(org.eclipse.swt.graphics.Image collapsedImage, org.eclipse.swt.graphics.Image expandedImage, org.eclipse.swt.graphics.Image leafImage)
      Set the images that should be used to indicate the current tree state.
      Parameters:
      collapsedImage - The image that should be shown for collapsed tree nodes.
      expandedImage - The image that should be shown for expanded tree nodes.
      leafImage - The image that should be shown for leafs without children.