public class FilteredResizableIcon extends java.lang.Object implements ResizableIcon
ResizableIcon that allows applying a
BufferedImageOp on another icon.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.awt.image.BufferedImage> |
cachedImages
Image cache to speed up rendering.
|
protected ResizableIcon |
delegate
The main (pre-filtered) icon.
|
protected java.awt.image.BufferedImageOp |
operation
Filter operation.
|
| Constructor and Description |
|---|
FilteredResizableIcon(ResizableIcon delegate,
java.awt.image.BufferedImageOp operation)
Creates a new filtered icon.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
setDimension(java.awt.Dimension newDimension)
Changes the dimension of
this icon. |
protected java.util.Map<java.lang.String,java.awt.image.BufferedImage> cachedImages
protected ResizableIcon delegate
protected java.awt.image.BufferedImageOp operation
public FilteredResizableIcon(ResizableIcon delegate, java.awt.image.BufferedImageOp operation)
delegate - The main (pre-filtered) icon.operation - Filter operation.public int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic void setDimension(java.awt.Dimension newDimension)
ResizableIconthis icon.setDimension in interface ResizableIconnewDimension - New dimension for this icon.public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Icon