FileDocCategorySizeDatePackage
CurvedBorder.javaAPI DocExample1489Mon Nov 09 12:45:48 GMT 1998None

CurvedBorder

public class CurvedBorder extends AbstractBorder

Fields Summary
private Color
wallColor
private int
sinkLevel
Constructors Summary
public CurvedBorder()


         
public CurvedBorder(int sinkLevel)

this.sinkLevel = sinkLevel;
public CurvedBorder(Color wall)

this.wallColor = wall;
public CurvedBorder(int sinkLevel, Color wall)

        this.sinkLevel = sinkLevel;
        this.wallColor = wall;
    
Methods Summary
public java.awt.InsetsgetBorderInsets(java.awt.Component c)

        return new Insets(sinkLevel, sinkLevel, sinkLevel, sinkLevel);
    
public java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets i)

        i.left = i.right = i.bottom = i.top = sinkLevel;
        return i;
    
public intgetSinkLevel()

 return sinkLevel; 
public java.awt.ColorgetWallColor()

 return wallColor; 
public booleanisBorderOpaque()

 return true; 
public voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int w, int h)

        g.setColor(getWallColor());

        //  Paint a tall wall around the component
        for (int i = 0; i < sinkLevel; i++) {
           g.drawRoundRect(x+i, y+i, w-i-1, h-i-1, sinkLevel-i, sinkLevel);
           g.drawRoundRect(x+i, y+i, w-i-1, h-i-1, sinkLevel, sinkLevel-i);
           g.drawRoundRect(x+i, y, w-i-1, h-1, sinkLevel-i, sinkLevel);
           g.drawRoundRect(x, y+i, w-1, h-i-1, sinkLevel, sinkLevel-i);
        }