diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-22 06:14:41 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-22 06:14:41 +0200 |
commit | 443e99450b172c06438ceb452e9b0dc3c715f914 (patch) | |
tree | 091dfe7f406f94087a980251ac439478c5b403d7 /src/jrummikub/control/network | |
parent | 86eeace6738c4715857df6730dff41e788918b43 (diff) | |
download | JRummikub-443e99450b172c06438ceb452e9b0dc3c715f914.tar JRummikub-443e99450b172c06438ceb452e9b0dc3c715f914.zip |
Fixed load warnings panels and everything
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@579 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/network')
-rw-r--r-- | src/jrummikub/control/network/NetworkControl.java | 35 |
1 files changed, 3 insertions, 32 deletions
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<Connection> connections = new ArrayList<Connection>(); - 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<GameData>() { @Override @@ -378,4 +346,7 @@ public class NetworkControl { gameControl.startGame(); } + public boolean isGameRunning() { + return gameControl != null; + } } |