diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-06 03:56:23 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-06 03:56:23 +0200 |
commit | 706406ed6ffe788794268a4ab4e05403cf482dfa (patch) | |
tree | c8fe38f4389ed8fd24ed5a063769dec4f05f2b72 /src/jrummikub/view/impl | |
parent | b8206243a7e6b0ecea7ec9cf568e9d686017c3f9 (diff) | |
download | JRummikub-706406ed6ffe788794268a4ab4e05403cf482dfa.tar JRummikub-706406ed6ffe788794268a4ab4e05403cf482dfa.zip |
Display time in red when 10 seconds or less is left
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@167 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r-- | src/jrummikub/view/impl/PlayerPanel.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index b7bdb32..9c12a80 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -1,5 +1,6 @@ package jrummikub.view.impl; +import java.awt.Color; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -53,7 +54,8 @@ class PlayerPanel extends JPanel implements IPlayerPanel { /** * Sets the current player name * - * @param playerName the player name + * @param playerName + * the player name */ void setCurrentPlayerName(String playerName) { currentPlayerNameLabel.setText(playerName); @@ -64,6 +66,11 @@ class PlayerPanel extends JPanel implements IPlayerPanel { timeBar.setValue(time); timeBar.setString(Integer.toString(time / 60) + ":" + secondFormat.format(time % 60)); + + if (time <= 10) + timeBar.setForeground(Color.RED); + else + timeBar.setForeground(Color.BLACK); } @Override |