From 443e99450b172c06438ceb452e9b0dc3c715f914 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Wed, 22 Jun 2011 06:14:41 +0200 Subject: Fixed load warnings panels and everything git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@579 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/network/NetworkControl.java | 35 ++--------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'src/jrummikub/control/network') diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index 6e42f83..2b5f90f 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -27,7 +27,6 @@ public class NetworkControl { private IConnectionControl connectionControl; private IView view; private List connections = new ArrayList(); - Connection tempConnection; private Event stopNetworkEvent = new Event(); private Event backToLoginEvent = new Event(); @@ -63,41 +62,10 @@ public class NetworkControl { addConnectionSetupListeners(loginData, view); addConnectionControlListeners(view); - - connections.add(view.getQuitEvent().add(new IListener() { - @Override - public void handle() { - if (gameControl == null) { - System.exit(0); - } else { - view.getQuitWarningPanel().setMode(QuitMode.QUIT_PROCESS); - view.showQuitWarningPanel(true); - tempConnection = view.getQuitWarningPanel().getQuitEvent() - .add(new IListener() { - @Override - public void handle() { - System.exit(0); - } - }); - } - } - })); addViewEventListeners(); } private void addViewEventListeners() { - connections.add(view.getQuitWarningPanel().getCancelEvent() - .add(new IListener() { - @Override - public void handle() { - view.showQuitWarningPanel(false); - if (tempConnection != null) { - tempConnection.remove(); - tempConnection = null; - } - } - })); - connections.add(view.getGameListPanel().getJoinEvent() .add(new IListener1() { @Override @@ -378,4 +346,7 @@ public class NetworkControl { gameControl.startGame(); } + public boolean isGameRunning() { + return gameControl != null; + } } -- cgit v1.2.3