@OpenApiAll
public class IconUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.List<java.lang.String> |
IMAGE_SHAPE_IMAGE_TYPES |
Constructor and Description |
---|
IconUtilities() |
Modifier and Type | Method and Description |
---|---|
static ResizableIcon |
getGrayIcon(javax.swing.Icon icon,
java.awt.Component component)
Returns gray(disabled) icon for a given one.
|
static boolean |
isImageFile(java.io.File file) |
static java.awt.image.BufferedImage |
toImage(javax.swing.Icon icon)
Create an image from a given icon
|
static byte[] |
toPng(javax.swing.Icon icon)
Export given icon to PNG.
|
static byte[] |
toPng(java.awt.image.RenderedImage img)
Export given image to PNG.
|
public static final java.util.List<java.lang.String> IMAGE_SHAPE_IMAGE_TYPES
public static byte[] toPng(javax.swing.Icon icon)
icon
- iconpublic static byte[] toPng(java.awt.image.RenderedImage img)
img
- image@CheckForNull public static ResizableIcon getGrayIcon(@CheckForNull javax.swing.Icon icon, java.awt.Component component)
icon
- the given iconcomponent
- componentpublic static java.awt.image.BufferedImage toImage(javax.swing.Icon icon)
icon
- iconpublic static boolean isImageFile(java.io.File file)