Class FilteredResizableIcon
- java.lang.Object
-
- org.pushingpixels.flamingo.api.common.icon.FilteredResizableIcon
-
- All Implemented Interfaces:
Icon
,ResizableIcon
public class FilteredResizableIcon extends Object implements ResizableIcon
Implementation ofResizableIcon
that allows applying aBufferedImageOp
on another icon.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description FilteredResizableIcon(ResizableIcon delegate, BufferedImageOp operation)
Creates a new filtered icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIconHeight()
int
getIconWidth()
void
paintIcon(Component c, Graphics g, int x, int y)
void
setDimension(Dimension newDimension)
Changes the dimension ofthis
icon.
-
-
-
Field Detail
-
cachedImages
protected Map<String,BufferedImage> cachedImages
Image cache to speed up rendering.
-
delegate
protected ResizableIcon delegate
The main (pre-filtered) icon.
-
operation
protected BufferedImageOp operation
Filter operation.
-
-
Constructor Detail
-
FilteredResizableIcon
public FilteredResizableIcon(ResizableIcon delegate, BufferedImageOp operation)
Creates a new filtered icon.- Parameters:
delegate
- The main (pre-filtered) icon.operation
- Filter operation.
-
-
Method Detail
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfaceIcon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfaceIcon
-
setDimension
public void setDimension(Dimension newDimension)
Description copied from interface:ResizableIcon
Changes the dimension ofthis
icon.- Specified by:
setDimension
in interfaceResizableIcon
- Parameters:
newDimension
- New dimension forthis
icon.
-
-