FileDocCategorySizeDatePackage
GradientPanel.javaAPI DocAndroid 1.5 API1476Wed May 06 22:41:08 BST 2009com.android.draw9patch.ui

GradientPanel

public class GradientPanel extends JPanel

Fields Summary
private static final int
DARK_BLUE
Constructors Summary
GradientPanel()


     
        super(new BorderLayout());
    
Methods Summary
protected voidpaintComponent(java.awt.Graphics g)

        Graphics2D g2 = (Graphics2D) g;
        Rectangle clip = g2.getClipBounds();
        Paint paint = g2.getPaint();

        g2.setPaint(new GradientPaint(0.0f, getHeight() * 0.22f, new Color(DARK_BLUE),
                                      0.0f, getHeight() * 0.9f, Color.BLACK));
        g2.fillRect(clip.x, clip.y, clip.width, clip.height);

        g2.setPaint(paint);