Commit b03b5842 authored by Elouane KHOUTH's avatar Elouane KHOUTH
Browse files

Correction fixeListenerCreationFlotte pour respect du mvc

parent 4002f6f8
......@@ -65,7 +65,7 @@ public class MainThread implements Runnable {
fenetre.fixeListenerBoutonFlotteBelgeControleur(new boutonFlotteBelgeControleur(fenetre));
fenetre.fixeListenerChoixFlotte(new ChoixFlotte(fenetre, fleet));
fenetre.fixeListenerCreationFlotte(new AjoutFlotte(fenetre, fenetreConnexion, fleet));
fenetre.fixeListenerCreationFlotte(new AjoutFlotte(fenetre, fenetreConnexion, fleet), new ButtonStyle(fenetre));
fenetre.fixeListenerDefineButtonBorder(new ButtonStyle(fenetre));
fenetre.fixeListenerOnOffSound(new OnOffSound(fenetre));
......
package info1.mvc.vue;
import com.mashape.unirest.http.exceptions.UnirestException;
import info1.mvc.controleurs.boutons.ButtonStyle;
import info1.mvc.vue.customelements.ButtonCell;
import info1.network.BadIdException;
import info1.network.Game;
......@@ -352,7 +351,6 @@ public class FenetreBatailleNavale extends JFrame{
entrerPartie.add(entrerId, BorderLayout.CENTER);
boutonAjoutFlotte.setBorder(null);
boutonAjoutFlotte.addMouseListener(new ButtonStyle(this));
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setPreferredSize(new Dimension(1600,900));
......@@ -429,7 +427,10 @@ public class FenetreBatailleNavale extends JFrame{
/**
* Fixe un listener sur le bouton "Confirmer Flotte"
*/
public void fixeListenerCreationFlotte(ActionListener action) { boutonAjoutFlotte.addActionListener(action); }
public void fixeListenerCreationFlotte(ActionListener action, MouseListener actionM) {
boutonAjoutFlotte.addActionListener(action);
boutonAjoutFlotte.addMouseListener(actionM);
}
/// Fenêtre 2
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment