package cnp.ew.displayer;
import java.awt.*;
import cnp.ew.lightweight.*;

final public class CpFlatBorderDisplayer extends CpAbstractBorderDisplayer
{

    public static CpFlatBorderDisplayer singleton = new CpFlatBorderDisplayer();
    public Color borderColor = Color.black;

    /**
     * Display the borders in rect, using g.
     */
    public void paintBordersIn(CpLightweightComponent c, Graphics g, int x, int y, int w, int h)
    {
        int right = x + w - 1;
        int bottom = y + h - 1;
        g.setColor(borderColor);
        g.drawRect(x, y, w - 1, h - 1);
    }


    public int getLeftBorderThickness(CpLightweightComponent c)
    {
        return 1;
    }

    public int getRightBorderThickness(CpLightweightComponent c)
    {
        return 1;
    }

    public int getTopBorderThickness(CpLightweightComponent c)
    {
        return 1;
    }

    public int getBottomBorderThickness(CpLightweightComponent c)
    {
        return 1;
    }

}