package Vue;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;

import Controleurs.EcouteurBoutonDeconnexion;

public class IHMBigPanel extends JPanel {
	
	protected JPanel jp3 = new JPanel();
	protected IHMAccueil ihm;
	
	public IHMBigPanel(JPanel jp3, IHMAccueil ihm)
	{
		this.jp3 = jp3;
		this.ihm = ihm;
		
		this.setLayout(null);
		this.setSize(1200,800);
		this.setLocation(0,0);
		this.setBackground(new Color(190,202,250));
		
		JPanel jp2 = new JPanel();
		jp2.setLayout(null);
		jp2.setSize(200,200);
		this.add(jp2);
		jp2.setBackground(new Color(190, 202, 250));
		jp2.setLocation(0,25);
		
		
		
		
		JLabel nom_util = new JLabel("Nom: " );
		nom_util.setSize(200, 20);
		nom_util.setLocation(10,35);
		jp2.add(nom_util);
		
		JLabel prenom_util = new JLabel("Prénom: " );
		prenom_util.setSize(200, 20);
		prenom_util.setLocation(10,55);
		jp2.add(prenom_util);
		
		JLabel log = new JLabel("(login)");
		log.setSize(200, 20);
		log.setLocation(10,75);
		jp2.add(log);
		
		JLabel groupe = new JLabel("Groupe: " );
		groupe.setSize(200, 20);
		groupe.setLocation(10,95);
		jp2.add(groupe);
		
		JLabel droits = new JLabel("Droits: " );
		droits.setSize(200, 20);
		droits.setLocation(10,115);
		jp2.add(droits);
		
		LineBorder border = new LineBorder(Color.red);
		jp2.setBorder(BorderFactory.createTitledBorder(border,"Utilisateur en cours"));
		
		JButton deconnexion = new JButton("Deconnexion");
		deconnexion.addActionListener(new EcouteurBoutonDeconnexion(ihm,ihm.getProbleme(),ihm.getGroupes(),ihm.getDXML()));
		deconnexion.setSize(130, 20);
		deconnexion.setLocation(10, 145);
		jp2.add(deconnexion);
		
		this.setJp3(new IHMMenu(ihm));
		this.add(jp3);
	}
	
	public JPanel getJp3() {
		return jp3;
	}

	public void setJp3(JPanel jp3) {
		this.jp3 = jp3;
	}

}
