This commit is contained in:
pro.boooooo 2022-11-26 20:34:37 +01:00
parent 044219ec0b
commit f9fb42c899
47 changed files with 23 additions and 23 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,9 @@
package Test;
import API.*;
import MNP.*;
import API.Etudiant;
import API.Groupe;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.JScrollPane;
import java.awt.*;
public class AdminView extends BFrame {
private final ArrayList<Etudiant> e;
@ -38,7 +34,7 @@ public class AdminView extends BFrame {
settings.setPositionY(0);
JButton moveStud = new JButton("Deplacer un etudiant");
moveStud.addActionListener(this.listener);
moveStud.setActionCommand("fi::MoveStudent");
moveStud.setActionCommand("av::MoveStudent");
this.add(moveStud, settings);
this.openBFrame();

View File

@ -169,6 +169,6 @@ public class BFrame extends JFrame {
@Override
public String toString() {
return this.title + ": is opened";
return this.title + ": est ouverte";
}
}

View File

@ -36,7 +36,7 @@ public class Controller implements ActionListener {
int groupeIndex = this.pv.getComboSelectionIndex();
String text = this.pv.getSearchStud();
if (Objects.equals(command, "fi::GetStudList")) {
if(Objects.equals(command, "pv::GetStudList")) {
BFrame frame = new BFrame(
"Liste des eleves",
1,
@ -70,7 +70,7 @@ public class Controller implements ActionListener {
Display(frame, data, titre);
}
else if(Objects.equals(command, "fi::GetListFiltered")) {
else if(Objects.equals(command, "pv::GetListFiltered")) {
BFrame frame = new BFrame(
"Liste des eleves du " + groupeOption,
1,
@ -112,7 +112,7 @@ public class Controller implements ActionListener {
Display(frame, data_final, titre);
}
else if(Objects.equals(command, "fi::SearchStudentPer3Letters")) {
else if(Objects.equals(command, "pv::SearchStudentPer3Letters")) {
if(text.length() < 3 || text == null) {
JOptionPane.showMessageDialog(
this.pv,
@ -171,8 +171,18 @@ public class Controller implements ActionListener {
}
}
}
else if(Objects.equals(command, "av::MoveStudent")) {
}
}
/**
* Pour afficher le JTable
* @param frame La fenetre
* @param data Les donnees des colonnes du tableau
* @param titre Les titres des colonnes
* */
private void Display(BFrame frame, String[][] data, String[] titre) {
JTable liste = new JTable(data, titre) {
public boolean editCellAt(int row, int column, java.util.EventObject e) {

View File

@ -1,29 +1,23 @@
package Test;
import API.*;
import MNP.*;
import API.Etudiant;
import API.Groupe;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.GridBagConstraints;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.sql.SQLException;
import java.util.ArrayList;
public class ProfView extends BFrame {
private final ArrayList<Etudiant> e;
private final ArrayList<Groupe> g;
private JComboBox<String> groupeOption;
private final Controller listener;
private JComboBox<String> groupeOption;
private JTextField text;
public ProfView(ArrayList<Etudiant> e, ArrayList<Groupe> g, Controller listener) {
@ -62,7 +56,7 @@ public class ProfView extends BFrame {
settings.setPositionY(0);
JButton studList = new JButton("Voir la liste des etudiants");
studList.setActionCommand("fi::GetStudList");
studList.setActionCommand("pv::GetStudList");
studList.addActionListener(this.listener);
this.add(studList, settings);
@ -89,7 +83,7 @@ public class ProfView extends BFrame {
settings.setPadding(new Insets(0, 0, 0, 0));
settings.setAnchor(GridBagConstraints.EAST);
JButton confirm = new JButton("Rechercher");
confirm.setActionCommand("fi::GetListFiltered");
confirm.setActionCommand("pv::GetListFiltered");
confirm.addActionListener(this.listener);
this.add(confirm, settings);
@ -119,7 +113,7 @@ public class ProfView extends BFrame {
settings.setAnchor(GridBagConstraints.EAST);
JButton searchTLetters = new JButton("Rechercher");
searchTLetters.addActionListener(this.listener);
searchTLetters.setActionCommand("fi::SearchStudentPer3Letters");
searchTLetters.setActionCommand("pv::SearchStudentPer3Letters");
this.add(searchTLetters, settings);
this.openBFrame();