org.jvnet.flamingo.common.icon
Class FilteredResizableIcon

java.lang.Object
  extended by org.jvnet.flamingo.common.icon.FilteredResizableIcon
All Implemented Interfaces:
javax.swing.Icon, ResizableIcon

public class FilteredResizableIcon
extends java.lang.Object
implements ResizableIcon

Implementation of ResizableIcon that allows applying a BufferedImageOp on another icon.

Author:
Kirill Grouchnikov

Constructor Summary
FilteredResizableIcon(ResizableIcon delegate, java.awt.image.BufferedImageOp operation)
          Creates a new filtered icon.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredResizableIcon

public FilteredResizableIcon(ResizableIcon delegate,
                             java.awt.image.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 interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

setDimension

public void setDimension(java.awt.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(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon