Class ImageHelper

java.lang.Object
net.simplace.ui.service.ImageHelper

public class ImageHelper extends Object
Helper methods and constants for images and colors.
Author:
Andreas Enders
  • Constructor Details

    • ImageHelper

      public ImageHelper()
  • Method Details

    • savePanelToFile

      public static boolean savePanelToFile(JPanel aPanel, File aFile)
      Paints a panel into an image and saves it to a file. The image format is taken from the file extension (e.g. png, jpg).
      Parameters:
      aPanel - panel to save; its current size is used as image size
      aFile - target file
      Returns:
      true if the image was written, false if an I/O error occurred