summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/network
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-18 17:36:09 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-18 17:36:09 +0200
commit297d5de03ef6e9f0c55d461021699dd2d34051f7 (patch)
treeb5b9bdf41309f745f7e0b32609e248cedbeb49c8 /src/jrummikub/control/network
parent00fb313b89b14c04b290e3b3723bbccffc04d9dd (diff)
downloadJRummikub-297d5de03ef6e9f0c55d461021699dd2d34051f7.tar
JRummikub-297d5de03ef6e9f0c55d461021699dd2d34051f7.zip
Move some code to AbstractSettingsControl for consistency
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@466 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/network')
-rw-r--r--src/jrummikub/control/network/NetworkSettingsControl.java32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/jrummikub/control/network/NetworkSettingsControl.java b/src/jrummikub/control/network/NetworkSettingsControl.java
index 41cf5f8..1f6cc3d 100644
--- a/src/jrummikub/control/network/NetworkSettingsControl.java
+++ b/src/jrummikub/control/network/NetworkSettingsControl.java
@@ -28,11 +28,11 @@ public class NetworkSettingsControl extends AbstractSettingsControl {
* Creates a new network settings control
*
* @param nickname
- * to be set as player name
+ * to be set as player name
* @param view
- * for events and handlers
+ * for events and handlers
* @param settings
- * for playerNumber, color...
+ * for playerNumber, color...
*/
public NetworkSettingsControl(String nickname, IView view,
GameSettings settings) {
@@ -40,8 +40,6 @@ public class NetworkSettingsControl extends AbstractSettingsControl {
this.nickname = nickname;
view.getSettingsPanel().setSettingsMode(SettingsMode.NETWORK_SETUP);
- view.getSettingsPanel().setPlayerNamesEditable(
- Collections.<Boolean> emptyList());
addFirstPlayer();
addPlayer();
@@ -56,19 +54,18 @@ public class NetworkSettingsControl extends AbstractSettingsControl {
}
}));
- connections.add(view.getSettingsPanel().getBackEvent()
- .add(new IListener() {
- @Override
- public void handle() {
- abort();
- backEvent.emit();
- }
- }));
+ connections.add(view.getSettingsPanel().getBackEvent().add(new IListener() {
+ @Override
+ public void handle() {
+ abort();
+ backEvent.emit();
+ }
+ }));
}
/**
- * The game offer event is emitted when a player wants to offer a new
- * network game
+ * The game offer event is emitted when a player wants to offer a new network
+ * game
*
* @return the event
*/
@@ -96,9 +93,8 @@ public class NetworkSettingsControl extends AbstractSettingsControl {
@Override
protected void update() {
- view.getSettingsPanel()
- .enableAddPlayerButton(
- settings.getPlayerList().size() < ISettingsPanel.PLAYER_COLORS.length);
+ view.getSettingsPanel().enableAddPlayerButton(
+ settings.getPlayerList().size() < ISettingsPanel.PLAYER_COLORS.length);
checkSettings();