SAE21_2022/Modifications.java

38 lines
1.3 KiB
Java
Raw Normal View History

import java.awt.event.*;
2023-04-28 20:24:54 +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 Modifications implements MouseListener {
private PanneauModification unPanel;
private boolean[][] cetteGrille;
private int[] ceTab;
private ModificationsTab change;
public Modifications(PanneauModification panneauModification, boolean[][] grilleTab, int[] unTab){
this.unPanel = panneauModification;
this.cetteGrille = grilleTab;
this.ceTab = unTab;
}
public void mouseClicked(MouseEvent e) {
this.change = new ModificationsTab(this.unPanel, this.cetteGrille, this.ceTab, e);
}
public int[] getGateState(){
//System.out.println("this.ceTab vaut : [0] : "+this.ceTab[0] + " et this.ceTab vaut : [1] :"+this.ceTab[1]);
return this.ceTab;
}
// Les méthodes suivantes ne sont pas utilisées dans cet exemple, donc nous les laissons vides
public void mouseExited(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
}