Amélioration du MVC

This commit is contained in:
2024-04-29 20:06:02 +02:00
parent a18285e0f2
commit a97db16dd2
7 changed files with 69 additions and 35 deletions

View File

@@ -0,0 +1,19 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GMSaverActionListener implements ActionListener {
private Window parentFrame;
private GMGrid grid;
public GMSaverActionListener(Window parentFrame, GMGrid grid) {
this.parentFrame = parentFrame;
this.grid = grid;
}
@Override
public void actionPerformed(ActionEvent e) {
GMSaver gMSaver = new GMSaver(parentFrame, grid);
gMSaver.saveGridIfNeeded();
}
}