-
Notifications
You must be signed in to change notification settings - Fork 0
/
FenetreListener.java
40 lines (32 loc) · 1.06 KB
/
FenetreListener.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
/**
* La classe <code> FenetreListener </code> représente un observateur de fenetre
* @author JUSTINE Yannis, Lucas
*/
public class FenetreListener implements WindowListener{
private Fenetre fenetre;
/**
* Initialise un controleur de fenêtre
* @param f permet d'acceder directement à la fenetre
*/
public FenetreListener(Fenetre f){
this.fenetre = f;
}
public void windowActivated (WindowEvent arg0) {
}
public void windowClosed (WindowEvent arg0) {
}
public void windowClosing (WindowEvent arg0) {
this.fenetre.sauvegarderJeu();
this.fenetre.dispose();
}
public void windowDeactivated (WindowEvent arg0) {
}
public void windowDeiconified (WindowEvent arg0) {
}
public void windowIconified(WindowEvent arg0) {
}
public void windowOpened(WindowEvent arg0) {
}
}