/**
 * @author Aurelie
 *
 */
package View;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;

import Model.Model;

public class View extends JFrame implements IView {

	private static final long serialVersionUID = 1L;

	public View(Model model) {

		this.setTitle("BioSignature");
		this.setSize(600, 600+25);
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		JPanel container = new JPanel();
		container.setLayout(new BorderLayout());

		JTabbedPane onglets = new JTabbedPane(SwingConstants.TOP);
		onglets.setPreferredSize(new Dimension(600,600));

		OngletApprentissage onglet1 = new OngletApprentissage(model); 
		OngletIdentification onglet2 = new OngletIdentification(model);
		OngletInfos onglet3 = new OngletInfos(model, onglet2);

		onglets.addTab("Nouvel utilisateur", onglet1);
		onglets.addTab("Identification", onglet2);
		onglets.addTab("Infos", onglet3);

		onglets.setOpaque(true);		

		container.add(onglets, BorderLayout.NORTH);


		this.setContentPane(container);
		this.setVisible(true);  

	}
}