/*
 * Created by JFormDesigner on Thu Oct 17 14:11:06 EDT 2024
 */

package tech.nevets.tvpn.ui;

import javax.swing.*;
import net.miginfocom.swing.*;
import tech.nevets.tvpn.LogOutputStream;
import tech.nevets.tvpn.Logger;
import tech.nevets.tvpn.Utils;

/**
 * @author steven
 */
public class LogsPanel extends JPanel {

    public LogsPanel(LogOutputStream logOut) {
        initComponents();
        logOut.initLogTab(logsArea);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        logsScroll = new JScrollPane();
        logsArea = new JTextArea();

        //======== this ========
        setLayout(new MigLayout(
            "hidemode 3",
            // columns
            "[grow,fill]",
            // rows
            "[grow]"));

        //======== logsScroll ========
        {

            //---- logsArea ----
            logsArea.setEditable(false);
            logsScroll.setViewportView(logsArea);
        }
        add(logsScroll, "cell 0 0,grow");
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JScrollPane logsScroll;
    private JTextArea logsArea;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
