2023-04-25 11:42:59 +02:00
|
|
|
import java.awt.event.*;
|
|
|
|
import javax.swing.*;
|
|
|
|
|
|
|
|
public class GestionExporter implements ActionListener{
|
|
|
|
|
|
|
|
private String Reponses1="Sauvegarder", Reponses2="Passer";
|
|
|
|
private String cet_event;
|
|
|
|
private boolean[][] cetteGrille;
|
|
|
|
private Cellules[][] grilleCellules;
|
|
|
|
private int cetteTaille;
|
|
|
|
|
|
|
|
private JFrame frameGrille;
|
|
|
|
private JFrame frameModif;
|
|
|
|
private JFrame framePopup;
|
|
|
|
|
|
|
|
public GestionExporter(boolean[][] uneGrille, Cellules[][] uneGrilleCell , int uneTaille, JFrame frameG, JFrame frameM, JFrame frameP){
|
|
|
|
this.cetteGrille=uneGrille;
|
|
|
|
this.cetteTaille=uneTaille;
|
|
|
|
this.grilleCellules=uneGrilleCell;
|
|
|
|
|
|
|
|
this.frameGrille = frameG;
|
|
|
|
this.frameModif = frameM;
|
|
|
|
this.framePopup = frameP;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e){
|
|
|
|
this.cet_event=e.getActionCommand();
|
|
|
|
if (cet_event.equals(this.Reponses1)){
|
2023-04-26 10:54:36 +02:00
|
|
|
this.frameGrille.dispose();
|
|
|
|
this.frameModif.dispose();
|
|
|
|
this.framePopup.dispose();
|
|
|
|
//outils.PrintGrilleBool(this.cetteGrille, this.cetteTaille);
|
|
|
|
PreEcriture precriture = new PreEcriture(this.cetteGrille, this.grilleCellules, this.cetteTaille);
|
2023-04-25 11:42:59 +02:00
|
|
|
}
|
|
|
|
else if (cet_event.equals(this.Reponses2)){
|
|
|
|
this.frameGrille.dispose();
|
|
|
|
this.frameModif.dispose();
|
|
|
|
this.framePopup.dispose();
|
|
|
|
System.out.println("tout a été fermé");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|