summaryrefslogtreecommitdiffstats
path: root/mock
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-22 07:04:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-22 07:04:15 +0200
commitada8c1869c5b2b007e690e4c028fd20b34a41706 (patch)
tree894a27b7f4f7ae874c53882690c45805d5780a44 /mock
parentd2df76cae49bf31b28d422b5ddfbfb5b1e7651d0 (diff)
downloadJRummikub-ada8c1869c5b2b007e690e4c028fd20b34a41706.tar
JRummikub-ada8c1869c5b2b007e690e4c028fd20b34a41706.zip
Add proper handling for lost server connections
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@581 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'mock')
-rw-r--r--mock/jrummikub/control/network/MockConnectionControl.java7
-rw-r--r--mock/jrummikub/view/MockView.java11
2 files changed, 16 insertions, 2 deletions
diff --git a/mock/jrummikub/control/network/MockConnectionControl.java b/mock/jrummikub/control/network/MockConnectionControl.java
index ce8c4e3..faa1303 100644
--- a/mock/jrummikub/control/network/MockConnectionControl.java
+++ b/mock/jrummikub/control/network/MockConnectionControl.java
@@ -54,6 +54,8 @@ public class MockConnectionControl implements IConnectionControl {
/** */
public MockEvent1<String> participantLeftEvent = new MockEvent1<String>();
/** */
+ public MockEvent connectionLostEvent = new MockEvent();
+ /** */
public GameData currentGame;
/** */
public GameData offeredGame;
@@ -178,6 +180,11 @@ public class MockConnectionControl implements IConnectionControl {
}
@Override
+ public IEvent getConnectionLostEvent() {
+ return connectionLostEvent;
+ }
+
+ @Override
public void offerGame(GameData data) {
offeredGame = data;
}
diff --git a/mock/jrummikub/view/MockView.java b/mock/jrummikub/view/MockView.java
index d26432a..1472742 100644
--- a/mock/jrummikub/view/MockView.java
+++ b/mock/jrummikub/view/MockView.java
@@ -79,6 +79,8 @@ public class MockView implements IView {
/** */
public MockEvent acknowledgeInvalidEvent = new MockEvent();
/** */
+ public MockEvent acknowledgeConnectionLostEvent = new MockEvent();
+ /** */
public MockEvent1<File> loadFileEvent = new MockEvent1<File>();
@Override
@@ -117,6 +119,11 @@ public class MockView implements IView {
}
@Override
+ public IEvent getAcknowledgeConnectionLostEvent() {
+ return acknowledgeConnectionLostEvent;
+ }
+
+ @Override
public IEvent getEndProgramEvent() {
return quitEvent;
}
@@ -173,7 +180,7 @@ public class MockView implements IView {
@Override
public void showSidePanel(boolean show) {
- isSidePanelVisible=show;
+ isSidePanelVisible = show;
}
public void showQuitWarningPanel(boolean show) {
@@ -192,7 +199,7 @@ public class MockView implements IView {
@Override
public void showConnectPanel(boolean show) {
- isConnectPanelVisible=show;
+ isConnectPanelVisible = show;
}