Transférer les fichiers vers 'src/Test'
This commit is contained in:
@@ -22,6 +22,8 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
private AdminView av = null;
|
||||
private BFrame currentModal;
|
||||
|
||||
private MainMenu parent;
|
||||
|
||||
private ArrayList<Etudiant> e;
|
||||
private ArrayList<Groupe> g;
|
||||
|
||||
@@ -30,10 +32,11 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
|
||||
private ArrayList<String> tmpStud;
|
||||
|
||||
public Controller(BDatabase db) {
|
||||
public Controller(BDatabase db, MainMenu frame) {
|
||||
this.db = db;
|
||||
this.e = this.db.getEtuList();
|
||||
this.g = this.db.getGroupeList();
|
||||
parent = frame;
|
||||
|
||||
// Les 3 fenetres s'ouvriront en meme temps (Pour le contexte du projet)
|
||||
//this.pv = new ProfView(this.e, this.g, this);
|
||||
@@ -67,7 +70,7 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
* @param loca_y Localisation en y
|
||||
* @param liste La JTable
|
||||
* */
|
||||
private void Display(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) {
|
||||
private void Display(String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) {
|
||||
JPanel forModal = new JPanel();
|
||||
|
||||
ListSelectionModel lsm = liste.getSelectionModel();
|
||||
@@ -92,7 +95,7 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
* @param loca_y Localisation en y
|
||||
* @param liste La JTable
|
||||
* */
|
||||
private void DisplayWithListner(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) {
|
||||
private void DisplayWithListner(String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) {
|
||||
JPanel forModal = new JPanel();
|
||||
|
||||
ListSelectionModel lsm = liste.getSelectionModel();
|
||||
@@ -104,7 +107,7 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
|
||||
forModal.add(liste);
|
||||
|
||||
BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal);
|
||||
BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, this.parent, forModal);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,8 +121,8 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
* @param loca_y Localisation en y
|
||||
* @param forModal Le panel a mettre dans la fenetre (libre)
|
||||
* */
|
||||
private void DisplayModal(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JPanel forModal) {
|
||||
this.currentModal = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal);
|
||||
private void DisplayModal(String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JPanel forModal) {
|
||||
this.currentModal = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, this.parent, forModal);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -152,7 +155,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
}
|
||||
|
||||
Display(
|
||||
this.pv,
|
||||
"Liste des etudiants",
|
||||
350,
|
||||
400,
|
||||
@@ -190,7 +192,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
}
|
||||
|
||||
Display(
|
||||
this.pv,
|
||||
"Liste d'eleve du " + groupeOption,
|
||||
350,
|
||||
400,
|
||||
@@ -242,7 +243,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
}
|
||||
|
||||
Display(
|
||||
this.pv,
|
||||
"Recherche",
|
||||
350,
|
||||
400,
|
||||
@@ -276,7 +276,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
}
|
||||
|
||||
DisplayWithListner(
|
||||
this.av,
|
||||
"Deplacer un etudiant",
|
||||
350,
|
||||
400,
|
||||
@@ -313,7 +312,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
String[][] stringArray = data.stream().map(u -> u.toArray(new String[0])).toArray(String[][]::new);
|
||||
|
||||
DisplayWithListner(
|
||||
this.av,
|
||||
"Attribuer un groupe a un etudiant",
|
||||
350,
|
||||
400,
|
||||
@@ -420,7 +418,6 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
forModal.add(moveBtn, settings);
|
||||
|
||||
DisplayModal(
|
||||
this.av,
|
||||
"Deplacer l'eleve : "
|
||||
+ tm.getValueAt(cell[0], 0) + " " + tm.getValueAt(cell[0], 1),
|
||||
500,
|
||||
|
Reference in New Issue
Block a user