Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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)`

Method Summary
`int` | `getIconHeight()`
`int` | `getIconWidth()`
`void` | `paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

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

Method Detail

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD