package gui.panels.edit;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.Label;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JTextArea;

import agenda.Agenda;

/**
 * Created by gjoosen on 13/02/15.
 */
public class EditPane extends JPanel {

    private Agenda agenda;
    private JPanel detailsPanel;
    
    public EditPane(Agenda agenda) {
        this.agenda = agenda;
        super.setBackground(Color.WHITE);
        super.setLayout(new GridLayout(1, 4));
        this.setOpaque(true);
        this.setBackground(Color.WHITE);
        this.detailsPanel = this.detailsPanel();
        super.add(new ArtistPane(this.agenda, this.detailsPanel));
        super.add(new StagesPane(this.agenda, this.detailsPanel));
        super.add(new ActsPane(this.agenda, this.detailsPanel));
        this.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
    }

    private JPanel detailsPanel() {
        JPanel detailsPanel = new JPanel();
        detailsPanel.setBackground(Color.WHITE);
        detailsPanel.setOpaque(false);
        detailsPanel.setLayout(new BorderLayout());
        JPanel randomPane = new JPanel();
        randomPane.setBackground(Color.WHITE);
        randomPane.setOpaque(false);
        detailsPanel.add(randomPane, BorderLayout.EAST);
        detailsPanel.add(randomPane, BorderLayout.WEST);
        detailsPanel.add(randomPane, BorderLayout.SOUTH);
        detailsPanel.add(new Label("Details"), BorderLayout.NORTH);

        detailsPanel.add(new JTextArea("Test"), BorderLayout.CENTER);
        return detailsPanel;
    }
}


