Version 2.1
Centralisation des toute les listes avec l'utilisation d'onglets. légère édition de la structure des fichiers et nettoyage du contenu des fichiers.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="//NASCCB/Documents/Programmation/eclipse-workspace/Ecurie-Projet/src/mysql-connector-java-8.0.26/mariadb-java-client-2.7.4.jar">
|
<classpathentry kind="lib" path="//NASCCB/Documents/Programmation/eclipse-workspace/DB/mysql-connector-java-8.0.26/mariadb-java-client-2.7.4.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package modele;
|
|||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
|
||||||
|
|
||||||
public class BDD {
|
public class BDD {
|
||||||
private String serveur, nombdd, user, mdp;
|
private String serveur, nombdd, user, mdp;
|
||||||
|
|||||||
@@ -1,21 +1,10 @@
|
|||||||
package vue.Formulaire;
|
package vue;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
import javax.swing.*;
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import javax.swing.ButtonGroup;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JRadioButton;
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
import controleur.Cheval;
|
import controleur.Cheval;
|
||||||
import modele.ModeleCheval;
|
import modele.ModeleCheval;
|
||||||
|
|
||||||
@@ -25,7 +14,7 @@ public class FormChevaux extends JPanel implements ActionListener
|
|||||||
String[] formState = { "VISUALISER", "AJOUTER", "SUPPRIMER" };
|
String[] formState = { "VISUALISER", "AJOUTER", "SUPPRIMER" };
|
||||||
String id, nom, sexe, robe, type, race, proprietaire, age, imagecheval = "";
|
String id, nom, sexe, robe, type, race, proprietaire, age, imagecheval = "";
|
||||||
int selection;
|
int selection;
|
||||||
private JComboBox choiceForm = new JComboBox(formState);
|
private JComboBox<String> choiceForm = new JComboBox<>(formState);
|
||||||
private JLabel txtId = new JLabel();
|
private JLabel txtId = new JLabel();
|
||||||
private JTextField txtNom = new JTextField("");
|
private JTextField txtNom = new JTextField("");
|
||||||
private ButtonGroup groupSexe = new ButtonGroup();
|
private ButtonGroup groupSexe = new ButtonGroup();
|
||||||
@@ -42,7 +31,7 @@ public class FormChevaux extends JPanel implements ActionListener
|
|||||||
public FormChevaux()
|
public FormChevaux()
|
||||||
{
|
{
|
||||||
//Configuration des composants
|
//Configuration des composants
|
||||||
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");JLabel lbVide3 = new JLabel("");JLabel lbVide4 = new JLabel("");
|
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");
|
||||||
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
||||||
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
||||||
JLabel lbNom = new JLabel(" Nom :");lbNom.setFont(new Font(lbNom.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbNom = new JLabel(" Nom :");lbNom.setFont(new Font(lbNom.getText(), Font.CENTER_BASELINE, 18));
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
package vue.Formulaire;
|
package vue;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
import javax.swing.*;
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JTextArea;
|
|
||||||
import controleur.Cours;
|
|
||||||
|
|
||||||
public class FormCours extends JPanel
|
public class FormCours extends JPanel
|
||||||
{
|
{
|
||||||
@@ -1,21 +1,10 @@
|
|||||||
package vue.Formulaire;
|
package vue;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
import javax.swing.*;
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import javax.swing.ButtonGroup;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JRadioButton;
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
import controleur.Eleve;
|
import controleur.Eleve;
|
||||||
import modele.ModeleEleve;
|
import modele.ModeleEleve;
|
||||||
|
|
||||||
@@ -25,7 +14,7 @@ public class FormEleves extends JPanel implements ActionListener
|
|||||||
String[] formState = { "VISUALISER", "AJOUTER", "MODIFIER", "SUPPRIMER" };
|
String[] formState = { "VISUALISER", "AJOUTER", "MODIFIER", "SUPPRIMER" };
|
||||||
String record, pseudo, prenom, nom, sexe, adresse, mdp, mail, imageeleve;
|
String record, pseudo, prenom, nom, sexe, adresse, mdp, mail, imageeleve;
|
||||||
int id, privilege, age, galop, selection;
|
int id, privilege, age, galop, selection;
|
||||||
private JComboBox choiceForm = new JComboBox(formState);
|
private JComboBox<String> choiceForm = new JComboBox<>(formState);
|
||||||
private JLabel txtId = new JLabel();
|
private JLabel txtId = new JLabel();
|
||||||
private JLabel txtPrivilege = new JLabel();
|
private JLabel txtPrivilege = new JLabel();
|
||||||
private JLabel txtRecord = new JLabel();
|
private JLabel txtRecord = new JLabel();
|
||||||
@@ -46,7 +35,7 @@ public class FormEleves extends JPanel implements ActionListener
|
|||||||
public FormEleves()
|
public FormEleves()
|
||||||
{
|
{
|
||||||
//Configuration des composants
|
//Configuration des composants
|
||||||
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");JLabel lbVide3 = new JLabel("");JLabel lbVide4 = new JLabel("");
|
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");
|
||||||
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
||||||
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
||||||
JLabel lbPrivilege = new JLabel(" Privilege :");lbPrivilege.setFont(new Font(lbPrivilege.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbPrivilege = new JLabel(" Privilege :");lbPrivilege.setFont(new Font(lbPrivilege.getText(), Font.CENTER_BASELINE, 18));
|
||||||
@@ -1,22 +1,10 @@
|
|||||||
package vue.Formulaire;
|
package vue;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
import javax.swing.*;
|
||||||
import java.awt.GridLayout;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import javax.swing.ButtonGroup;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JPasswordField;
|
|
||||||
import javax.swing.JRadioButton;
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
import controleur.Formateur;
|
import controleur.Formateur;
|
||||||
import modele.ModeleFormateur;
|
import modele.ModeleFormateur;
|
||||||
|
|
||||||
@@ -26,7 +14,7 @@ public class FormFormateurs extends JPanel implements ActionListener
|
|||||||
String[] formState = { "VISUALISER", "AJOUTER", "SUPPRIMER" };
|
String[] formState = { "VISUALISER", "AJOUTER", "SUPPRIMER" };
|
||||||
String login, prenom, nom, sexe, mail, mdp= "";
|
String login, prenom, nom, sexe, mail, mdp= "";
|
||||||
int id, privilege, age, galop, selection;
|
int id, privilege, age, galop, selection;
|
||||||
private JComboBox choiceForm = new JComboBox(formState);
|
private JComboBox<String> choiceForm = new JComboBox<>(formState);
|
||||||
private JLabel txtId = new JLabel();
|
private JLabel txtId = new JLabel();
|
||||||
private JLabel txtLogin = new JLabel();
|
private JLabel txtLogin = new JLabel();
|
||||||
private JLabel txtPrivilege = new JLabel();
|
private JLabel txtPrivilege = new JLabel();
|
||||||
@@ -45,7 +33,7 @@ public class FormFormateurs extends JPanel implements ActionListener
|
|||||||
public FormFormateurs()
|
public FormFormateurs()
|
||||||
{
|
{
|
||||||
//Configuration des composants
|
//Configuration des composants
|
||||||
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");JLabel lbVide3 = new JLabel("");JLabel lbVide4 = new JLabel("");
|
JLabel lbVide1 = new JLabel("");JLabel lbVide2 = new JLabel("");
|
||||||
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
this.setBounds(50, 80, 650, 250);this.setLayout(new GridLayout(0, 2));this.setBackground(new Color(222,220,203));
|
||||||
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbId = new JLabel(" ID :");lbId.setFont(new Font(lbId.getText(), Font.CENTER_BASELINE, 18));
|
||||||
JLabel lbPrivilege = new JLabel(" Privilege :");lbPrivilege.setFont(new Font(lbPrivilege.getText(), Font.CENTER_BASELINE, 18));
|
JLabel lbPrivilege = new JLabel(" Privilege :");lbPrivilege.setFont(new Font(lbPrivilege.getText(), Font.CENTER_BASELINE, 18));
|
||||||
@@ -1,23 +1,11 @@
|
|||||||
package vue;
|
package vue;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.*;
|
||||||
import java.awt.Font;
|
import javax.swing.*;
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JFrame;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JMenu;
|
|
||||||
import javax.swing.JMenuBar;
|
|
||||||
import javax.swing.JMenuItem;
|
|
||||||
import controleur.Gestion;
|
import controleur.Gestion;
|
||||||
import controleur.Formateur;
|
import controleur.Formateur;
|
||||||
import vue.Formulaire.*;
|
|
||||||
import vue.Liste.VueChevaux;
|
|
||||||
import vue.Liste.VueCours;
|
|
||||||
import vue.Liste.VueEleves;
|
|
||||||
import vue.Liste.VueFormateurs;
|
|
||||||
|
|
||||||
public class Generale extends JFrame implements ActionListener
|
public class Generale extends JFrame implements ActionListener
|
||||||
{
|
{
|
||||||
@@ -25,23 +13,16 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
/*VARIABLE*/
|
/*VARIABLE*/
|
||||||
private VueAccueil uneVueAccueil;
|
private VueAccueil uneVueAccueil;
|
||||||
private JMenuBar uneBarre = new JMenuBar();
|
private JMenuBar uneBarre = new JMenuBar();
|
||||||
private JMenu mnFichier = new JMenu("Fichier");
|
|
||||||
private JMenu mnGestion = new JMenu("Gestion");
|
private JMenu mnGestion = new JMenu("Gestion");
|
||||||
private JMenu mnCentre = new JMenu("Centre");
|
private JMenu mnEcurie = new JMenu("Centre");
|
||||||
private JMenuItem itemAccueil = new JMenuItem("Accueil");
|
private JMenuItem itemAccueil = new JMenuItem("Accueil");
|
||||||
|
private JMenuItem itemList = new JMenuItem("List");
|
||||||
private JMenuItem itemQuitter = new JMenuItem("Quitter");
|
private JMenuItem itemQuitter = new JMenuItem("Quitter");
|
||||||
private JMenuItem itemFormsEleves = new JMenuItem("Formulaire pour <20>l<EFBFBD>ves");
|
private JMenuItem itemFormsEleves = new JMenuItem("Formulaire pour <20>l<EFBFBD>ves");
|
||||||
private JMenuItem itemFormsChevaux = new JMenuItem("Formulaire pour chevaux");
|
private JMenuItem itemFormsChevaux = new JMenuItem("Formulaire pour chevaux");
|
||||||
private JMenuItem itemFormsFormateurs = new JMenuItem("Formulaire pour formateurs");
|
private JMenuItem itemFormsFormateurs = new JMenuItem("Formulaire pour formateurs");
|
||||||
private JMenuItem itemFormsCours = new JMenuItem("Formulaire pour cours");
|
private JMenuItem itemFormsCours = new JMenuItem("Formulaire pour cours");
|
||||||
private JMenuItem itemCours = new JMenuItem("Liste des cours");
|
private VueList uneVueList = new VueList();
|
||||||
private JMenuItem itemEleves = new JMenuItem("Liste des <20>l<EFBFBD>ves");
|
|
||||||
private JMenuItem itemChevaux = new JMenuItem("Liste des chevaux");
|
|
||||||
private JMenuItem itemFormateurs= new JMenuItem("Liste des formateurs");
|
|
||||||
private VueEleves uneVueEleve = new VueEleves();
|
|
||||||
private VueCours uneVueCours = new VueCours();
|
|
||||||
private VueChevaux uneVueCheval = new VueChevaux();
|
|
||||||
private VueFormateurs uneVueFormateur = new VueFormateurs();
|
|
||||||
private FormEleves uneFormEleve = new FormEleves();
|
private FormEleves uneFormEleve = new FormEleves();
|
||||||
private FormChevaux uneFormCheval = new FormChevaux();
|
private FormChevaux uneFormCheval = new FormChevaux();
|
||||||
private FormFormateurs uneFormFormateur = new FormFormateurs();
|
private FormFormateurs uneFormFormateur = new FormFormateurs();
|
||||||
@@ -57,27 +38,19 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
this.setResizable(true);
|
this.setResizable(true);
|
||||||
this.uneVueAccueil = new VueAccueil(unFormateur);
|
this.uneVueAccueil = new VueAccueil(unFormateur);
|
||||||
/*BARRE MENU GROUPE*/
|
/*BARRE MENU GROUPE*/
|
||||||
this.uneBarre.add(this.mnFichier);
|
this.uneBarre.add(this.mnEcurie);
|
||||||
this.uneBarre.add(this.mnCentre);
|
|
||||||
this.uneBarre.add(this.mnGestion);
|
this.uneBarre.add(this.mnGestion);
|
||||||
/*BARRE MENU LISTE GROUPE*/
|
/*BARRE MENU LISTE GROUPE*/
|
||||||
this.mnFichier.add(this.itemAccueil);
|
this.mnEcurie.add(this.itemAccueil);
|
||||||
this.mnFichier.add(this.itemQuitter);
|
this.mnEcurie.add(this.itemList);
|
||||||
this.mnCentre.add(this.itemEleves);
|
this.mnEcurie.add(this.itemQuitter);
|
||||||
this.mnCentre.add(this.itemChevaux);
|
|
||||||
this.mnCentre.add(this.itemCours);
|
|
||||||
this.mnCentre.add(this.itemEleves);
|
|
||||||
this.mnCentre.add(this.itemFormateurs);
|
|
||||||
this.mnGestion.add(this.itemFormsEleves);
|
this.mnGestion.add(this.itemFormsEleves);
|
||||||
this.mnGestion.add(this.itemFormsChevaux);
|
this.mnGestion.add(this.itemFormsChevaux);
|
||||||
this.mnGestion.add(this.itemFormsFormateurs);
|
this.mnGestion.add(this.itemFormsFormateurs);
|
||||||
this.mnGestion.add(this.itemFormsCours);
|
this.mnGestion.add(this.itemFormsCours);
|
||||||
this.itemQuitter.addActionListener(this);
|
this.itemQuitter.addActionListener(this);
|
||||||
this.itemAccueil.addActionListener(this);
|
this.itemAccueil.addActionListener(this);
|
||||||
this.itemEleves.addActionListener(this);
|
this.itemList.addActionListener(this);
|
||||||
this.itemChevaux.addActionListener(this);
|
|
||||||
this.itemCours.addActionListener(this);
|
|
||||||
this.itemFormateurs.addActionListener(this);
|
|
||||||
this.itemFormsEleves.addActionListener(this);
|
this.itemFormsEleves.addActionListener(this);
|
||||||
this.itemFormsChevaux.addActionListener(this);
|
this.itemFormsChevaux.addActionListener(this);
|
||||||
this.itemFormsCours.addActionListener(this);
|
this.itemFormsCours.addActionListener(this);
|
||||||
@@ -88,14 +61,11 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
this.add(lbTitre) ;
|
this.add(lbTitre) ;
|
||||||
this.add(uneVueAccueil);
|
this.add(uneVueAccueil);
|
||||||
|
this.add(uneVueList);
|
||||||
this.add(uneFormEleve);
|
this.add(uneFormEleve);
|
||||||
this.add(uneFormCheval);
|
this.add(uneFormCheval);
|
||||||
this.add(uneFormFormateur);
|
this.add(uneFormFormateur);
|
||||||
this.add(uneFormCour);
|
this.add(uneFormCour);
|
||||||
this.add(uneVueCheval);
|
|
||||||
this.add(uneVueEleve);
|
|
||||||
this.add(uneVueCours);
|
|
||||||
this.add(uneVueFormateur);
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
}
|
}
|
||||||
/*ACTION GENERAL APPLI*/
|
/*ACTION GENERAL APPLI*/
|
||||||
@@ -114,10 +84,7 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
uneFormCheval.setVisible(false);
|
uneFormCheval.setVisible(false);
|
||||||
uneFormFormateur.setVisible(false);
|
uneFormFormateur.setVisible(false);
|
||||||
uneFormCour.setVisible(false);
|
uneFormCour.setVisible(false);
|
||||||
uneVueCours.setVisible(false);
|
uneVueList.setVisible(false);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
}
|
||||||
else if (e.getSource()==this.itemFormsEleves) {
|
else if (e.getSource()==this.itemFormsEleves) {
|
||||||
uneVueAccueil.setVisible(false);
|
uneVueAccueil.setVisible(false);
|
||||||
@@ -125,10 +92,7 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
uneFormCheval.setVisible(false);
|
uneFormCheval.setVisible(false);
|
||||||
uneFormFormateur.setVisible(false);
|
uneFormFormateur.setVisible(false);
|
||||||
uneFormCour.setVisible(false);
|
uneFormCour.setVisible(false);
|
||||||
uneVueCours.setVisible(false);
|
uneVueList.setVisible(false);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
}
|
||||||
else if (e.getSource()==this.itemFormsChevaux) {
|
else if (e.getSource()==this.itemFormsChevaux) {
|
||||||
uneVueAccueil.setVisible(false);
|
uneVueAccueil.setVisible(false);
|
||||||
@@ -136,10 +100,7 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
uneFormCheval.setVisible(true);
|
uneFormCheval.setVisible(true);
|
||||||
uneFormFormateur.setVisible(false);
|
uneFormFormateur.setVisible(false);
|
||||||
uneFormCour.setVisible(false);
|
uneFormCour.setVisible(false);
|
||||||
uneVueCours.setVisible(false);
|
uneVueList.setVisible(false);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
}
|
||||||
else if (e.getSource()==this.itemFormsFormateurs) {
|
else if (e.getSource()==this.itemFormsFormateurs) {
|
||||||
uneVueAccueil.setVisible(false);
|
uneVueAccueil.setVisible(false);
|
||||||
@@ -147,10 +108,7 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
uneFormCheval.setVisible(false);
|
uneFormCheval.setVisible(false);
|
||||||
uneFormFormateur.setVisible(true);
|
uneFormFormateur.setVisible(true);
|
||||||
uneFormCour.setVisible(false);
|
uneFormCour.setVisible(false);
|
||||||
uneVueCours.setVisible(false);
|
uneVueList.setVisible(false);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
}
|
||||||
else if (e.getSource()==this.itemFormsCours) {
|
else if (e.getSource()==this.itemFormsCours) {
|
||||||
uneVueAccueil.setVisible(false);
|
uneVueAccueil.setVisible(false);
|
||||||
@@ -158,53 +116,15 @@ public class Generale extends JFrame implements ActionListener
|
|||||||
uneFormCheval.setVisible(false);
|
uneFormCheval.setVisible(false);
|
||||||
uneFormFormateur.setVisible(false);
|
uneFormFormateur.setVisible(false);
|
||||||
uneFormCour.setVisible(true);
|
uneFormCour.setVisible(true);
|
||||||
uneVueCours.setVisible(false);
|
uneVueList.setVisible(false);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
}
|
||||||
else if (e.getSource()==this.itemCours) {
|
else if (e.getSource()==this.itemList) {
|
||||||
uneVueAccueil.setVisible(false);
|
uneVueAccueil.setVisible(false);
|
||||||
uneFormEleve.setVisible(false);
|
uneFormEleve.setVisible(false);
|
||||||
uneFormCheval.setVisible(false);
|
uneFormCheval.setVisible(false);
|
||||||
uneFormFormateur.setVisible(false);
|
uneFormFormateur.setVisible(false);
|
||||||
uneFormCour.setVisible(false);
|
uneFormCour.setVisible(false);
|
||||||
uneVueCours.setVisible(true);
|
uneVueList.setVisible(true);
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
|
||||||
else if (e.getSource()==this.itemEleves) {
|
|
||||||
uneVueAccueil.setVisible(false);
|
|
||||||
uneFormEleve.setVisible(false);
|
|
||||||
uneFormCheval.setVisible(false);
|
|
||||||
uneFormFormateur.setVisible(false);
|
|
||||||
uneFormCour.setVisible(false);
|
|
||||||
uneVueCours.setVisible(false);
|
|
||||||
uneVueEleve.setVisible(true);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(false);
|
|
||||||
}
|
|
||||||
else if (e.getSource()==this.itemChevaux) {
|
|
||||||
uneVueAccueil.setVisible(false);
|
|
||||||
uneFormEleve.setVisible(false);
|
|
||||||
uneFormCheval.setVisible(false);
|
|
||||||
uneFormFormateur.setVisible(false);
|
|
||||||
uneFormCour.setVisible(false);
|
|
||||||
uneVueCours.setVisible(false);
|
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(true);
|
|
||||||
}
|
|
||||||
else if (e.getSource()==this.itemFormateurs) {
|
|
||||||
uneVueAccueil.setVisible(false);
|
|
||||||
uneFormEleve.setVisible(false);
|
|
||||||
uneFormCheval.setVisible(false);
|
|
||||||
uneFormFormateur.setVisible(false);
|
|
||||||
uneFormCour.setVisible(false);
|
|
||||||
uneVueCours.setVisible(false);
|
|
||||||
uneVueEleve.setVisible(false);
|
|
||||||
uneVueCheval.setVisible(false);
|
|
||||||
uneVueFormateur.setVisible(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
package vue.Liste;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JTable;
|
|
||||||
import controleur.Cheval;
|
|
||||||
import modele.ModeleCheval;
|
|
||||||
|
|
||||||
public class VueChevaux extends JPanel implements ActionListener
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = -4880909934785926048L;
|
|
||||||
private JLabel titre = new JLabel(" Liste des Chevaux ");
|
|
||||||
private JTable tableChevaux;
|
|
||||||
public VueChevaux () {
|
|
||||||
this.setBounds(30, 80, 720, 330);
|
|
||||||
this.setLayout(null);
|
|
||||||
this.setBackground(new Color(222,220,203));
|
|
||||||
this.titre.setBounds(250, 0, 300, 50);
|
|
||||||
this.titre.setFont(new Font(this.titre.getText(), Font.CENTER_BASELINE, 20));
|
|
||||||
String titres [] = {"ID", "Nom", "Sexe", "Robe", "Type", "Race", "Propri<EFBFBD>taire", "Age", "Image"};
|
|
||||||
this.tableChevaux = new JTable(this.extraireChevaux(), titres);
|
|
||||||
JScrollPane uneScroll = new JScrollPane(this.tableChevaux);
|
|
||||||
uneScroll.setBounds(10, 50, 700, 270);
|
|
||||||
this.add(this.titre);
|
|
||||||
this.add(uneScroll);
|
|
||||||
this.setVisible(false);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
}
|
|
||||||
//extraire les Chevaux
|
|
||||||
public Object [][] extraireChevaux () {
|
|
||||||
ArrayList <Cheval> lesChevaux = ModeleCheval.selectAll();
|
|
||||||
Object [][] donnees = new Object [lesChevaux.size()][9];
|
|
||||||
int i =0;
|
|
||||||
for (Cheval unCheval : lesChevaux) {
|
|
||||||
donnees[i][0] = unCheval.getId();
|
|
||||||
donnees[i][1] = unCheval.getNom();
|
|
||||||
donnees[i][2] = unCheval.getSexe();
|
|
||||||
donnees[i][3] = unCheval.getRobe();
|
|
||||||
donnees[i][4] = unCheval.getType();
|
|
||||||
donnees[i][5] = unCheval.getRace();
|
|
||||||
donnees[i][6] = unCheval.getProprietaire();
|
|
||||||
donnees[i][7] = unCheval.getAge();
|
|
||||||
donnees[i][8] = unCheval.getImage();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return donnees;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package vue.Liste;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JTable;
|
|
||||||
import controleur.Cours;
|
|
||||||
import modele.ModeleCours;
|
|
||||||
|
|
||||||
public class VueCours extends JPanel implements ActionListener
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 8159114212204714346L;
|
|
||||||
private JLabel titre = new JLabel(" Liste des Cours ");
|
|
||||||
private JTable tableCours;
|
|
||||||
public VueCours ()
|
|
||||||
{
|
|
||||||
this.setBounds(30, 80, 720, 330);
|
|
||||||
this.setLayout(null);
|
|
||||||
this.setBackground(new Color(222,220,203));
|
|
||||||
this.titre.setBounds(250, 0, 300, 50);
|
|
||||||
this.add(this.titre);
|
|
||||||
this.titre.setFont(new Font(this.titre.getText(), Font.CENTER_BASELINE, 20));
|
|
||||||
String titres [] = {"ID du cours", "Date du cours", "D<EFBFBD>but <20>", "Fin <20>","Nombre <20>l<EFBFBD>ves"};
|
|
||||||
this.tableCours = new JTable(this.extraireCours(), titres);
|
|
||||||
JScrollPane uneScroll = new JScrollPane(this.tableCours);
|
|
||||||
uneScroll.setBounds(10, 50, 700, 270);
|
|
||||||
this.add(uneScroll);
|
|
||||||
|
|
||||||
this.setVisible(false);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
}
|
|
||||||
//Extraire les Cours
|
|
||||||
public Object [][] extraireCours ()
|
|
||||||
{
|
|
||||||
ArrayList <Cours> lesCours = ModeleCours.selectAll();
|
|
||||||
Object [][] donnees = new Object [lesCours.size()][5];
|
|
||||||
int i =0;
|
|
||||||
for (Cours unCours : lesCours)
|
|
||||||
{
|
|
||||||
donnees[i][0] = unCours.getIdCours();
|
|
||||||
donnees[i][1] = unCours.getDateCours();
|
|
||||||
donnees[i][2] = unCours.getHeureDebut();
|
|
||||||
donnees[i][3] = unCours.getHeureFin();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return donnees;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package vue.Liste;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JTable;
|
|
||||||
import controleur.Eleve;
|
|
||||||
import modele.ModeleEleve;
|
|
||||||
|
|
||||||
public class VueEleves extends JPanel implements ActionListener
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = -3553328743149224396L;
|
|
||||||
private JLabel titre = new JLabel(" Liste des <20>l<EFBFBD>ves ");
|
|
||||||
private JTable tableEleves;
|
|
||||||
public VueEleves () {
|
|
||||||
this.setBounds(30, 80, 720, 330);
|
|
||||||
this.setLayout(null);
|
|
||||||
this.setBackground(new Color(222,220,203));
|
|
||||||
this.titre.setBounds(250, 0, 300, 50);
|
|
||||||
this.add(this.titre);
|
|
||||||
this.titre.setFont(new Font(this.titre.getText(), Font.CENTER_BASELINE, 20));
|
|
||||||
String titres [] = {"ID", "Privilege", "Record", "Pseudo", "Pr<EFBFBD>nom", "Nom", "Sexe", "<EFBFBD>ge", "Adresse", "MDP", "Email", "Galop", "Image"};
|
|
||||||
this.tableEleves = new JTable(this.extraireEleves(), titres);
|
|
||||||
JScrollPane uneScroll = new JScrollPane(this.tableEleves);
|
|
||||||
uneScroll.setBounds(10, 50, 700, 270);
|
|
||||||
this.add(uneScroll);
|
|
||||||
this.setVisible(false);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
}
|
|
||||||
//extraire les Eleves
|
|
||||||
public Object [][] extraireEleves () {
|
|
||||||
ArrayList <Eleve> lesEleves = ModeleEleve.selectAll();
|
|
||||||
Object [][] donnees = new Object [lesEleves.size()][13];
|
|
||||||
int i =0;
|
|
||||||
for (Eleve unEleve : lesEleves) {
|
|
||||||
donnees[i][0] = unEleve.getId();
|
|
||||||
donnees[i][1] = unEleve.getPrivilege();
|
|
||||||
donnees[i][2] = unEleve.getRecord();
|
|
||||||
donnees[i][3] = unEleve.getPseudo();
|
|
||||||
donnees[i][4] = unEleve.getPrenom();
|
|
||||||
donnees[i][5] = unEleve.getNom();
|
|
||||||
donnees[i][6] = unEleve.getSexe();
|
|
||||||
donnees[i][7] = unEleve.getAge();
|
|
||||||
donnees[i][8] = unEleve.getAdresse();
|
|
||||||
donnees[i][9] = unEleve.getMdp();
|
|
||||||
donnees[i][10] = unEleve.getMail();
|
|
||||||
donnees[i][11] = unEleve.getGalop();
|
|
||||||
donnees[i][12] = unEleve.getImageEleve();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return donnees;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package vue.Liste;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JScrollPane;
|
|
||||||
import javax.swing.JTable;
|
|
||||||
import controleur.Formateur;
|
|
||||||
import modele.ModeleFormateur;
|
|
||||||
|
|
||||||
public class VueFormateurs extends JPanel implements ActionListener
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 7809272439139152072L;
|
|
||||||
private JLabel titre = new JLabel(" Liste des Formateurs ");
|
|
||||||
private JTable tableFormateurs;
|
|
||||||
public VueFormateurs ()
|
|
||||||
{
|
|
||||||
this.setBounds(30, 80, 720, 330);
|
|
||||||
this.setLayout(null);
|
|
||||||
this.setBackground(new Color(222,220,203));
|
|
||||||
this.titre.setBounds(250, 0, 300, 50);
|
|
||||||
this.titre.setFont(new Font(this.titre.getText(), Font.CENTER_BASELINE, 20));
|
|
||||||
String titres [] = {"ID","Login", "Privilege", "Pr<EFBFBD>nom", "Nom", "Age", "Galop", "Sexe", "Email", "MDP"};
|
|
||||||
this.tableFormateurs = new JTable(this.extraireFormateurs(), titres);
|
|
||||||
JScrollPane uneScroll = new JScrollPane(this.tableFormateurs);
|
|
||||||
uneScroll.setBounds(10, 50, 700, 270);
|
|
||||||
this.add(this.titre);
|
|
||||||
this.add(uneScroll);
|
|
||||||
this.setVisible(false);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
}
|
|
||||||
//extraire les Formateurs
|
|
||||||
public Object [][] extraireFormateurs () {
|
|
||||||
ArrayList <Formateur> lesFormateurs = ModeleFormateur.selectAll();
|
|
||||||
Object [][] donnees = new Object [lesFormateurs.size()][10];
|
|
||||||
int i =0;
|
|
||||||
for (Formateur unFormateur : lesFormateurs)
|
|
||||||
{
|
|
||||||
donnees[i][0] = unFormateur.getId();
|
|
||||||
donnees[i][1] = unFormateur.getLogin();
|
|
||||||
donnees[i][2] = unFormateur.getPrivilege();
|
|
||||||
donnees[i][3] = unFormateur.getPrenom();
|
|
||||||
donnees[i][4] = unFormateur.getNom();
|
|
||||||
donnees[i][5] = unFormateur.getAge();
|
|
||||||
donnees[i][6] = unFormateur.getGalop();
|
|
||||||
donnees[i][7] = unFormateur.getSexe();
|
|
||||||
donnees[i][8] = unFormateur.getMail();
|
|
||||||
donnees[i][9] = unFormateur.getMdp();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return donnees;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
177
src/vue/VueList.java
Normal file
177
src/vue/VueList.java
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
package vue;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import controleur.Cheval;
|
||||||
|
import controleur.Cours;
|
||||||
|
import controleur.Eleve;
|
||||||
|
import controleur.Formateur;
|
||||||
|
import modele.ModeleCheval;
|
||||||
|
import modele.ModeleCours;
|
||||||
|
import modele.ModeleEleve;
|
||||||
|
import modele.ModeleFormateur;
|
||||||
|
|
||||||
|
public class VueList extends JPanel implements ActionListener
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = -3553328743149224396L;
|
||||||
|
private JTabbedPane onglets = new JTabbedPane(SwingConstants.TOP);
|
||||||
|
private JPanel elevesTab = new JPanel();
|
||||||
|
private JPanel formateursTab = new JPanel();
|
||||||
|
private JPanel chevauxTab = new JPanel();
|
||||||
|
private JPanel coursTab = new JPanel();
|
||||||
|
private JLabel titreEleve = new JLabel(" Liste des <20>l<EFBFBD>ves ");
|
||||||
|
private JTable tableEleves;
|
||||||
|
private JLabel titreFormateur= new JLabel(" Liste des Formateurs ");
|
||||||
|
private JTable tableFormateurs;
|
||||||
|
private JLabel titreCheval = new JLabel(" Liste des Chevaux ");
|
||||||
|
private JTable tableChevaux;
|
||||||
|
private JLabel titreCour = new JLabel(" Liste des Cours ");
|
||||||
|
private JTable tableCours;
|
||||||
|
public VueList () {
|
||||||
|
this.setBounds(30, 80, 720, 330);
|
||||||
|
this.setBackground(new Color(222,220,203));
|
||||||
|
this.add(onglets);
|
||||||
|
onglets.setOpaque(true);
|
||||||
|
onglets.setPreferredSize(new Dimension(700, 300));
|
||||||
|
//Tab1
|
||||||
|
onglets.addTab("Liste Eleves", elevesTab);
|
||||||
|
elevesTab.setBounds(30, 80, 720, 330);
|
||||||
|
elevesTab.setLayout(null);
|
||||||
|
elevesTab.setBackground(new Color(222,220,203));
|
||||||
|
this.titreEleve.setBounds(250, 0, 300, 50);
|
||||||
|
this.titreEleve.setFont(new Font(this.titreEleve.getText(), Font.CENTER_BASELINE, 20));
|
||||||
|
String titresEleve [] = {"ID", "Privilege", "Record", "Pseudo", "Pr<EFBFBD>nom", "Nom", "Sexe", "<EFBFBD>ge", "Adresse", "MDP", "Email", "Galop", "Image"};
|
||||||
|
this.tableEleves = new JTable(this.extraireEleves(), titresEleve);
|
||||||
|
JScrollPane uneScrollEleve = new JScrollPane(this.tableEleves);
|
||||||
|
uneScrollEleve.setBounds(10, 50, 670, 200);
|
||||||
|
elevesTab.add(this.titreEleve);
|
||||||
|
elevesTab.add(uneScrollEleve);
|
||||||
|
//Tab2
|
||||||
|
onglets.addTab("Liste Formateurs", formateursTab);
|
||||||
|
formateursTab.setBounds(30, 80, 720, 330);
|
||||||
|
formateursTab.setLayout(null);
|
||||||
|
formateursTab.setBackground(new Color(222,220,203));
|
||||||
|
this.titreFormateur.setBounds(250, 0, 300, 50);
|
||||||
|
this.titreFormateur.setFont(new Font(this.titreFormateur.getText(), Font.CENTER_BASELINE, 20));
|
||||||
|
String titresFormateur [] = {"ID","Login", "Privilege", "Pr<EFBFBD>nom", "Nom", "Age", "Galop", "Sexe", "Email", "MDP"};
|
||||||
|
this.tableFormateurs = new JTable(this.extraireFormateurs(), titresFormateur);
|
||||||
|
JScrollPane uneScrollFormateur = new JScrollPane(this.tableFormateurs);
|
||||||
|
uneScrollFormateur.setBounds(10, 50, 670, 200);
|
||||||
|
formateursTab.add(this.titreFormateur);
|
||||||
|
formateursTab.add(uneScrollFormateur);
|
||||||
|
//Tab3
|
||||||
|
onglets.addTab("Liste Chevaux", chevauxTab);
|
||||||
|
chevauxTab.setBounds(30, 80, 720, 330);
|
||||||
|
chevauxTab.setLayout(null);
|
||||||
|
chevauxTab.setBackground(new Color(222,220,203));
|
||||||
|
this.titreCheval.setBounds(250, 0, 300, 50);
|
||||||
|
this.titreCheval.setFont(new Font(this.titreCheval.getText(), Font.CENTER_BASELINE, 20));
|
||||||
|
String titresCheval [] = {"ID", "Nom", "Sexe", "Robe", "Type", "Race", "Propri<EFBFBD>taire", "Age", "Image"};
|
||||||
|
this.tableChevaux = new JTable(this.extraireChevaux(), titresCheval);
|
||||||
|
JScrollPane uneScrollCheval = new JScrollPane(this.tableChevaux);
|
||||||
|
uneScrollCheval.setBounds(10, 50, 670, 200);
|
||||||
|
chevauxTab.add(this.titreCheval);
|
||||||
|
chevauxTab.add(uneScrollCheval);
|
||||||
|
//Tab4
|
||||||
|
onglets.addTab("Liste Cours", coursTab);
|
||||||
|
coursTab.setBounds(30, 80, 720, 330);
|
||||||
|
coursTab.setLayout(null);
|
||||||
|
coursTab.setBackground(new Color(222,220,203));
|
||||||
|
this.titreCour.setBounds(250, 0, 300, 50);
|
||||||
|
this.titreCour.setFont(new Font(this.titreCour.getText(), Font.CENTER_BASELINE, 20));
|
||||||
|
String titresCour [] = {"ID du cours", "Date du cours", "D<EFBFBD>but <20>", "Fin <20>","Nombre <20>l<EFBFBD>ves"};
|
||||||
|
this.tableCours = new JTable(this.extraireCours(), titresCour);
|
||||||
|
JScrollPane uneScrollCour = new JScrollPane(this.tableCours);
|
||||||
|
uneScrollCour.setBounds(10, 50, 670, 200);
|
||||||
|
coursTab.add(this.titreCour);
|
||||||
|
coursTab.add(uneScrollCour);
|
||||||
|
//Fin Tab
|
||||||
|
this.setVisible(false);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
}
|
||||||
|
//extraire les Eleves
|
||||||
|
public Object [][] extraireEleves () {
|
||||||
|
ArrayList <Eleve> lesEleves = ModeleEleve.selectAll();
|
||||||
|
Object [][] donnees = new Object [lesEleves.size()][13];
|
||||||
|
int i =0;
|
||||||
|
for (Eleve unEleve : lesEleves) {
|
||||||
|
donnees[i][0] = unEleve.getId();
|
||||||
|
donnees[i][1] = unEleve.getPrivilege();
|
||||||
|
donnees[i][2] = unEleve.getRecord();
|
||||||
|
donnees[i][3] = unEleve.getPseudo();
|
||||||
|
donnees[i][4] = unEleve.getPrenom();
|
||||||
|
donnees[i][5] = unEleve.getNom();
|
||||||
|
donnees[i][6] = unEleve.getSexe();
|
||||||
|
donnees[i][7] = unEleve.getAge();
|
||||||
|
donnees[i][8] = unEleve.getAdresse();
|
||||||
|
donnees[i][9] = unEleve.getMdp();
|
||||||
|
donnees[i][10] = unEleve.getMail();
|
||||||
|
donnees[i][11] = unEleve.getGalop();
|
||||||
|
donnees[i][12] = unEleve.getImageEleve();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return donnees;
|
||||||
|
}
|
||||||
|
//extraire les Formateurs
|
||||||
|
public Object [][] extraireFormateurs () {
|
||||||
|
ArrayList <Formateur> lesFormateurs = ModeleFormateur.selectAll();
|
||||||
|
Object [][] donnees = new Object [lesFormateurs.size()][10];
|
||||||
|
int i =0;
|
||||||
|
for (Formateur unFormateur : lesFormateurs)
|
||||||
|
{
|
||||||
|
donnees[i][0] = unFormateur.getId();
|
||||||
|
donnees[i][1] = unFormateur.getLogin();
|
||||||
|
donnees[i][2] = unFormateur.getPrivilege();
|
||||||
|
donnees[i][3] = unFormateur.getPrenom();
|
||||||
|
donnees[i][4] = unFormateur.getNom();
|
||||||
|
donnees[i][5] = unFormateur.getAge();
|
||||||
|
donnees[i][6] = unFormateur.getGalop();
|
||||||
|
donnees[i][7] = unFormateur.getSexe();
|
||||||
|
donnees[i][8] = unFormateur.getMail();
|
||||||
|
donnees[i][9] = unFormateur.getMdp();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return donnees;
|
||||||
|
}
|
||||||
|
//extraire les Chevaux
|
||||||
|
public Object [][] extraireChevaux () {
|
||||||
|
ArrayList <Cheval> lesChevaux = ModeleCheval.selectAll();
|
||||||
|
Object [][] donnees = new Object [lesChevaux.size()][9];
|
||||||
|
int i =0;
|
||||||
|
for (Cheval unCheval : lesChevaux) {
|
||||||
|
donnees[i][0] = unCheval.getId();
|
||||||
|
donnees[i][1] = unCheval.getNom();
|
||||||
|
donnees[i][2] = unCheval.getSexe();
|
||||||
|
donnees[i][3] = unCheval.getRobe();
|
||||||
|
donnees[i][4] = unCheval.getType();
|
||||||
|
donnees[i][5] = unCheval.getRace();
|
||||||
|
donnees[i][6] = unCheval.getProprietaire();
|
||||||
|
donnees[i][7] = unCheval.getAge();
|
||||||
|
donnees[i][8] = unCheval.getImage();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return donnees;
|
||||||
|
}
|
||||||
|
//Extraire les Cours
|
||||||
|
public Object [][] extraireCours ()
|
||||||
|
{
|
||||||
|
ArrayList <Cours> lesCours = ModeleCours.selectAll();
|
||||||
|
Object [][] donnees = new Object [lesCours.size()][5];
|
||||||
|
int i =0;
|
||||||
|
for (Cours unCours : lesCours)
|
||||||
|
{
|
||||||
|
donnees[i][0] = unCours.getIdCours();
|
||||||
|
donnees[i][1] = unCours.getDateCours();
|
||||||
|
donnees[i][2] = unCours.getHeureDebut();
|
||||||
|
donnees[i][3] = unCours.getHeureFin();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return donnees;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user