33 lines
1.0 KiB
Java
33 lines
1.0 KiB
Java
|
import java.awt.event.*;
|
||
|
|
||
|
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) {}
|
||
|
|
||
|
}
|
||
|
|