@OpenApiAll
public class IconUtilities
extends java.lang.Object
| 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 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 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 - icon