summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
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);