From 623497dba93d780b61d215ec7508835d3a4a44ed Mon Sep 17 00:00:00 2001 From: Amir Daouadi Date: Thu, 13 Apr 2023 16:10:56 +0200 Subject: [PATCH] Supression menu pour recommencer --- InterfaceMenu/ControleurMenu.java | 20 --------------- InterfaceMenu/Main.java | 6 ----- InterfaceMenu/VueMenu.java | 42 ------------------------------- 3 files changed, 68 deletions(-) delete mode 100644 InterfaceMenu/ControleurMenu.java delete mode 100644 InterfaceMenu/Main.java delete mode 100644 InterfaceMenu/VueMenu.java diff --git a/InterfaceMenu/ControleurMenu.java b/InterfaceMenu/ControleurMenu.java deleted file mode 100644 index 24f179a..0000000 --- a/InterfaceMenu/ControleurMenu.java +++ /dev/null @@ -1,20 +0,0 @@ -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class ControleurMenu { - private VueMenu vue; - - public ControleurMenu(VueMenu vue) { - this.vue = vue; - vue.addChargerGrilleAleatoireListener(new ChargerGrilleAleatoireListener()); - vue.addChargerGrilleExistanteListener(new ChargerGrilleExistanteListener()); - } - class ChargerGrilleAleatoireListener implements ActionListener { - public void actionPerformed(ActionEvent e) { - } - } - class ChargerGrilleExistanteListener implements ActionListener { - public void actionPerformed(ActionEvent e) { - } - } -} diff --git a/InterfaceMenu/Main.java b/InterfaceMenu/Main.java deleted file mode 100644 index a8145ee..0000000 --- a/InterfaceMenu/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - public static void main(String[] args) { - View view = new View(); - ControleurMenu controleur = new ControleurMenu(view); - } - } \ No newline at end of file diff --git a/InterfaceMenu/VueMenu.java b/InterfaceMenu/VueMenu.java deleted file mode 100644 index 584a71e..0000000 --- a/InterfaceMenu/VueMenu.java +++ /dev/null @@ -1,42 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionListener; - -public class VueMenu extends JFrame { - private JPanel panel; - private JLabel label; - private JButton boutonAleatoire; - private JButton boutonExistante; - - public VueMenu() { - this.setTitle("Menu principal"); - this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - this.setResizable(false); - this.setSize(800, 600); - ImageIcon image = new ImageIcon("background.png"); - label = new JLabel("", image, JLabel.CENTER); - label.setBounds(0, 0, 800, 600); - boutonAleatoire = new JButton("Charger une grille aléatoire"); - boutonAleatoire.setBounds(150, 200, 250, 50); - - boutonExistante = new JButton("Charger une grille existante"); - boutonExistante.setBounds(400, 200, 250, 50); - panel = new JPanel(); - panel.setLayout(null); - panel.add(boutonAleatoire); - panel.add(boutonExistante); - panel.add(label); - this.add(panel); - } - - public void afficher() { - this.setVisible(true); - } - public void addChargerGrilleAleatoireListener(ActionListener listener) { - boutonAleatoire.addActionListener(listener); - } - - public void addChargerGrilleExistanteListener(ActionListener listener) { - boutonExistante.addActionListener(listener); - } -}