Package org.pushingpixels.flamingo.api.common.icon

# 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 of `ResizableIcon` that allows applying a `BufferedImageOp` 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

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 of `this` icon.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### 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 Details

### FilteredResizableIcon

public FilteredResizableIcon(ResizableIcon delegate, BufferedImageOp operation)
Creates a new filtered icon.

Parameters:
  `delegate` - The main (pre-filtered) icon.
  `operation` - Filter operation.

## Method Details

### getIconHeight

public int getIconHeight()

Specified by:
  `getIconHeight` in interface `Icon`

### getIconWidth

public int getIconWidth()

Specified by:
  `getIconWidth` in interface `Icon`

### setDimension

public void setDimension(Dimension newDimension)
Description copied from interface: `ResizableIcon`
Changes the dimension of `this` icon.

Specified by:
  `setDimension` in interface `ResizableIcon`
Parameters:
  `newDimension` - New dimension for `this` icon.

### paintIcon

public void paintIcon(Component c, Graphics g, int x, int y)

Specified by:
  `paintIcon` in interface `Icon`