package fr.iutfbleau.projetIHM2021FI2.Controller;

import java.awt.event.WindowEvent;    
import java.awt.event.WindowListener;

import fr.iutfbleau.projetIHM2021FI2.Model.ConnexionBDD;

/**
 * La classe MainWindowController permet de se déconnecter de la base de données lorsqu'on ferme la fenêtre.
 *  
 * @version 1.0
 * @author Anice TAJGALT, Gianni MANZARI, Alban DUMAS
 */
public class MainWindowController implements WindowListener {
    public void windowActivated (WindowEvent e) {    
    }    
    
    public void windowClosed (WindowEvent e) {    
    }    
    
    public void windowClosing (WindowEvent e) {    
        ConnexionBDD.getInstance().close();
    }    
    
    public void windowDeactivated (WindowEvent e) {     
    }    
    
    public void windowDeiconified (WindowEvent e) {    
    }    
    
    public void windowIconified(WindowEvent e) {    
    }    
    
    public void windowOpened(WindowEvent e) {    
    }     
}