From dbd57d42188aa8499211f9a0461fd3511c80f578 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 11 Jun 2011 03:15:12 +0200 Subject: Add NetworkSettingsControl git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@409 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/SettingsControl.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/jrummikub/control/SettingsControl.java') diff --git a/src/jrummikub/control/SettingsControl.java b/src/jrummikub/control/SettingsControl.java index 80b334a..6f4e149 100644 --- a/src/jrummikub/control/SettingsControl.java +++ b/src/jrummikub/control/SettingsControl.java @@ -24,11 +24,11 @@ import jrummikub.view.IView; * The settings control controls the settings panel */ public class SettingsControl { - private IView view; - private Event1 startGameEvent = new Event1(); + protected IView view; + protected Event1 startGameEvent = new Event1(); private List connections = new ArrayList(); - private GameSettings settings; + protected GameSettings settings; /** * Create a new settings control @@ -41,8 +41,6 @@ public class SettingsControl { public SettingsControl(IView view, GameSettings settings) { this.view = view; this.settings = settings; - addPlayer(); - addPlayer(); } /** @@ -59,6 +57,9 @@ public class SettingsControl { * Start the operation of the settings control */ public void startSettings() { + addPlayer(); + addPlayer(); + addPlayerSettingsListeners(); addOptionListeners1(); @@ -247,7 +248,7 @@ public class SettingsControl { update(); } - private void update() { + protected void update() { view.getSettingsPanel().enableRemovePlayerButtons( settings.getPlayerList().size() > 2); view.getSettingsPanel().enableAddPlayerButton( -- cgit v1.2.3