45 lines
1.6 KiB
Java
45 lines
1.6 KiB
Java
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)){
|
|
this.frameModif.dispose();
|
|
this.framePopup.dispose();
|
|
//outils.PrintGrilleBool(this.cetteGrille, this.cetteTaille);
|
|
|
|
PreEcriture precriture = new PreEcriture(this.cetteGrille, this.grilleCellules, this.cetteTaille);
|
|
|
|
ChoixAlgo suite = new ChoixAlgo(this.cetteTaille, this.frameGrille ,this.cetteGrille, this.grilleCellules);
|
|
suite.setUp();
|
|
}
|
|
else if (cet_event.equals(this.Reponses2)){
|
|
this.frameModif.dispose();
|
|
this.framePopup.dispose();
|
|
ChoixAlgo suite = new ChoixAlgo(this.cetteTaille, this.frameGrille, this.cetteGrille, this.grilleCellules);
|
|
suite.setUp();
|
|
}
|
|
}
|
|
} |