package _VisualDVM.Visual.Windows;
import Common.Visual.Controls.TabToolBar;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Visual.Interface.CommentInterface;

import javax.swing.*;
public class CommentTabs implements CommentInterface {
    private JPanel comment;
    private JTabbedPane tabs;
    private JPanel editorPanel;
    private JPanel additionPanel;
    public CommentTabs() {
        tabs.setTabComponentAt(0, new TabToolBar("Комментарий", PassCode.SaveBugReportComment) {
            @Override
            public void leftMouseAction() {
                tabs.setSelectedIndex(0);
            }
        });
        tabs.setTabComponentAt(1, new TabToolBar("Дополнение", PassCode.AppendBugReportComment) {
            @Override
            public void leftMouseAction() {
                tabs.setSelectedIndex(1);
            }
        });
    }
    @Override
    public void setEditorScroll(JScrollPane scroll_in) {
        editorPanel.add(scroll_in);
    }
    @Override
    public void setAdditionScroll(JScrollPane scroll_in) {
        additionPanel.add(scroll_in);
    }
    @Override
    public JPanel getContent() {
        return comment;
    }
}
