Class ImageDrawer

java.lang.Object
be.gaudry.swing.component.image.ImageDrawer

public class ImageDrawer extends Object
This utility class draws and scales an image to fit canvas of a component.
  • Constructor Details

    • ImageDrawer

      public ImageDrawer()
  • Method Details

    • drawScaledImage

      public static void drawScaledImage(Image image, Component canvas, Graphics g, boolean preserveMinimalSize, int imagePosition, String labelName)
      Parameters:
      image -
      canvas -
      g -
      preserveMinimalSize - if true and the image is smaller than the canvas, it is kept as it is.
      labelName -