org.tbee.swing
Class ShadowedIcon

java.lang.Object
  extended by org.tbee.swing.ShadowedIcon
All Implemented Interfaces:
Icon

public class ShadowedIcon
extends Object
implements 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(Icon icon)
           
ShadowedIcon(Icon icon, boolean shadowed)
           
ShadowedIcon(Icon icon, int shadowWidth, int shadowHeight, boolean shadowed)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
static JButton setup(JButton button)
           
static JButton setup(JButton button, Icon icon)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadowedIcon

public ShadowedIcon(Icon icon)

ShadowedIcon

public ShadowedIcon(Icon icon,
                    boolean shadowed)

ShadowedIcon

public ShadowedIcon(Icon icon,
                    int shadowWidth,
                    int shadowHeight,
                    boolean shadowed)
Method Detail

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon

setup

public static JButton setup(JButton button)

setup

public static JButton setup(JButton button,
                            Icon icon)


Copyright © 2012 KnowledgePlaza. All Rights Reserved.