org.jvnet.flamingo.common.icon
Class FilteredResizableIcon
java.lang.Object
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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