SAE21_2022/GestionModif.java

38 lines
1.4 KiB
Java
Raw Normal View History

import java.awt.event.*;
import javax.swing.*;
2023-04-28 20:25:34 +02:00
/**
* La class Attente inclu un KeyListener, cette classe a pour objectif d'attendre une entré sur la touche espace du clavier
* pour regarder le parcours qu'emprunte l'algorithme
* @version 1.1
* @author Matthis Fauvet
*/
public class GestionModif implements ActionListener{
private String Reponses1="Quitter", Reponses2="Suivant";
private String cet_event;
private boolean[][] cetteGrille;
private Cellules[][] grilleCellules;
private int cetteTaille;
private JFrame cetteFrameGrille;
private JFrame cetteFrameModif;
public GestionModif(boolean[][] uneGrille, Cellules[][] uneGrilleCell, int uneTaille, JFrame frameGrille, JFrame frameModif){
this.cetteGrille=uneGrille;
this.cetteTaille=uneTaille;
this.grilleCellules=uneGrilleCell;
this.cetteFrameGrille = frameGrille;
this.cetteFrameModif = frameModif;
}
public void actionPerformed(ActionEvent e){
this.cet_event=e.getActionCommand();
if (cet_event.equals(this.Reponses1)){
System.exit(1);
}
else if (cet_event.equals(this.Reponses2)){
Exporter newExport = new Exporter(this.cetteGrille, this.grilleCellules, this.cetteTaille, this.cetteFrameGrille, this.cetteFrameModif);
//outils.PrintGrilleBool(this.cetteGrille, this.cetteTaille);
}
}
}