Makefile and src
This commit is contained in:
@@ -14,7 +14,7 @@ import java.util.*;
|
||||
*
|
||||
*/
|
||||
|
||||
public class AbstractChangementFactoryNP implements AbstractChangementFactory {
|
||||
public class AbstractChangementFactoryPersistant implements AbstractChangementFactory {
|
||||
|
||||
// l'usine à groupe travaillant en tandem avec cette usine.
|
||||
private AbstractGroupeFactory agf;
|
||||
@@ -27,7 +27,7 @@ public class AbstractChangementFactoryNP implements AbstractChangementFactory {
|
||||
* @param agf l'usine à groupe travaillant en tandem avec cette usine.
|
||||
* @param fenetre la fenetre principale
|
||||
*/
|
||||
public AbstractChangementFactoryNP(AbstractGroupeFactory agf, JFrame fenetre){
|
||||
public AbstractChangementFactoryPersistant(AbstractGroupeFactory agf, JFrame fenetre){
|
||||
Objects.requireNonNull(agf,"On ne peut pas créer une usine à changement dont l'usine à groupe parternaire est null");
|
||||
this.agf=agf;
|
||||
this.fenetre=fenetre;
|
||||
@@ -40,7 +40,7 @@ public class AbstractChangementFactoryNP implements AbstractChangementFactory {
|
||||
* @param fenetre la fenetre principale
|
||||
* @param liste la liste des changements
|
||||
*/
|
||||
public AbstractChangementFactoryNP(AbstractGroupeFactory agf, JFrame fenetre, Set<Changement> liste){
|
||||
public AbstractChangementFactoryPersistant(AbstractGroupeFactory agf, JFrame fenetre, Set<Changement> liste){
|
||||
Objects.requireNonNull(agf,"On ne peut pas créer une usine à changement dont l'usine à groupe parternaire est null");
|
||||
this.agf=agf;
|
||||
this.fenetre=fenetre;
|
@@ -14,7 +14,7 @@ import java.util.*;
|
||||
*
|
||||
*/
|
||||
|
||||
public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
public class AbstractGroupeFactoryPersistant implements AbstractGroupeFactory {
|
||||
|
||||
// la racine (promotion)
|
||||
private Groupe promo;
|
||||
@@ -31,7 +31,7 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
* @param fenetre fenetre principale
|
||||
*
|
||||
*/
|
||||
public AbstractGroupeFactoryNP(JFrame fenetre){
|
||||
public AbstractGroupeFactoryPersistant(JFrame fenetre){
|
||||
this.fenetre=fenetre;
|
||||
this.brain=new HashMap<Integer,Groupe>();
|
||||
this.init();
|
||||
@@ -45,7 +45,7 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
|
||||
* @param min le nombre minimum d'étudiants dans la promotion
|
||||
* @param max le nombre maximum d'étudiants dans la promotion
|
||||
*/
|
||||
public AbstractGroupeFactoryNP(String name, int min, int max, JFrame fenetre){
|
||||
public AbstractGroupeFactoryPersistant(String name, int min, int max, JFrame fenetre){
|
||||
Objects.requireNonNull(name,"On ne peut pas créer une promotion dont le nom est null");
|
||||
this.promo=new GroupeNP(name,min,max);
|
||||
this.fenetre=fenetre;
|
@@ -12,8 +12,8 @@ import fr.iutfbleau.projetIHM2022FI2.API.TypeGroupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Model;
|
||||
import fr.iutfbleau.projetIHM2022FI2.Permanent.Controller.ObservateurFenetre;
|
||||
import fr.iutfbleau.projetIHM2022FI2.Permanent.View.Chargement;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.ETU.View.FenetreEtudiant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.ETU.View.FenetreGroupe;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ModelEtu implements Model{
|
||||
this.fenetre.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
this.fenetre.setMinimumSize(this.fenetre.getSize());
|
||||
Chargement ch=new Chargement(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryNP(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryPersistant(this.fenetre);
|
||||
if(this.promo.getPromotion()==null){
|
||||
this.promo=null;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class ModelEtu implements Model{
|
||||
this.fenEtu=new FenetreEtudiant(null, this.Selected, this);
|
||||
this.changement=null;
|
||||
}else{
|
||||
this.changement=new AbstractChangementFactoryNP(promo, this.fenetre);
|
||||
this.changement=new AbstractChangementFactoryPersistant(promo, this.fenetre);
|
||||
this.fenGr=new FenetreGroupe(this.promo.getPromotion(), this,this.promo.getGroupesOfEtudiant(this.Selected));
|
||||
this.fenEtu=new FenetreEtudiant(this.promo.getPromotion(), this.Selected, this);
|
||||
}
|
||||
|
@@ -9,8 +9,8 @@ import fr.iutfbleau.projetIHM2022FI2.API.Changement;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Etudiant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Groupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.TypeGroupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.PROF.View.FenetreEtudiant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.PROF.View.FenetreGroupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Model;
|
||||
@@ -47,7 +47,7 @@ public class ModelProf implements Model{
|
||||
this.fenetre.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
this.fenetre.setMinimumSize(this.fenetre.getSize());
|
||||
Chargement ch=new Chargement(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryNP(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryPersistant(this.fenetre);
|
||||
if(this.promo.getPromotion()==null){
|
||||
this.promo=null;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class ModelProf implements Model{
|
||||
this.fenEtu=new FenetreEtudiant(null);
|
||||
this.changement=null;
|
||||
}else{
|
||||
this.changement=new AbstractChangementFactoryNP(promo, this.fenetre);
|
||||
this.changement=new AbstractChangementFactoryPersistant(promo, this.fenetre);
|
||||
this.fenGr=new FenetreGroupe(this.promo.getPromotion(), this);
|
||||
this.fenEtu=new FenetreEtudiant(this.promo.getPromotion());
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@ import fr.iutfbleau.projetIHM2022FI2.API.Etudiant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Groupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Model;
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.TypeGroupe;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryNP;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractChangementFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.AbstractGroupeFactoryPersistant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.ROOT.View.FenetreChangement;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.ROOT.View.FenetreEtudiant;
|
||||
import fr.iutfbleau.projetIHM2022FI2.MP.ROOT.View.FenetreGroupe;
|
||||
@@ -53,7 +53,7 @@ public class ModelRoot implements Model{
|
||||
this.fenetre.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
this.fenetre.setMinimumSize(this.fenetre.getSize());
|
||||
Chargement ch=new Chargement(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryNP(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryPersistant(this.fenetre);
|
||||
ch.dispose();
|
||||
this.fenetre.setVisible(true);
|
||||
if(this.promo.getPromotion()==null){
|
||||
@@ -63,7 +63,7 @@ public class ModelRoot implements Model{
|
||||
}else{
|
||||
this.fenGr=new FenetreGroupe(this.promo.getPromotion(), this);
|
||||
this.fenEtu=new FenetreEtudiant(this.promo.getPromotion(), this);
|
||||
this.changement=new AbstractChangementFactoryNP(this.promo, this.fenetre);
|
||||
this.changement=new AbstractChangementFactoryPersistant(this.promo, this.fenetre);
|
||||
}
|
||||
this.panGroupe=new JPanel(new GridLayout(1,1));
|
||||
if(this.promo.getPromotion()!=null){
|
||||
@@ -304,8 +304,8 @@ public class ModelRoot implements Model{
|
||||
@Override
|
||||
public void addPromo(int min, int max, String name, Set<Etudiant> ajout){
|
||||
Chargement ch=new Chargement(this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryNP(name, min, max, this.fenetre);
|
||||
this.changement=new AbstractChangementFactoryNP(this.promo, this.fenetre);
|
||||
this.promo=new AbstractGroupeFactoryPersistant(name, min, max, this.fenetre);
|
||||
this.changement=new AbstractChangementFactoryPersistant(this.promo, this.fenetre);
|
||||
this.fenetre.setVisible(false);
|
||||
for(Etudiant e:ajout){
|
||||
this.addEtudiant(this.promo.getPromotion(), e);
|
||||
|
Reference in New Issue
Block a user