34 lines
944 B
Java
34 lines
944 B
Java
import java.awt.event.*;
|
|
|
|
public class observateurFenetre implements WindowListener{
|
|
private plateau plat;
|
|
public observateurFenetre(plateau plat0){
|
|
this.plat=plat0;
|
|
}
|
|
|
|
public void windowActivated(WindowEvent evenement){
|
|
|
|
} // premier plan
|
|
public void windowClosed(WindowEvent evenement){
|
|
|
|
} // après fermeture
|
|
public void windowClosing(WindowEvent evenement){
|
|
//si la partie n'est pas encore fini
|
|
if(this.plat.etatDeVictoire()==0){
|
|
//on sauvegarde
|
|
this.plat.save();
|
|
}
|
|
} // avant fermeture
|
|
public void windowDeactivated(WindowEvent evenement){
|
|
|
|
} // arrière-plan
|
|
public void windowDeiconified(WindowEvent evenement){
|
|
|
|
} // restauration
|
|
public void windowIconified(WindowEvent evenement){
|
|
|
|
} // minimisation
|
|
public void windowOpened(WindowEvent evenement){
|
|
|
|
} // après ouverture
|
|
} |