Class PictureDialogUtils


  • public class PictureDialogUtils
    extends Object
    Utilities for pictures operations.
    See Also:
    FileDialog
    • Field Detail

      • OPEN_IMAGE_FILTER_EXTENSIONS

        public static final String[] OPEN_IMAGE_FILTER_EXTENSIONS
      • SAVE_IMAGE_FILTER_EXTENSIONS

        public static final String[] SAVE_IMAGE_FILTER_EXTENSIONS
    • Constructor Detail

      • PictureDialogUtils

        public PictureDialogUtils()
    • Method Detail

      • createOpenImageFileDialog

        public static org.eclipse.swt.widgets.FileDialog createOpenImageFileDialog​(org.eclipse.swt.widgets.Shell parent)
        Creates FileDialog to open image.
        Parameters:
        parent - the parent shell
        Returns:
        the file dialog
      • createSaveImageFileDialog

        public static org.eclipse.swt.widgets.FileDialog createSaveImageFileDialog​(org.eclipse.swt.widgets.Shell parent)
        Creates FileDialog to save image.
        Parameters:
        parent - the parent shell
        Returns:
        the file dialog
      • defineSaveImageType

        public static int defineSaveImageType​(String path)
        Defines SWT type for the given extension
        Parameters:
        path - the path to image, cannot be null
        Returns:
        the SWT image type
      • getTransparencyImage

        public static org.eclipse.swt.graphics.Image getTransparencyImage​(org.eclipse.swt.graphics.Image original,
                                                                          int pixel)
        Creates a new Image with the given transparent pixel.
        Parameters:
        original - is the original image
        pixel - the transparent pixel
        Returns:
        the image with transparent pixel