org.tbee.swing
Class ShadowedIcon
java.lang.Object
org.tbee.swing.ShadowedIcon
- All Implemented Interfaces:
- javax.swing.Icon
public class ShadowedIcon
- extends java.lang.Object
- implements javax.swing.Icon
Draws a shadow around an icon.
This class both generates the icon-with-shadow and icon-with-shadow using the shadowed boolean.
Usage:
lContainer.add(ShadowedIcon.setup(new JButton(icon)));
- Version:
- $Revision: 1.2 $
|
Constructor Summary |
ShadowedIcon(javax.swing.Icon icon)
|
ShadowedIcon(javax.swing.Icon icon,
boolean shadowed)
|
ShadowedIcon(javax.swing.Icon icon,
int shadowWidth,
int shadowHeight,
boolean shadowed)
|
|
Method Summary |
int |
getIconHeight()
|
int |
getIconWidth()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
static javax.swing.JButton |
setup(javax.swing.JButton button)
|
static javax.swing.JButton |
setup(javax.swing.JButton button,
javax.swing.Icon icon)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShadowedIcon
public ShadowedIcon(javax.swing.Icon icon)
ShadowedIcon
public ShadowedIcon(javax.swing.Icon icon,
boolean shadowed)
ShadowedIcon
public ShadowedIcon(javax.swing.Icon icon,
int shadowWidth,
int shadowHeight,
boolean shadowed)
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth in interface javax.swing.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
setup
public static javax.swing.JButton setup(javax.swing.JButton button)
setup
public static javax.swing.JButton setup(javax.swing.JButton button,
javax.swing.Icon icon)
Copyright © 2010 KnowledgePlaza. All Rights Reserved.