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