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 ofResizableIconthat allows applying aBufferedImageOpon another icon.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,BufferedImage>cachedImagesImage cache to speed up rendering.protected ResizableIcondelegateThe main (pre-filtered) icon.protected BufferedImageOpoperationFilter 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 intgetIconHeight()intgetIconWidth()voidpaintIcon(Component c, Graphics g, int x, int y)voidsetDimension(Dimension newDimension)Changes the dimension ofthisicon.
-
-
-
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:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfaceIcon
-
setDimension
public void setDimension(Dimension newDimension)
Description copied from interface:ResizableIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceResizableIcon- Parameters:
newDimension- New dimension forthisicon.
-
-