Implemented login error messages
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@500 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
ace7175f1a
commit
4df5c0e665
13 changed files with 330 additions and 121 deletions
|
@ -12,6 +12,7 @@ import jrummikub.util.IEvent2;
|
|||
import jrummikub.util.MockEvent;
|
||||
import jrummikub.util.MockEvent1;
|
||||
import jrummikub.util.MockEvent2;
|
||||
import jrummikub.view.LoginError;
|
||||
|
||||
/** */
|
||||
public class MockConnectionControl implements IConnectionControl {
|
||||
|
@ -20,7 +21,7 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
/** */
|
||||
public MockEvent connectedEvent = new MockEvent();
|
||||
/** */
|
||||
public MockEvent connectionFailedEvent = new MockEvent();
|
||||
public MockEvent1<LoginError> connectionFailedEvent = new MockEvent1<LoginError>();
|
||||
/** */
|
||||
public MockEvent1<GameData> gameOfferEvent = new MockEvent1<GameData>();
|
||||
/** */
|
||||
|
@ -66,7 +67,7 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
@Override
|
||||
public void connect() {
|
||||
if (failOnConnect) {
|
||||
connectionFailedEvent.emit();
|
||||
connectionFailedEvent.emit(LoginError.UNKNOWN_ERROR);
|
||||
} else {
|
||||
connected = true;
|
||||
connectedEvent.emit();
|
||||
|
@ -84,7 +85,7 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IEvent getConnectionFailedEvent() {
|
||||
public IEvent1<LoginError> getConnectionFailedEvent() {
|
||||
return connectionFailedEvent;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,6 +224,12 @@ public class MockView implements IView {
|
|||
return gameListPanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConnectPanel getConnectPanel() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInitialMeldError(int points) {
|
||||
// TODO Auto-generated method stub
|
||||
|
@ -295,4 +301,10 @@ public class MockView implements IView {
|
|||
public void load() {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showConnectPanel(boolean show) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue