javax.swing.plaf.metal
Class MetalBumps

java.lang.Object
  extended byjavax.swing.plaf.metal.MetalBumps
All Implemented Interfaces:
Icon

class MetalBumps
extends Object
implements Icon

Implements the bumps used throughout the Metal Look and Feel.

Author:
Tom Santos, Steve Wilson

Field Summary
protected  Color backColor
           
protected  BumpBuffer buffer
           
protected static Vector buffers
           
protected  Color shadowColor
           
protected  Color topColor
           
protected  int xBumps
           
protected  int yBumps
           
 
Constructor Summary
MetalBumps(Dimension bumpArea)
           
MetalBumps(int width, int height)
           
MetalBumps(int width, int height, Color newTopColor, Color newShadowColor, Color newBackColor)
           
 
Method Summary
private  BumpBuffer getBuffer(GraphicsConfiguration gc, Color aTopColor, Color aShadowColor, Color aBackColor)
           
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 void paintIcon(Component c, Graphics g, int x, int y)
          Draw the icon at the specified location.
 void setBumpArea(Dimension bumpArea)
           
 void setBumpArea(int width, int height)
           
 void setBumpColors(Color newTopColor, Color newShadowColor, Color newBackColor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xBumps

protected int xBumps

yBumps

protected int yBumps

topColor

protected Color topColor

shadowColor

protected Color shadowColor

backColor

protected Color backColor

buffers

protected static Vector buffers

buffer

protected BumpBuffer buffer
Constructor Detail

MetalBumps

public MetalBumps(Dimension bumpArea)

MetalBumps

public MetalBumps(int width,
                  int height)

MetalBumps

public MetalBumps(int width,
                  int height,
                  Color newTopColor,
                  Color newShadowColor,
                  Color newBackColor)
Method Detail

getBuffer

private BumpBuffer getBuffer(GraphicsConfiguration gc,
                             Color aTopColor,
                             Color aShadowColor,
                             Color aBackColor)

setBumpArea

public void setBumpArea(Dimension bumpArea)

setBumpArea

public void setBumpArea(int width,
                        int height)

setBumpColors

public void setBumpColors(Color newTopColor,
                          Color newShadowColor,
                          Color newBackColor)

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Description copied from interface: Icon
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()
Description copied from interface: Icon
Returns the icon's width.

Specified by:
getIconWidth in interface Icon
Returns:
an int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Description copied from interface: Icon
Returns the icon's height.

Specified by:
getIconHeight in interface Icon
Returns:
an int specifying the fixed height of the icon.