diff options
Diffstat (limited to 'mock/jrummikub/view')
-rw-r--r-- | mock/jrummikub/view/MockGameListPanel.java | 29 | ||||
-rw-r--r-- | mock/jrummikub/view/MockView.java | 17 |
2 files changed, 43 insertions, 3 deletions
diff --git a/mock/jrummikub/view/MockGameListPanel.java b/mock/jrummikub/view/MockGameListPanel.java new file mode 100644 index 0000000..feff097 --- /dev/null +++ b/mock/jrummikub/view/MockGameListPanel.java @@ -0,0 +1,29 @@ +package jrummikub.view; + +import jrummikub.util.IEvent; +import jrummikub.util.IEvent1; +import jrummikub.util.MockEvent; +import jrummikub.util.MockEvent1; + +/** */ +public class MockGameListPanel implements IGameListPanel { + public MockEvent1<GameData> joinEvent = new MockEvent1<GameData>(); + public MockEvent openNewGameEvent = new MockEvent(); + public MockEvent cancelEvent = new MockEvent(); + + @Override + public IEvent getOpenNewGameEvent() { + return openNewGameEvent; + } + + @Override + public IEvent getCancelEvent() { + return cancelEvent; + } + + @Override + public IEvent1<GameData> getJoinEvent() { + return joinEvent; + } + +} diff --git a/mock/jrummikub/view/MockView.java b/mock/jrummikub/view/MockView.java index 2b716e2..4f3342d 100644 --- a/mock/jrummikub/view/MockView.java +++ b/mock/jrummikub/view/MockView.java @@ -27,11 +27,15 @@ public class MockView implements IView { /** */ public MockLoginPanel loginPanel = new MockLoginPanel(); /** */ + public MockGameListPanel gameListPanel = new MockGameListPanel(); + /** */ public boolean isSettingsPanelVisible = false; /** */ public boolean isScorePanelVisible = false; /** */ public boolean isLoginPanelVisible = false; + /** */ + public boolean isGameListPanelVisible = false; /** */ public Collection<Stone> selectedStones; @@ -127,13 +131,11 @@ public class MockView implements IView { @Override public void setCurrentPlayerColor(Color color) { // TODO Auto-generated method stub - } @Override public void setCurrentPlayerHasLaidOut(boolean hasLaidOut) { // TODO Auto-generated method stub - } @Override @@ -173,7 +175,6 @@ public class MockView implements IView { @Override public void enablePauseMode(boolean enable) { // TODO Auto-generated method stub - } @Override @@ -199,6 +200,16 @@ public class MockView implements IView { @Override public void showLoginPanel(boolean show) { isLoginPanelVisible = show; + } + @Override + public void showGameListPanel(boolean show) { + isGameListPanelVisible = show; } + + @Override + public IGameListPanel getGameListPanel() { + return gameListPanel; + } + } |