Interface ImageInverter


  • @API(type=INTERNAL,
         src=PUBLIC)
    public interface ImageInverter
    Inverts certain images based on color theme.
    Since:
    16.1
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object invertImage​(java.lang.Object image)
      Attempts to invert an image.
      java.lang.Object loadImage​(java.net.URL imageURL)
      Load an image from an URL.
      boolean shouldInvertImage​(java.lang.Object image)
      Check if an image should be inverted.
    • Method Detail

      • loadImage

        java.lang.Object loadImage​(java.net.URL imageURL)
                            throws java.io.IOException
        Load an image from an URL. Returns either a java.awt.image.BufferedImage for the standalone editor or an org.eclipse.jface.resource.ImageDescriptor for the Oxygen plugin for Eclipse.
        Parameters:
        imageURL - The image URL
        Returns:
        Either a java.awt.image.BufferedImage for the standalone editor or an org.eclipse.jface.resource.ImageDescriptor for the Oxygen plugin for Eclipse.
        Throws:
        java.io.IOException - If it fails to load the image.
      • shouldInvertImage

        boolean shouldInvertImage​(java.lang.Object image)
                           throws java.io.IOException
        Check if an image should be inverted.
        Parameters:
        image - Either a java.awt.image.BufferedImage for the standalone editor or an org.eclipse.jface.resource.ImageDescriptor for the Oxygen plugin for Eclipse
        Returns:
        true if image should be inverted in the current color theme.
        Throws:
        java.io.IOException - If the operation fails.
      • invertImage

        java.lang.Object invertImage​(java.lang.Object image)
                              throws java.io.IOException
        Attempts to invert an image. In the standalone implementation the received image is inverted, in the Eclipse implementation a new ImageDescriptor instance is returned.
        Parameters:
        image - The image. Either a java.awt.image.BufferedImage for the standalone editor or an org.eclipse.jface.resource.ImageDescriptor for the Oxygen plugin for Eclipse
        Returns:
        The inverted image.
        Throws:
        java.io.IOException - If the operation fails