package cnp.ew.notebook;

import cnp.ew.layout.*;
import java.awt.*;
import cnp.ew.lightweight.*;

public class CpBeveledNotebookLc extends CpAbstractNotebookLc
{
    void addTabsAndPagesPanel()
    {
        CpAttachmentsLayout layout;
        CpAttachments attachments;

        setLayout(layout = new CpAttachmentsLayout());

        tabsLc = new CpScrollingNotebookTabsLc(new CpBeveledTabDisplayer(), CpScrollingNotebookTabsLc.ORIENT_BOTTOM, CpScrollingNotebookTabsLc.BUTTONS_LEFT);
        tabsLc.setForeground(Color.black);
        tabsLc.addObserver(this);
        attachments = new CpAttachments(0, -1, 0, 0);
        layout.setAttachments(tabsLc, attachments);

        pagesPanelLc = new CpNotebookPagesPanelLc();
        pagesPanelLc.setBorderStyle(BORDER_LINE);
        /*
        pagesPanelLc.setBorderDisplayer(
            new Cp3Sided3DBorderDisplayer(
                true, false, Cp3Sided3DBorderDisplayer.HIDE_BOTTOM
            )
        );
        */
        add(pagesPanelLc);

        // need to add in this order for drawing purposes, since they overlap (see insets ref, below)
        add(tabsLc);
        attachments = new CpAttachments(0, 0, 0, -1);
        attachments.setBottomAttachment(-pagesPanelLc.insets().bottom, tabsLc);
        layout.setAttachments(pagesPanelLc, attachments);
        pagesPanelLc.setBackground(Color.white);
    }
}