summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-05-30 19:08:33 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-05-30 19:08:33 +0200
commitae9ce59d36eed2b133977d37ab5e73a844ef334c (patch)
treea64d467c9e1852b6df663c72878285c02850ffa5 /src/jrummikub/view/impl
parent498c2529bdd1b35406412a4b1c96f887871646f6 (diff)
downloadJRummikub-ae9ce59d36eed2b133977d37ab5e73a844ef334c.tar
JRummikub-ae9ce59d36eed2b133977d37ab5e73a844ef334c.zip
Warnings tauchen auf, wenn man beim Einstellen Unfug macht
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@325 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/SettingsPanel.java25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java
index 02dfc10..a5792e7 100644
--- a/src/jrummikub/view/impl/SettingsPanel.java
+++ b/src/jrummikub/view/impl/SettingsPanel.java
@@ -112,14 +112,31 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
case NO_ERROR:
errorMessageLabel.setText(" ");
break;
- case DUPLICATE_PLAYER_NAME:
+ case DUPLICATE_PLAYER_NAME_ERROR:
errorMessageLabel
.setText("Jeder Spielername darf nur einmal verwendet werden.");
+ errorMessageLabel.setForeground(Color.RED);
break;
- case NO_PLAYER_NAME:
+ case NO_PLAYER_NAME_ERROR:
errorMessageLabel.setText("Jeder Spieler muss einen Namen haben.");
+ errorMessageLabel.setForeground(Color.RED);
+ break;
+ case NOT_ENOUGH_STONES_ERROR:
+ errorMessageLabel
+ .setText("Es gibt nicht genug Steine f\u00fcr die gew\u00e4hlte Spieleranzahl.");
+ errorMessageLabel.setForeground(Color.RED);
+ break;
+ case COMPUTER_PLAYERS_ONLY_WARNING:
+ errorMessageLabel.setText("Es gibt keinen menschlichen Spieler.");
+ errorMessageLabel.setForeground(Color.ORANGE.darker());
+ break;
+ case TOO_HIGH_THRESHOLD_WARNING:
+ errorMessageLabel
+ .setText("Die gew\u00e4hlte Schranke ist m\u00f6glicherweise zu hoch");
+ errorMessageLabel.setForeground(Color.ORANGE.darker());
break;
}
+
}
@Override
@@ -284,7 +301,6 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
add(tabbedPane, c);
errorMessageLabel = new JLabel(" ");
- errorMessageLabel.setForeground(Color.RED);
c.weighty = 0;
add(errorMessageLabel, c);
@@ -313,8 +329,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel {
nameField.setText(settings.getName());
}
// playerType.setSelectedIndex(0);
- int index = Arrays.binarySearch(
- TurnControlFactory.Type.values(),
+ int index = Arrays.binarySearch(TurnControlFactory.Type.values(),
settings.getTurnControlType());
if (index != playerType.getSelectedIndex()) {
playerType.setSelectedIndex(index);