APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf.metal

pack-priv Class MetalBumps

Additional top-level class in compilation unit: BumpBuffer.

extends Object
implements Icon
Class Inheritance
All Implemented Interfaces
javax.swing.Icon
Imports
java.awt.*, java.awt.image.*, javax.swing.*, java.util.ArrayList, .List

Implements the bumps used throughout the Metal Look and Feel.
Authors
Tom Santos, Steve Wilson

Field Summary

Modifier and TypeField and Description
pack-priv static final Color
protected Color
protected BumpBuffer
private static final List<BumpBuffer>
protected Color
protected Color
protected int
protected int

Constructor Summary

AccessConstructor and Description
public
MetalBumps(int width, int height, Color newTopColor, Color newShadowColor, Color newBackColor)

Creates MetalBumps of the specified size with the specified colors.

Method Summary

Modifier and TypeMethod and Description
private static BumpBuffer
createBuffer(GraphicsConfiguration gc, Color topColor, Color shadowColor, Color backColor)

public int
getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Returns the icon's height.

public int
getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Returns the icon's width.

public void
paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

public void
public void
setBumpArea(int width, int height)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALPHAback to summary
pack-priv static final Color ALPHA
backColorback to summary
protected Color backColor
bufferback to summary
protected BumpBuffer buffer
bumpsListback to summary
private static final List<BumpBuffer> bumpsList
shadowColorback to summary
protected Color shadowColor
topColorback to summary
protected Color topColor
xBumpsback to summary
protected int xBumps
yBumpsback to summary
protected int yBumps

Constructor Detail

MetalBumpsback to summary
public MetalBumps(int width, int height, Color newTopColor, Color newShadowColor, Color newBackColor)

Creates MetalBumps of the specified size with the specified colors. If newBackColor is null, the background will be transparent.

Method Detail

createBufferback to summary
private static BumpBuffer createBuffer(GraphicsConfiguration gc, Color topColor, Color shadowColor, Color backColor)
getIconHeightback to summary
public int getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Doc from javax.swing.Icon.getIconHeight.

Returns the icon's height.

getIconWidthback to summary
public int getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Doc from javax.swing.Icon.getIconWidth.

Returns the icon's width.

paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

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.

setBumpAreaback to summary
public void setBumpArea(Dimension bumpArea)
setBumpAreaback to summary
public void setBumpArea(int width, int height)
setBumpColorsback to summary
public void setBumpColors(Color newTopColor, Color newShadowColor, Color newBackColor)