diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-14 04:55:24 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-14 04:55:24 +0200 |
commit | ebacf1ae7494abc3a80cf1ec242a6202d6438323 (patch) | |
tree | 9052767ea3cc2dcdbf20926c47224f1304ae1585 /src/jrummikub/view/impl | |
parent | 4879b7b93eaff1f80056d78e19271d6418ec6534 (diff) | |
download | JRummikub-ebacf1ae7494abc3a80cf1ec242a6202d6438323.tar JRummikub-ebacf1ae7494abc3a80cf1ec242a6202d6438323.zip |
Implement joining games
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@434 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r-- | src/jrummikub/view/impl/GameListPanel.java | 7 | ||||
-rw-r--r-- | src/jrummikub/view/impl/SettingsPanel.java | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/jrummikub/view/impl/GameListPanel.java b/src/jrummikub/view/impl/GameListPanel.java index 7324559..2d07f2e 100644 --- a/src/jrummikub/view/impl/GameListPanel.java +++ b/src/jrummikub/view/impl/GameListPanel.java @@ -72,8 +72,11 @@ class GameListPanel extends JPanel implements IGameListPanel { joinButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub - // joinEvent.emit(); + Object data = gameList.getSelectedValue(); + + if (data instanceof GameData) { + joinEvent.emit((GameData) data); + } } }); diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java index 8ec9d3e..c7b6387 100644 --- a/src/jrummikub/view/impl/SettingsPanel.java +++ b/src/jrummikub/view/impl/SettingsPanel.java @@ -373,7 +373,8 @@ class SettingsPanel extends JPanel implements ISettingsPanel { private void addPlayerSettingsPanel(int i, PlayerSettings settings, List<Type> choices) { PlayerSettingsPanel panel = new PlayerSettingsPanel(i, settings, choices, - settingsMode != SettingsMode.NETWORK_OFFER); + settingsMode != SettingsMode.NETWORK_OFFER + && settingsMode != SettingsMode.NETWORK_JOIN); playerSettingsPanels.add(panel); playerSettingsViewport.add(panel, playerSettingsViewport.getComponentCount() - 1); @@ -765,6 +766,10 @@ class SettingsPanel extends JPanel implements ISettingsPanel { addNetworkOfferButtons(); enableOptions(false); break; + case NETWORK_JOIN: + // addNetworkJoinButtons(); + enableOptions(false); + break; } } |