From 1660736239d9f437f0ffa336d3f3bb8ed7ae407f Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Mon, 30 May 2011 20:16:48 +0200 Subject: =?UTF-8?q?Man=20kann=20jetzt=20die=20Anzahl=20der=20Steins=C3=A4t?= =?UTF-8?q?ze=20einstellen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@328 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/SettingsPanel.java | 32 ++++++++++++------------------ 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'src/jrummikub/view/impl') diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java index 1eb8e45..5eb82fb 100644 --- a/src/jrummikub/view/impl/SettingsPanel.java +++ b/src/jrummikub/view/impl/SettingsPanel.java @@ -65,6 +65,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { private List playerSettingsPanels = new ArrayList(); private JSpinner initialMeldThresholdSpinner; + private JSpinner stoneSetNumberSpinner; private JSpinner jokerNumberSpinner; private Event startGameEvent = new Event(); @@ -174,6 +175,11 @@ class SettingsPanel extends JPanel implements ISettingsPanel { updatePlayerSettingsPanel(i, gameSettings.getPlayerList().get(i)); } + initialMeldThresholdSpinner.setValue(gameSettings + .getInitialMeldThreshold()); + stoneSetNumberSpinner.setValue(gameSettings.getStoneSetNumber()); + jokerNumberSpinner.setValue(gameSettings.getJokerNumber()); + playerSettingsViewport.revalidate(); } @@ -241,13 +247,17 @@ class SettingsPanel extends JPanel implements ISettingsPanel { initialMeldThresholdSpinner = makeOptionSpinner(0, 1, 999, 1, changeInitialMeldThresholdEvent); - makeOptionLabel(1, "Jokeranzahl:"); - jokerNumberSpinner = makeOptionSpinner(1, 1, 999, 1, + makeOptionLabel(1, "Anzahl Steins\u00e4tze:"); + stoneSetNumberSpinner = makeOptionSpinner(1, 1, 999, 1, + changeStoneSetNumberEvent); + + makeOptionLabel(2, "Jokeranzahl:"); + jokerNumberSpinner = makeOptionSpinner(2, 1, 999, 1, changeJokerNumberEvent); GridBagConstraints c = new GridBagConstraints(); c.gridx = 1; - c.gridy = 2; + c.gridy = 3; c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; @@ -502,29 +512,13 @@ class SettingsPanel extends JPanel implements ISettingsPanel { } } - @Override - public void setInitialMeldThreshold(int value) { - initialMeldThresholdSpinner.setValue(value); - } - @Override public IEvent1 getChangeJokerNumberEvent() { return changeJokerNumberEvent; } - @Override - public void setJokerNumber(int jokerNumber) { - jokerNumberSpinner.setValue(jokerNumber); - } - @Override public IEvent2 getChangePlayerTypeEvent() { return changePlayerTypeEvent; } - - @Override - public void setStoneSetNumber(int number) { - // TODO Auto-generated method stub - - } } -- cgit v1.2.3