contrib.ch.randelshofer.quaqua.util
Class ShiftedIcon
java.lang.Object
contrib.ch.randelshofer.quaqua.util.ShiftedIcon
- All Implemented Interfaces:
- javax.swing.Icon
public class ShiftedIcon
- extends java.lang.Object
- implements javax.swing.Icon
ShiftedIcon renders a target icon at a different location and can return
different width and height values than the target.
- Version:
- 1.0 May 12, 2006 Created.
- Author:
- Werner Randelshofer.
Constructor Summary |
ShiftedIcon(javax.swing.Icon target,
java.awt.Point shift)
Creates a new instance. |
ShiftedIcon(javax.swing.Icon target,
java.awt.Rectangle shiftAndSize)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShiftedIcon
public ShiftedIcon(javax.swing.Icon target,
java.awt.Point shift)
- Creates a new instance.
ShiftedIcon
public ShiftedIcon(javax.swing.Icon target,
java.awt.Rectangle shiftAndSize)
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon