Interface ImageInverter


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

    • loadImage

      Object loadImage(URL imageURL) throws 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:
      IOException - If it fails to load the image.
    • shouldInvertImage

      boolean shouldInvertImage(Object image) throws 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:
      IOException - If the operation fails.
    • invertImage

      Object invertImage(Object image) throws 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:
      IOException - If the operation fails