FileDocCategorySizeDatePackage
MetalComboBoxIcon.javaAPI DocJava SE 5 API1465Fri Aug 26 14:58:06 BST 2005javax.swing.plaf.metal

MetalComboBoxIcon

public class MetalComboBoxIcon extends Object implements Serializable, Icon
This utility class draws the horizontal bars which indicate a MetalComboBox
see
MetalComboBoxUI
version
1.13 12/19/03
author
Tom Santos

Fields Summary
Constructors Summary
Methods Summary
public intgetIconHeight()
Created a stub to satisfy the interface.

 return 5; 
public intgetIconWidth()
Created a stub to satisfy the interface.

 return 10; 
public voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
Paints the horizontal bars for the

        JComponent component = (JComponent)c;
	int iconWidth = getIconWidth();

	g.translate( x, y );

	g.setColor( component.isEnabled() ? MetalLookAndFeel.getControlInfo() : MetalLookAndFeel.getControlShadow() );
	g.drawLine( 0, 0, iconWidth - 1, 0 );
	g.drawLine( 1, 1, 1 + (iconWidth - 3), 1 );
	g.drawLine( 2, 2, 2 + (iconWidth - 5), 2 );
	g.drawLine( 3, 3, 3 + (iconWidth - 7), 3 );
	g.drawLine( 4, 4, 4 + (iconWidth - 9), 4 );

	g.translate( -x, -y );