maj V1.0.6
This commit is contained in:
parent
0706a9114f
commit
a64c140435
base
src
Inscriptions
Windows
gestion_version
importations
outils
resources
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -164,10 +164,38 @@ public class importInscriptionXLS {
|
|||||||
nFormation.setAttribut("Verouillage_Groupe_Projet", "false");
|
nFormation.setAttribut("Verouillage_Groupe_Projet", "false");
|
||||||
nFormation.setAttribut("Verouillage_Tous_Les_Groupes", "false");
|
nFormation.setAttribut("Verouillage_Tous_Les_Groupes", "false");
|
||||||
|
|
||||||
nFormation.setAttribut("pattern_Groupe_Principal", "grp @");
|
nFormation.setAttribut("pattern_Groupe_Principal", "groupe @");
|
||||||
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
||||||
nFormation.setAttribut("aleatoire_Groupe_Principal", "false");
|
nFormation.setAttribut("aleatoire_Groupe_Principal", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_TD", "groupe TD n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_TD", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_LV1", "groupe LV1 n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_LV1", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_LV1", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_LV2", "groupe LV2 n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_LV2", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_LV2", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Informatique", "grp #");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Informatique", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Informatique", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Doc", "grp #");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Doc", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Doc", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Projet", "groupe @");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Projet", "8");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Projet", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_TP", "groupe TP n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_TP", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_TP", "false");
|
||||||
|
|
||||||
nYear.addChild(nFormation);
|
nYear.addChild(nFormation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,6 +569,7 @@ public class Window_demarre extends JFrame {
|
|||||||
private static void affichageImageDeFond() {
|
private static void affichageImageDeFond() {
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
int randomNumber = random.nextInt(commandes.nombreImage) + 1;
|
int randomNumber = random.nextInt(commandes.nombreImage) + 1;
|
||||||
|
|
||||||
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
|
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
|
||||||
Image image = imageIcon.getImage();
|
Image image = imageIcon.getImage();
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.JRadioButton;
|
import javax.swing.JRadioButton;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
import javax.swing.SwingConstants;
|
import javax.swing.SwingConstants;
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.border.EmptyBorder;
|
import javax.swing.border.EmptyBorder;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
@ -40,19 +41,20 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
private JTextField textPattern_Groupe;
|
private JTextField textPattern_Groupe;
|
||||||
private JTextField textNombre_Etudiant_Groupe;
|
private JTextField textNombre_Etudiant_Groupe;
|
||||||
private int nombreEtudiantDansGroupe = 30;
|
private int nombreEtudiantDansGroupe = 30;
|
||||||
|
static JLabel lblAuteurVersion = new JLabel("<html>Pablo Rodriguez - 2023<br>Version "+ commandes.version+"</html>");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the frame.
|
* Create the frame.
|
||||||
*/
|
*/
|
||||||
public Window_genere_groupe(noeud table, String nameGroupe, Window_gestionnaire instance) {
|
public Window_genere_groupe( String nameGroupe, Window_gestionnaire instance) {
|
||||||
initialize(table, nameGroupe, instance);
|
initialize(nameGroupe, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void initialize(noeud table, String nameGroupe,Window_gestionnaire instance) {
|
private void initialize( String nameGroupe,Window_gestionnaire instance) {
|
||||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||||
setBounds(0, 0, 863, 534);
|
setBounds(0, 0, 863, 534);
|
||||||
setTitle("Générer des groupes");
|
setTitle("Générer des groupes");
|
||||||
@ -67,50 +69,39 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
contentPane.setLayout(null);
|
contentPane.setLayout(null);
|
||||||
getContentPane().setLayout(null);
|
getContentPane().setLayout(null);
|
||||||
|
|
||||||
noeud nFormation = commandes.nBase.getChild(table.getAttributes("Formation"));
|
noeud nFormation = commandes.nBase.getChild(instance.getTable().getAttributes("Formation"));
|
||||||
|
|
||||||
boolean verrouillageGroupe = (Boolean.valueOf(nFormation.getAttributes("Verouillage_"+nameGroupe))
|
|
||||||
|| Boolean.valueOf(nFormation.getAttributes("Verouillage_Tous_Les_Groupes"))) ;
|
|
||||||
|
|
||||||
|
|
||||||
JLabel lblInformation = new JLabel("<html><p>La formation est : "+ table.getAttributes("Formation")+"<br>"
|
|
||||||
+ "Le groupe sélectionné est : " + nameGroupe +"<br><hr>"
|
JLabel lblInformation = new JLabel("<html><p>La formation est : "+ nFormation.getName()+"<br>"
|
||||||
+ "<b>Les groupes sont verrouillés</b>.<br>"
|
+ "Le groupe sélectionné est : " + nameGroupe +"</p><hr></html>");
|
||||||
+ "Ce qui signifie que seul les étudiants qui ne sont pas dans des groupes seront placés dans un groupe.</p>\r\n</html>");
|
|
||||||
lblInformation.setVerticalAlignment(SwingConstants.TOP);
|
lblInformation.setVerticalAlignment(SwingConstants.TOP);
|
||||||
|
|
||||||
if(!verrouillageGroupe) {
|
|
||||||
lblInformation = new JLabel("<html><p>La formation est : "+ table.getAttributes("Formation")+"<br>"
|
|
||||||
+ "Le groupe sélectionné est : " + nameGroupe +"<br><hr>"
|
|
||||||
+ "<b><u>AVERTISSEMENT</u> : Les groupes ne sont pas verrouillés</b>.<br>"
|
|
||||||
+ "Ce qui signifie que tous les étudiants auront une attribution dans un groupe.<br>"
|
|
||||||
+ "Y compris ce qui sont déjà dans un groupe.</p>\r\n</html>");
|
|
||||||
}
|
|
||||||
|
|
||||||
lblInformation.setFont(new Font("Tahoma", Font.BOLD, 14));
|
lblInformation.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||||
lblInformation.setBounds(10, 261, 467, 132);
|
lblInformation.setBounds(10, 261, 827, 47);
|
||||||
getContentPane().add(lblInformation);
|
getContentPane().add(lblInformation);
|
||||||
|
|
||||||
JButton btnGenere_Groupe = new JButton("Générer les groupes");
|
JButton btnGenere_Groupe = new JButton("Générer les groupes");
|
||||||
btnGenere_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
btnGenere_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
btnGenere_Groupe.setBounds(493, 396, 344, 80);
|
btnGenere_Groupe.setBounds(487, 396, 350, 80);
|
||||||
getContentPane().add(btnGenere_Groupe);
|
getContentPane().add(btnGenere_Groupe);
|
||||||
|
|
||||||
textPattern_Groupe = new JTextField();
|
textPattern_Groupe = new JTextField();
|
||||||
textPattern_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
textPattern_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
textPattern_Groupe.setBounds(660, 262, 177, 34);
|
textPattern_Groupe.setBounds(170, 321, 177, 34);
|
||||||
getContentPane().add(textPattern_Groupe);
|
getContentPane().add(textPattern_Groupe);
|
||||||
textPattern_Groupe.setColumns(12);
|
textPattern_Groupe.setColumns(12);
|
||||||
textPattern_Groupe.setText(commandes.nBase.getChild(table.getAttributes("Formation")).getAttributes("pattern_"+nameGroupe));
|
textPattern_Groupe.setText(commandes.nBase.getChild(instance.getTable().getAttributes("Formation")).getAttributes("pattern_"+nameGroupe));
|
||||||
|
|
||||||
JLabel lblNewLabel = new JLabel("Pattern du groupe (1)");
|
JLabel lblNewLabel = new JLabel("Pattern du groupe (1)");
|
||||||
lblNewLabel.setFont(new Font("Arial", Font.BOLD, 14));
|
lblNewLabel.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
lblNewLabel.setBounds(487, 261, 163, 34);
|
lblNewLabel.setBounds(10, 320, 163, 34);
|
||||||
getContentPane().add(lblNewLabel);
|
getContentPane().add(lblNewLabel);
|
||||||
|
|
||||||
textNombre_Etudiant_Groupe = new JTextField();
|
textNombre_Etudiant_Groupe = new JTextField();
|
||||||
textNombre_Etudiant_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
textNombre_Etudiant_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
textNombre_Etudiant_Groupe.setBounds(724, 307, 113, 34);
|
textNombre_Etudiant_Groupe.setBounds(724, 321, 113, 34);
|
||||||
getContentPane().add(textNombre_Etudiant_Groupe);
|
getContentPane().add(textNombre_Etudiant_Groupe);
|
||||||
textNombre_Etudiant_Groupe.setColumns(6);
|
textNombre_Etudiant_Groupe.setColumns(6);
|
||||||
textNombre_Etudiant_Groupe.setText(nFormation.getAttributes("nombre_Student_" + nameGroupe));
|
textNombre_Etudiant_Groupe.setText(nFormation.getAttributes("nombre_Student_" + nameGroupe));
|
||||||
@ -148,23 +139,41 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
JLabel lblNombre_Etudiant_Groupe = new JLabel("<html>Nombre maximum d'étudiants<br>dans un groupe</html>");
|
JLabel lblNombre_Etudiant_Groupe = new JLabel("<html>Nombre maximum d'étudiants dans un groupe</html>");
|
||||||
lblNombre_Etudiant_Groupe.setVerticalAlignment(SwingConstants.TOP);
|
|
||||||
lblNombre_Etudiant_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
lblNombre_Etudiant_Groupe.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
lblNombre_Etudiant_Groupe.setBounds(487, 305, 248, 40);
|
lblNombre_Etudiant_Groupe.setBounds(382, 318, 332, 36);
|
||||||
getContentPane().add(lblNombre_Etudiant_Groupe);
|
getContentPane().add(lblNombre_Etudiant_Groupe);
|
||||||
|
|
||||||
JLabel lblNewLabel_1 = new JLabel("<html>(1) - Si le caractère @ ou # n'est pas présent alors pattern fixe.<br><br>@ : correspond à une lettre de A à Z<br># : correspond à un nombre de 1 à 100</html>");
|
JLabel lblNewLabel_1 = new JLabel("<html>(1) - Si le caractère @ ou # n'est pas présent alors pattern fixe.<br><br>@ : correspond à une lettre de A à Z<br># : correspond à un nombre de 1 à 100</html>");
|
||||||
lblNewLabel_1.setForeground(Color.BLUE);
|
lblNewLabel_1.setForeground(Color.BLUE);
|
||||||
lblNewLabel_1.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 14));
|
lblNewLabel_1.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 14));
|
||||||
lblNewLabel_1.setVerticalAlignment(SwingConstants.TOP);
|
lblNewLabel_1.setVerticalAlignment(SwingConstants.TOP);
|
||||||
lblNewLabel_1.setBounds(10, 396, 441, 100);
|
lblNewLabel_1.setBounds(10, 376, 441, 100);
|
||||||
getContentPane().add(lblNewLabel_1);
|
getContentPane().add(lblNewLabel_1);
|
||||||
|
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
int randomNumber = random.nextInt(commandes.nombreImage) + 1;
|
int randomNumber = random.nextInt(commandes.nombreImage) + 1;
|
||||||
|
|
||||||
|
lblAuteurVersion = new JLabel("<html>Pablo Rodriguez - 2023<br>Version "+ commandes.version+"</html>");
|
||||||
|
lblAuteurVersion.setVerticalAlignment(SwingConstants.TOP);
|
||||||
|
lblAuteurVersion.setHorizontalAlignment(SwingConstants.LEFT);
|
||||||
|
lblAuteurVersion.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||||
|
lblAuteurVersion.setForeground(new Color(255, 255, 255));
|
||||||
|
lblAuteurVersion.setBounds(22, 11, 344, 87);
|
||||||
|
if(randomNumber==7
|
||||||
|
|| randomNumber==10 || randomNumber==11 || randomNumber==12
|
||||||
|
|| randomNumber==14 || randomNumber==18 || randomNumber==21
|
||||||
|
|| randomNumber==22 || randomNumber==23 || randomNumber==25
|
||||||
|
|| randomNumber==27 || randomNumber==28
|
||||||
|
) {
|
||||||
|
lblAuteurVersion.setForeground(new Color(0, 0, 0));
|
||||||
|
}else {
|
||||||
|
lblAuteurVersion.setForeground(new Color(255, 255, 255));
|
||||||
|
}
|
||||||
|
getContentPane().add(lblAuteurVersion);
|
||||||
|
|
||||||
|
|
||||||
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
|
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
|
||||||
|
|
||||||
Image image = imageIcon.getImage();
|
Image image = imageIcon.getImage();
|
||||||
@ -182,42 +191,91 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
lblImage.setBounds(0, 0, 847, 260);
|
lblImage.setBounds(0, 0, 847, 260);
|
||||||
getContentPane().add(lblImage);
|
getContentPane().add(lblImage);
|
||||||
|
|
||||||
JRadioButton rdbtnAleatoire = new JRadioButton("Aléatoire");
|
JRadioButton rdbtnAleatoire = new JRadioButton("Ordre aléatoire");
|
||||||
rdbtnAleatoire.setFont(new Font("Arial", Font.BOLD, 14));
|
rdbtnAleatoire.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
rdbtnAleatoire.setSelected(true);
|
rdbtnAleatoire.setBounds(487, 366, 167, 23);
|
||||||
rdbtnAleatoire.setBounds(483, 352, 109, 23);
|
|
||||||
getContentPane().add(rdbtnAleatoire);
|
getContentPane().add(rdbtnAleatoire);
|
||||||
|
|
||||||
|
|
||||||
JRadioButton rdbtnAlphabetique = new JRadioButton("Alphabétique");
|
JRadioButton rdbtnAlphabetique = new JRadioButton("Ordre alphabétique");
|
||||||
|
rdbtnAlphabetique.setSelected(true);
|
||||||
rdbtnAlphabetique.setFont(new Font("Arial", Font.BOLD, 14));
|
rdbtnAlphabetique.setFont(new Font("Arial", Font.BOLD, 14));
|
||||||
rdbtnAlphabetique.setBounds(594, 352, 143, 23);
|
rdbtnAlphabetique.setBounds(670, 366, 167, 23);
|
||||||
getContentPane().add(rdbtnAlphabetique);
|
getContentPane().add(rdbtnAlphabetique);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rdbtnAlphabetique.addActionListener(new ActionListener() {
|
rdbtnAlphabetique.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
rdbtnAleatoire.setEnabled(!rdbtnAlphabetique.isSelected());
|
rdbtnAleatoire.setSelected(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
rdbtnAleatoire.addActionListener(new ActionListener() {
|
rdbtnAleatoire.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
rdbtnAlphabetique.setEnabled(!rdbtnAleatoire.isSelected());
|
rdbtnAlphabetique.setSelected(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
btnGenere_Groupe.addActionListener(new ActionListener() {
|
btnGenere_Groupe.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
boolean verrouillageGroupe = false;
|
||||||
|
switch (nameGroupe) {
|
||||||
|
case "Groupe_Principal":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_Principal || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_TD":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_TD || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_LV1":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_LV1 || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_LV2":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_LV2 || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_Informatique":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_Informatique || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_Doc":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_Documentation || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_Projet":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_Projet || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
case "Groupe_TP":
|
||||||
|
verrouillageGroupe = instance.verouillage_Groupe_TP || instance.verouillage_Tous_Les_Groupes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!verrouillageGroupe) {
|
if(!verrouillageGroupe) {
|
||||||
int choice = showCustomDialog();
|
int choice = showCustomDialog();
|
||||||
if (choice == JOptionPane.YES_OPTION) {
|
if (choice == JOptionPane.YES_OPTION) {
|
||||||
if(rdbtnAleatoire.isSelected()) generateAleatoireGroupe(table, nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()));
|
if(rdbtnAleatoire.isSelected()) {
|
||||||
if(rdbtnAlphabetique.isSelected()) generateAlphabetiqueGroupe(table, nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()));
|
generateAleatoireGroupe(nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()),verrouillageGroupe);
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
if(rdbtnAlphabetique.isSelected()) {
|
||||||
|
generateAlphabetiqueGroupe(nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()),verrouillageGroupe);
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if(rdbtnAleatoire.isSelected()) generateAleatoireGroupe(table, nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()));
|
if(rdbtnAleatoire.isSelected()) {
|
||||||
if(rdbtnAlphabetique.isSelected()) generateAlphabetiqueGroupe(table, nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()));
|
generateAleatoireGroupe(nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()),verrouillageGroupe);
|
||||||
|
}
|
||||||
|
if(rdbtnAlphabetique.isSelected()) {
|
||||||
|
generateAlphabetiqueGroupe(nameGroupe, instance, textPattern_Groupe.getText(), Integer.parseInt(textNombre_Etudiant_Groupe.getText()),verrouillageGroupe);
|
||||||
|
}
|
||||||
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -235,35 +293,33 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
* @param patternGroupe
|
* @param patternGroupe
|
||||||
* @param tailleDesGroupes
|
* @param tailleDesGroupes
|
||||||
*/
|
*/
|
||||||
private static void generateAleatoireGroupe(noeud table, String nameGroupe,Window_gestionnaire instance, String patternGroupe, Integer tailleDesGroupes) {
|
private static void generateAleatoireGroupe(String nameGroupe,Window_gestionnaire instance, String patternGroupe, Integer tailleDesGroupes,boolean verrouillageGroupe) {
|
||||||
noeud nFormation = commandes.nBase.getChild(table.getAttributes("Formation"));
|
noeud nFormation = commandes.nBase.getChild(instance.getTable().getAttributes("Formation"));
|
||||||
|
int compteurEtudiantInsereDansGroupe=0;
|
||||||
List<noeud> tableChild = table.getChildren();
|
List<noeud> tableChild = instance.getTable().getChildren();
|
||||||
|
|
||||||
int totalElements = tableChild.size();
|
int totalElements = tableChild.size();
|
||||||
int nombreDeGroupes = (int) Math.ceil((double) totalElements / tailleDesGroupes);
|
int nombreDeGroupes = (int) Math.ceil((double) totalElements / tailleDesGroupes);
|
||||||
|
|
||||||
boolean verrouillageGroupe = (Boolean.valueOf(nFormation.getAttributes("Verouillage_"+nameGroupe))
|
|
||||||
|| Boolean.valueOf(nFormation.getAttributes("Verouillage_Tous_Les_Groupes"))) ;
|
|
||||||
|
|
||||||
|
|
||||||
nFormation.setAttribut("pattern_"+nameGroupe, patternGroupe);
|
nFormation.setAttribut("pattern_"+nameGroupe, patternGroupe);
|
||||||
nFormation.setAttribut("nombre_Student_"+nameGroupe,String.valueOf(tailleDesGroupes));
|
nFormation.setAttribut("nombre_Student_"+nameGroupe,String.valueOf(tailleDesGroupes));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tailleDesGroupes = tailleDesGroupes-1;
|
|
||||||
|
|
||||||
if(patternGroupe.contains("@")) {
|
if(patternGroupe.contains("@")) {
|
||||||
patternGroupe = patternGroupe.replaceAll("@", "");
|
String patternCopy = new String(patternGroupe);
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
String str = "";
|
String caractere = "A";
|
||||||
|
String str = patternCopy.replaceAll("@", caractere);
|
||||||
|
|
||||||
for (noeud child : tableChild) {
|
for (noeud child : tableChild) {
|
||||||
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
||||||
do {
|
do {
|
||||||
char randomChar = (char) ('A' + random.nextInt(nombreDeGroupes));
|
char randomChar = (char) ('A' + random.nextInt(nombreDeGroupes));
|
||||||
str = patternGroupe + randomChar;
|
caractere = String.valueOf(randomChar);
|
||||||
}while(nFormation.getNumberAttribut(nameGroupe, str)>tailleDesGroupes);
|
patternCopy = new String(patternGroupe);
|
||||||
|
str = patternCopy.replaceAll("@", caractere);
|
||||||
|
}while(nFormation.getNumberAttribut(nameGroupe, str)>=tailleDesGroupes);
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -278,7 +334,8 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
do {
|
do {
|
||||||
int randomInteger = (1 + random.nextInt(nombreDeGroupes));
|
int randomInteger = (1 + random.nextInt(nombreDeGroupes));
|
||||||
str = patternGroupe + String.valueOf(randomInteger);
|
str = patternGroupe + String.valueOf(randomInteger);
|
||||||
}while(nFormation.getNumberAttribut(nameGroupe, str)>tailleDesGroupes);
|
}while(nFormation.getNumberAttribut(nameGroupe, str)>=tailleDesGroupes);
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,6 +345,7 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
for (noeud child : tableChild) {
|
for (noeud child : tableChild) {
|
||||||
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
||||||
if(nFormation.getNumberAttribut(nameGroupe, patternGroupe)<=tailleDesGroupes+1) {
|
if(nFormation.getNumberAttribut(nameGroupe, patternGroupe)<=tailleDesGroupes+1) {
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, patternGroupe);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, patternGroupe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,38 +354,64 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
instance.majFiltres();
|
instance.majFiltres();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(compteurEtudiantInsereDansGroupe>0) {
|
||||||
|
showCustomMessage(compteurEtudiantInsereDansGroupe,nameGroupe,0);
|
||||||
|
}else {
|
||||||
|
showCustomMessage(compteurEtudiantInsereDansGroupe,nameGroupe,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void generateAlphabetiqueGroupe(noeud table, String nameGroupe, Window_gestionnaire instance, String patternGroupe, Integer tailleDesGroupes) {
|
}
|
||||||
noeud nFormation = commandes.nBase.getChild(table.getAttributes("Formation"));
|
|
||||||
|
|
||||||
List<noeud> tableChild = table.getChildren();
|
/**
|
||||||
|
* Insère les étudiants dans des groupes par ordre alphabétique.
|
||||||
boolean verrouillageGroupe = (Boolean.valueOf(nFormation.getAttributes("Verouillage_"+nameGroupe))
|
* @param nameGroupe
|
||||||
|| Boolean.valueOf(nFormation.getAttributes("Verouillage_Tous_Les_Groupes"))) ;
|
* @param instance
|
||||||
|
* @param patternGroupe
|
||||||
|
* @param tailleDesGroupes
|
||||||
|
* @param verrouillageGroupe
|
||||||
|
*/
|
||||||
|
private static void generateAlphabetiqueGroupe(String nameGroupe, Window_gestionnaire instance, String patternGroupe, Integer tailleDesGroupes, boolean verrouillageGroupe) {
|
||||||
|
noeud nFormation = commandes.nBase.getChild(instance.getTable().getAttributes("Formation"));
|
||||||
|
int compteurEtudiantInsereDansGroupe =0;
|
||||||
|
List<noeud> tableChild = instance.getTable().getChildren();
|
||||||
|
|
||||||
|
|
||||||
|
// ecriture du nouveau pattern et du nombre d'étudiant par groupe
|
||||||
nFormation.setAttribut("pattern_"+nameGroupe, patternGroupe);
|
nFormation.setAttribut("pattern_"+nameGroupe, patternGroupe);
|
||||||
nFormation.setAttribut("nombre_Student_"+nameGroupe,String.valueOf(tailleDesGroupes));
|
nFormation.setAttribut("nombre_Student_"+nameGroupe,String.valueOf(tailleDesGroupes));
|
||||||
|
|
||||||
|
|
||||||
if(patternGroupe.contains("@")) {
|
if(patternGroupe.contains("@")) {
|
||||||
patternGroupe = patternGroupe.replaceAll("@", "");
|
String patternCopy = new String(patternGroupe);
|
||||||
int nombreDeGroupes=0;
|
int nombreDeGroupes=0;
|
||||||
char randomChar = (char) ('A' + nombreDeGroupes);
|
String caractere = "A";
|
||||||
String str = patternGroupe + randomChar;
|
String str = patternCopy.replaceAll("@", caractere);
|
||||||
|
int compteur = 0;
|
||||||
for (noeud child : tableChild) {
|
for (noeud child : tableChild) {
|
||||||
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
//Groupes non verrouillés
|
||||||
|
if(!verrouillageGroupe) {
|
||||||
|
if(compteur==tailleDesGroupes) {
|
||||||
|
compteur = 0;
|
||||||
|
nombreDeGroupes++;
|
||||||
|
caractere = String.valueOf( (char) ('A' + nombreDeGroupes));
|
||||||
|
patternCopy = new String(patternGroupe);
|
||||||
|
str = patternCopy.replaceAll("@", caractere);
|
||||||
|
}
|
||||||
|
compteur++;
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
|
}else if(child.getAttributes(nameGroupe).isEmpty()) {
|
||||||
int nombreGroupeDejaPresent = nFormation.getNumberAttribut(nameGroupe, str);
|
int nombreGroupeDejaPresent = nFormation.getNumberAttribut(nameGroupe, str);
|
||||||
|
|
||||||
if(nombreGroupeDejaPresent>=tailleDesGroupes) {
|
if(nombreGroupeDejaPresent>=tailleDesGroupes) {
|
||||||
do {
|
do {
|
||||||
nombreDeGroupes++;
|
nombreDeGroupes++;
|
||||||
randomChar = (char) ('A' + nombreDeGroupes);
|
caractere = String.valueOf((char) ('A' + nombreDeGroupes));
|
||||||
str = patternGroupe + randomChar;
|
patternCopy = new String(patternGroupe);
|
||||||
}while(nFormation.getNumberAttribut(nameGroupe, str)<tailleDesGroupes);
|
str = patternCopy.replaceAll("@", caractere);
|
||||||
|
}while(nFormation.getNumberAttribut(nameGroupe, str)>=tailleDesGroupes);
|
||||||
}
|
}
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -336,13 +420,28 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
}else if (patternGroupe.contains("#")) {
|
}else if (patternGroupe.contains("#")) {
|
||||||
patternGroupe = patternGroupe.replaceAll("#", "");
|
patternGroupe = patternGroupe.replaceAll("#", "");
|
||||||
int nombreDeGroupes = 1;
|
int nombreDeGroupes = 1;
|
||||||
|
int compteur = 0;
|
||||||
String str = patternGroupe + String.valueOf(nombreDeGroupes);
|
String str = patternGroupe + String.valueOf(nombreDeGroupes);
|
||||||
for (noeud child : tableChild) {
|
for (noeud child : tableChild) {
|
||||||
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
if(verrouillageGroupe) {
|
||||||
if(nFormation.getNumberAttribut(nameGroupe, str)<=tailleDesGroupes) {
|
if(compteur==tailleDesGroupes) {
|
||||||
|
compteur = 0;
|
||||||
nombreDeGroupes++;
|
nombreDeGroupes++;
|
||||||
str = patternGroupe + String.valueOf(nombreDeGroupes);
|
str = patternGroupe + nombreDeGroupes;
|
||||||
};
|
}
|
||||||
|
compteur++;
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
|
}else if(child.getAttributes(nameGroupe).isEmpty()) {
|
||||||
|
int nombreGroupeDejaPresent = nFormation.getNumberAttribut(nameGroupe, str);
|
||||||
|
|
||||||
|
if(nombreGroupeDejaPresent>=tailleDesGroupes) {
|
||||||
|
do {
|
||||||
|
nombreDeGroupes++;
|
||||||
|
str = patternGroupe + nombreDeGroupes;
|
||||||
|
}while(nFormation.getNumberAttribut(nameGroupe, str)>=tailleDesGroupes);
|
||||||
|
}
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -352,6 +451,7 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
for (noeud child : tableChild) {
|
for (noeud child : tableChild) {
|
||||||
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
if(!verrouillageGroupe || child.getAttributes(nameGroupe).isEmpty()) {
|
||||||
if(nFormation.getNumberAttribut(nameGroupe, patternGroupe)<=tailleDesGroupes+1) {
|
if(nFormation.getNumberAttribut(nameGroupe, patternGroupe)<=tailleDesGroupes+1) {
|
||||||
|
compteurEtudiantInsereDansGroupe++;
|
||||||
nFormation.getChild(child.getName()).setAttribut(nameGroupe, patternGroupe);
|
nFormation.getChild(child.getName()).setAttribut(nameGroupe, patternGroupe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -359,8 +459,21 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
sauvegardeXMLBase.save(commandes.nBase,saveType.SANS_MESSAGE,null);
|
sauvegardeXMLBase.save(commandes.nBase,saveType.SANS_MESSAGE,null);
|
||||||
instance.majFiltres();
|
instance.majFiltres();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(compteurEtudiantInsereDansGroupe>0) {
|
||||||
|
showCustomMessage(compteurEtudiantInsereDansGroupe,nameGroupe,0);
|
||||||
|
}else {
|
||||||
|
showCustomMessage(compteurEtudiantInsereDansGroupe,nameGroupe,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Liste des groupes déjà présents.
|
||||||
|
* @param nFormation
|
||||||
|
* @param nameGroupe
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private static Map<String, Integer> listeDesGroupesPresents(noeud nFormation, String nameGroupe){
|
private static Map<String, Integer> listeDesGroupesPresents(noeud nFormation, String nameGroupe){
|
||||||
Map<String, Integer> dictionary = new HashMap<>();
|
Map<String, Integer> dictionary = new HashMap<>();
|
||||||
|
|
||||||
@ -380,6 +493,7 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private static String retourneLeGroupeAvecLeMoinsEtudiant(noeud nFormation, String nameGroupe) {
|
private static String retourneLeGroupeAvecLeMoinsEtudiant(noeud nFormation, String nameGroupe) {
|
||||||
String groupe = null;
|
String groupe = null;
|
||||||
int taille = 10000;
|
int taille = 10000;
|
||||||
@ -395,7 +509,7 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boite de dialogue personnalisable avec une image de danger.
|
* Boite de dialogue personnalisé avec une image de danger.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static int showCustomDialog() {
|
private static int showCustomDialog() {
|
||||||
@ -407,6 +521,27 @@ public class Window_genere_groupe extends JFrame {
|
|||||||
int optionType = JOptionPane.YES_NO_OPTION;
|
int optionType = JOptionPane.YES_NO_OPTION;
|
||||||
Icon icon = new ImageIcon(Window_demarre.class.getResource("/resources/Danger.png"));
|
Icon icon = new ImageIcon(Window_demarre.class.getResource("/resources/Danger.png"));
|
||||||
|
|
||||||
|
return JOptionPane.showOptionDialog(null, message, title, optionType, JOptionPane.QUESTION_MESSAGE, icon, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int showCustomMessage(int nombreEtudiant, String nameGroupe, int codeImage) {
|
||||||
|
String message = "<html>Vous avez inséré "+ String.valueOf(nombreEtudiant) +" étudiants,<br>"
|
||||||
|
+ "dans le " + nameGroupe +"</b></html>";
|
||||||
|
if(nombreEtudiant==0) {
|
||||||
|
message = "<html>Vous n'avez pas inséré d'étudiant,<br>"
|
||||||
|
+ "dans le " + nameGroupe +"</b></html>";
|
||||||
|
}
|
||||||
|
String title = "Message";
|
||||||
|
int optionType = JOptionPane.PLAIN_MESSAGE ;
|
||||||
|
Icon icon = new ImageIcon(Window_demarre.class.getResource("/resources/groupe_student.png"));
|
||||||
|
if(codeImage==1) icon = new ImageIcon(Window_demarre.class.getResource("/resources/erreur.png"));
|
||||||
|
|
||||||
|
// Define the custom font
|
||||||
|
Font customFont = new Font("Arial", Font.BOLD, 14);
|
||||||
|
|
||||||
|
// Set the custom font for the message
|
||||||
|
UIManager.put("OptionPane.messageFont", customFont);
|
||||||
|
|
||||||
return JOptionPane.showOptionDialog(null, message, title, optionType, JOptionPane.QUESTION_MESSAGE, icon, null, null);
|
return JOptionPane.showOptionDialog(null, message, title, optionType, JOptionPane.QUESTION_MESSAGE, icon, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,15 +118,15 @@ public class Window_gestionnaire extends JFrame {
|
|||||||
JCheckBoxMenuItem chckVerouillage_Groupe_Projet = new JCheckBoxMenuItem("Verrouillage Groupe Projet");
|
JCheckBoxMenuItem chckVerouillage_Groupe_Projet = new JCheckBoxMenuItem("Verrouillage Groupe Projet");
|
||||||
JCheckBoxMenuItem chckVerouillage_Groupe_TP= new JCheckBoxMenuItem("Verrouillage Groupe TP");
|
JCheckBoxMenuItem chckVerouillage_Groupe_TP= new JCheckBoxMenuItem("Verrouillage Groupe TP");
|
||||||
|
|
||||||
private boolean verouillage_Groupe_Principal = false;
|
public boolean verouillage_Groupe_Principal = false;
|
||||||
private boolean verouillage_Groupe_TD = false;
|
public boolean verouillage_Groupe_TD = false;
|
||||||
private boolean verouillage_Groupe_TP = false;
|
public boolean verouillage_Groupe_TP = false;
|
||||||
private boolean verouillage_Groupe_Informatique = false;
|
public boolean verouillage_Groupe_Informatique = false;
|
||||||
private boolean verouillage_Groupe_Documentation = false;
|
public boolean verouillage_Groupe_Documentation = false;
|
||||||
private boolean verouillage_Groupe_Projet = false;
|
public boolean verouillage_Groupe_Projet = false;
|
||||||
private boolean verouillage_Groupe_LV1 = false;
|
public boolean verouillage_Groupe_LV1 = false;
|
||||||
private boolean verouillage_Groupe_LV2 = false;
|
public boolean verouillage_Groupe_LV2 = false;
|
||||||
private boolean verouillage_Tous_Les_Groupes = false;
|
public boolean verouillage_Tous_Les_Groupes = false;
|
||||||
|
|
||||||
JTextPane textPaneNom = new JTextPane();
|
JTextPane textPaneNom = new JTextPane();
|
||||||
private boolean ignoreItemStateChange = false;
|
private boolean ignoreItemStateChange = false;
|
||||||
@ -914,7 +914,70 @@ public class Window_gestionnaire extends JFrame {
|
|||||||
menuGenerer_Groupe.add(menuGroupe_Principal);
|
menuGenerer_Groupe.add(menuGroupe_Principal);
|
||||||
menuGroupe_Principal.addActionListener(new ActionListener() {
|
menuGroupe_Principal.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
new Window_genere_groupe(nTable, "Groupe_Principal",instance);
|
new Window_genere_groupe("Groupe_Principal",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_TD = new JMenuItem("Groupe TD");
|
||||||
|
menuGroupe_TD.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_TD);
|
||||||
|
menuGroupe_TD.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_TD",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_LV1 = new JMenuItem("Groupe LV1");
|
||||||
|
menuGroupe_LV1.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_LV1);
|
||||||
|
menuGroupe_LV1.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_LV1",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_LV2 = new JMenuItem("Groupe LV2");
|
||||||
|
menuGroupe_LV2.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_LV2);
|
||||||
|
menuGroupe_LV2.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_LV2",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_Informatique = new JMenuItem("Groupe Informatique");
|
||||||
|
menuGroupe_Informatique.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_Informatique);
|
||||||
|
menuGroupe_Informatique.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_Informatique",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_Documentation = new JMenuItem("Groupe Documentation");
|
||||||
|
menuGroupe_Documentation.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_Documentation);
|
||||||
|
menuGroupe_Documentation.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_Doc",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_Projet = new JMenuItem("Groupe_Projet");
|
||||||
|
menuGroupe_Projet.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_Projet);
|
||||||
|
menuGroupe_Projet.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_Projet",instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JMenuItem menuGroupe_TP = new JMenuItem("Groupe_TP");
|
||||||
|
menuGroupe_TP.setFont(new Font("Arial", Font.BOLD, 16));
|
||||||
|
menuGenerer_Groupe.add(menuGroupe_TP);
|
||||||
|
menuGroupe_TP.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
new Window_genere_groupe("Groupe_TP",instance);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1599,34 +1662,34 @@ public class Window_gestionnaire extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( (key.equals("Groupe_Principal") && (verouillage_Groupe_Principal || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_Principal") && (verouillage_Groupe_Principal || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes Principaux sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes Principaux sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_TD") && (verouillage_Groupe_TD || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_TD") && (verouillage_Groupe_TD || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes des T.D. sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes des T.D. sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_TP") && (verouillage_Groupe_TP || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_TP") && (verouillage_Groupe_TP || verouillage_Tous_Les_Groupes))) {
|
||||||
modificationInterdite=true; JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de TP sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
modificationInterdite=true; JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de TP sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_Informatique") && (verouillage_Groupe_Informatique || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_Informatique") && (verouillage_Groupe_Informatique || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes d'informatiques sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes d'informatiques sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_Doc") && (verouillage_Groupe_Documentation || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_Doc") && (verouillage_Groupe_Documentation || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de documentations sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de documentations sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_Projet") && (verouillage_Groupe_Projet || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_Projet") && (verouillage_Groupe_Projet || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de projets sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de projets sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_LV1") && (verouillage_Groupe_LV1 || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_LV1") && (verouillage_Groupe_LV1 || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de L.V.1 sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de L.V.1 sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
if( (key.equals("Groupe_LV2") && (verouillage_Groupe_LV2 || verouillage_Tous_Les_Groupes))) {
|
if( (key.equals("Groupe_LV2") && (verouillage_Groupe_LV2 || verouillage_Tous_Les_Groupes))) {
|
||||||
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de L.V.2 sont vérouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "<html><h2>Les groupes de L.V.2 sont verrouillés.</h2></html>", "Erreur", JOptionPane.ERROR_MESSAGE);
|
||||||
modificationInterdite=true;
|
modificationInterdite=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1783,7 +1846,9 @@ public class Window_gestionnaire extends JFrame {
|
|||||||
majTable();
|
majTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mise à jour du verrouillage des groupes
|
||||||
|
*/
|
||||||
private void majVerouillageGroupe() {
|
private void majVerouillageGroupe() {
|
||||||
noeud nYears = commandes.nBase.getChild(cYears.getSelectedItem().toString());
|
noeud nYears = commandes.nBase.getChild(cYears.getSelectedItem().toString());
|
||||||
|
|
||||||
@ -2226,4 +2291,12 @@ public class Window_gestionnaire extends JFrame {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne le noeud Table de cette instance.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public noeud getTable() {
|
||||||
|
return nTable;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -419,13 +419,39 @@ public class VersionChecker {
|
|||||||
nFormation.setAttribut("Verouillage_Groupe_Informatique", "false");
|
nFormation.setAttribut("Verouillage_Groupe_Informatique", "false");
|
||||||
nFormation.setAttribut("Verouillage_Groupe_Documentation", "false");
|
nFormation.setAttribut("Verouillage_Groupe_Documentation", "false");
|
||||||
nFormation.setAttribut("Verouillage_Groupe_Projet", "false");
|
nFormation.setAttribut("Verouillage_Groupe_Projet", "false");
|
||||||
nFormation.setAttribut("Verouillage_Tous_Les_Groupes", "false");
|
nFormation.setAttribut("Verouillage_Tous_Les_Groupes", "true");
|
||||||
|
|
||||||
nFormation.setAttribut("pattern_Groupe_Principal", "grp @");
|
nFormation.setAttribut("pattern_Groupe_Principal", "groupe @");
|
||||||
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
||||||
nFormation.setAttribut("aleatoire_Groupe_Principal", "false");
|
nFormation.setAttribut("aleatoire_Groupe_Principal", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_TD", "groupe TD n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Principal", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_TD", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_LV1", "groupe LV1 n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_LV1", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_LV1", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_LV2", "groupe LV2 n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_LV2", "30");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_LV2", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Informatique", "grp #");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Informatique", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Informatique", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Doc", "grp #");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Doc", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Doc", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_Projet", "groupe @");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_Projet", "8");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_Projet", "false");
|
||||||
|
|
||||||
|
nFormation.setAttribut("pattern_Groupe_TP", "groupe TP n°#");
|
||||||
|
nFormation.setAttribut("nombre_Student_Groupe_TP", "24");
|
||||||
|
nFormation.setAttribut("aleatoire_Groupe_TP", "false");
|
||||||
}
|
}
|
||||||
return nBase;
|
return nBase;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,11 @@ public class importAllBaseToExcel {
|
|||||||
if(!cellValue.equals(value) || value.isEmpty()) {
|
if(!cellValue.equals(value) || value.isEmpty()) {
|
||||||
//Si autorisation d'écriture ou si la chaine de caractère dans la base est vide.
|
//Si autorisation d'écriture ou si la chaine de caractère dans la base est vide.
|
||||||
if(autorisationEcriture || value.isEmpty()) {
|
if(autorisationEcriture || value.isEmpty()) {
|
||||||
|
if(!cellValue.equals("supprime")) {
|
||||||
nStudent.setAttribut(sheet.getRow(0).getCell(indexCol).getStringCellValue(), cellValue);
|
nStudent.setAttribut(sheet.getRow(0).getCell(indexCol).getStringCellValue(), cellValue);
|
||||||
|
}else {
|
||||||
|
nStudent.setAttribut(sheet.getRow(0).getCell(indexCol).getStringCellValue(), "");
|
||||||
|
}
|
||||||
compteur++;
|
compteur++;
|
||||||
}else {
|
}else {
|
||||||
// Traitement des erreurs
|
// Traitement des erreurs
|
||||||
|
@ -70,7 +70,7 @@ public class commandes {
|
|||||||
public static boolean enabled_Colonne_Option_5 = true;
|
public static boolean enabled_Colonne_Option_5 = true;
|
||||||
|
|
||||||
// Nombre d'image d'acceuil
|
// Nombre d'image d'acceuil
|
||||||
public static int nombreImage = 37;
|
public static int nombreImage = 40;
|
||||||
|
|
||||||
// Nombre maximal de fichier dans l'archive
|
// Nombre maximal de fichier dans l'archive
|
||||||
public static int nombreMaxSauvegardeArchive = 300;
|
public static int nombreMaxSauvegardeArchive = 300;
|
||||||
|
BIN
src/resources/Sans titre_38.jpg
Normal file
BIN
src/resources/Sans titre_38.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 143 KiB |
BIN
src/resources/Sans titre_39.jpg
Normal file
BIN
src/resources/Sans titre_39.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 47 KiB |
BIN
src/resources/Sans titre_40.jpg
Normal file
BIN
src/resources/Sans titre_40.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 98 KiB |
BIN
src/resources/erreur.png
Normal file
BIN
src/resources/erreur.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 11 KiB |
BIN
src/resources/groupe_student.png
Normal file
BIN
src/resources/groupe_student.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 9.2 KiB |
Loading…
x
Reference in New Issue
Block a user