Package ro.sync.exml.workspace.api.util
Interface ImageInverter
@API(type=INTERNAL,
src=PUBLIC)
public interface ImageInverter
Inverts certain images based on color theme.
- Since:
- 16.1
-
Method Summary
Modifier and TypeMethodDescriptioninvertImage
(Object image) Attempts to invert an image.Load an image from an URL.boolean
shouldInvertImage
(Object image) Check if an image should be inverted.
-
Method Details
-
loadImage
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
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
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
-