Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Augustin MERCIER
ProjetS2-2021-10-FS
Commits
b03b5842
Commit
b03b5842
authored
Jun 25, 2021
by
Elouane KHOUTH
Browse files
Correction fixeListenerCreationFlotte pour respect du mvc
parent
4002f6f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/info1/mvc/thread/MainThread.java
View file @
b03b5842
...
...
@@ -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
));
...
...
src/info1/mvc/vue/FenetreBatailleNavale.java
View file @
b03b5842
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
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment