package client.view.respoGroup;

//------------------------------------Importations des différentes bibliothèques---------------------------------//
import client.view.Probleme.PanelProbleme;
import client.view.benchmarks.PanelBenchmarks;
import javax.swing.JTabbedPane;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import java.awt.*;
import javax.swing.SwingConstants;

//-----------------------------------Fin Importations des différentes bibliothèques------------------------------//




//-------------------------------------------------Début de la classe------------------------------------------------//
/**<u><b>Explication générale de la classe :</b></u>
 * <P>Cette classe permet de créer le panel du responsable groupe.
 *
 * @author Dream Team - ING2
 */
public class PanelRespoGroupe extends JPanel {

    //Declaration des variables
    private JTabbedPane jtbOperation;
    private PanelAccueilGroupe accueil;
    private PanelProbleme probleme;
    private PanelBenchmarks benchmark;

//-----------------------------------------------Constructeur----------------------------------------------------//
    /**<u><i>Explication de la méthode :</i></u>
     * <P>Constructeur permettant de créer le panel contenant l'ensemble des onglets.

     */
    public PanelRespoGroupe(String nomGroupe) {

        ImageIcon icon = new ImageIcon("java-swing-tutorial.JPG");

        //Onglets latéraux.
        jtbOperation = new JTabbedPane();
        jtbOperation.setTabPlacement(SwingConstants.LEFT);

        //Panel de l'accueil
        accueil = new PanelAccueilGroupe(nomGroupe);
        jtbOperation.addTab("Accueil", icon, accueil, null);
        jtbOperation.setSelectedIndex(0);

        //Panel PanelProbleme
        probleme = new PanelProbleme();
        jtbOperation.addTab("Probleme", icon, probleme, null);

        //Panel du benchmark
        benchmark = new PanelBenchmarks();
        jtbOperation.addTab("Benchmark", icon, benchmark, null);

        //Add the tabbed pane to this panel.
        this.setBackground(new Color(145, 165, 181));
        this.setLayout(new GridLayout(1, 1));

        add(jtbOperation);
    }

//---------------------------------------------Fin Constructeur--------------------------------------------------//

    public PanelAccueilGroupe getAccueil() {
        return accueil;
    }

    public void setAccueil(PanelAccueilGroupe accueil) {
        this.accueil = accueil;
    }

    public PanelBenchmarks getBenchmark() {
        return benchmark;
    }

    public void setBenchmark(PanelBenchmarks benchmark) {
        this.benchmark = benchmark;
    }

    public PanelProbleme getProbleme() {
        return probleme;
    }

    public void setProbleme(PanelProbleme probleme) {
        this.probleme = probleme;
    }

    public JTabbedPane getJtbOperation() {
        return jtbOperation;
    }

    public void setJtbOperation(JTabbedPane jtbOperation) {
        this.jtbOperation = jtbOperation;
    }
}
//-------------------------------------------------Fin de la classe-------------------------------------------------//

