summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-28 21:11:35 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-28 21:11:35 +0200
commitffbfc751c95b483f72bbb9ff47e4f04eef2c83cb (patch)
tree8338a644a68ed18f2ae1d75b62279eab169adb6d /src
parent1372ee7b9eeb11361f833df45b48156e7727d1c3 (diff)
downloadJRummikub-ffbfc751c95b483f72bbb9ff47e4f04eef2c83cb.tar
JRummikub-ffbfc751c95b483f72bbb9ff47e4f04eef2c83cb.zip
Set initial enable state of the player remove buttons correctly
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@293 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/view/impl/SettingsPanel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java
index a5ad8a3..e96b19d 100644
--- a/src/jrummikub/view/impl/SettingsPanel.java
+++ b/src/jrummikub/view/impl/SettingsPanel.java
@@ -49,6 +49,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
private JLabel errorMessageLabel;
private JButton startButton;
+ private boolean removeButtonsEnabled = true;
private List<PlayerSettingsPanel> playerSettingsPanels = new ArrayList<PlayerSettingsPanel>();
private Event startGameEvent = new Event();
@@ -116,6 +117,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
@Override
public void enableRemovePlayerButtons(boolean enable) {
+ removeButtonsEnabled = enable;
for (PlayerSettingsPanel psp : playerSettingsPanels) {
psp.enableRemoveButton(enable);
}
@@ -286,6 +288,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
remove();
}
});
+ removeButton.setEnabled(removeButtonsEnabled);
add(removeButton, BorderLayout.EAST);
}