summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/network
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-11 00:41:06 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-11 00:41:06 +0200
commite176dc46082c2e73daf82cafb5e6e10653db64eb (patch)
treed4b6b1cd0533c7a8d4bb2a6a2c93434d29bffe3e /src/jrummikub/control/network
parentcc4797fd8b894cc7e02346dc93f891cccb4c0a09 (diff)
downloadJRummikub-e176dc46082c2e73daf82cafb5e6e10653db64eb.tar
JRummikub-e176dc46082c2e73daf82cafb5e6e10653db64eb.zip
Display game list in GameListPanel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@407 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/network')
-rw-r--r--src/jrummikub/control/network/NetworkControl.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java
index d56ea0e..ce7714b 100644
--- a/src/jrummikub/control/network/NetworkControl.java
+++ b/src/jrummikub/control/network/NetworkControl.java
@@ -2,6 +2,7 @@ package jrummikub.control.network;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import jrummikub.util.Connection;
import jrummikub.util.Event;
@@ -19,17 +20,22 @@ public class NetworkControl {
private List<Connection> connections = new ArrayList<Connection>();
private Event stopNetworkEvent = new Event();
- public NetworkControl(LoginData loginData, final IView view) {
+ public NetworkControl(final LoginData loginData, final IView view) {
this.view = view;
connectionControl = new ConnectionControl(loginData);
- connections.add(connectionControl.getConnectedEvent().add(
- new IListener() {
- @Override
- public void handle() {
- view.showGameListPanel(true);
- }
- }));
+ connections.add(connectionControl.getConnectedEvent().add(new IListener() {
+ @Override
+ public void handle() {
+ view.getGameListPanel().setChannelName(loginData.getChannelName());
+ view.showGameListPanel(true);
+
+ GameData testData = new GameData(UUID.randomUUID(), "NeoRaider");
+ testData.setCurrentPlayerCount(2);
+ testData.setMaxPlayerCount(4);
+ view.getGameListPanel().addGame(testData);
+ }
+ }));
connections.add(connectionControl.getConnectionFailedEvent().add(
new IListener() {