package cnp.ew.notebook;

import cnp.ew.layout.*;
import java.awt.*;
import cnp.ew.lightweight.*;

public class Cp3DNotebookLc extends CpAbstractNotebookLc
{
    void addTabsAndPagesPanel()
    {
        CpAttachmentsLayout layout;
        CpAttachments attachments;

        setLayout(layout = new CpAttachmentsLayout());

        tabsLc = new CpScrollingNotebookTabsLc(new Cp3DRoundedTabDisplayer());
        tabsLc.addObserver(this);
        attachments = new CpAttachments(0, 0, 0, -1);
        layout.setAttachments(tabsLc, attachments);

        pagesPanelLc = new CpNotebookPagesPanelLc();
        pagesPanelLc.setBorderStyle(BORDER_OUTWARD3D);
        add(pagesPanelLc);
        // need to add in this order for drawing purposes, since they overlap (see insets ref, below)
        add(tabsLc);
        attachments = new CpAttachments(0, -1, 0, 0);
        attachments.setTopAttachment(-pagesPanelLc.insets().top, tabsLc);
        layout.setAttachments(pagesPanelLc, attachments);
    }
}