diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-28 20:13:35 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-28 20:13:35 +0200 |
commit | 5aa79ea898e16cee1265ba9457c1af11616584cc (patch) | |
tree | 1f65d8e1042e4e7599c908a07f4d74fec831d866 /src/jrummikub/view/impl | |
parent | 5029ff206a00695bb955e49d659c20b8313192d4 (diff) | |
download | JRummikub-5aa79ea898e16cee1265ba9457c1af11616584cc.tar JRummikub-5aa79ea898e16cee1265ba9457c1af11616584cc.zip |
Implement settings control
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@291 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r-- | src/jrummikub/view/impl/SettingsPanel.java | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/jrummikub/view/impl/SettingsPanel.java b/src/jrummikub/view/impl/SettingsPanel.java index 7200a16..ea1c181 100644 --- a/src/jrummikub/view/impl/SettingsPanel.java +++ b/src/jrummikub/view/impl/SettingsPanel.java @@ -40,24 +40,6 @@ import jrummikub.view.ISettingsPanel; @SuppressWarnings("serial") class SettingsPanel extends JPanel implements ISettingsPanel { - private final static Color[] PLAYER_COLORS = { new Color(1.0f, 0, 0), // red - new Color(0, 1.0f, 0), // lime - new Color(1.0f, 1.0f, 0), // yellow - new Color(0, 0, 1.0f), // blue - new Color(1.0f, 0, 1.0f), // fuchsia - new Color(0, 1.0f, 1.0f), // aqua - new Color(0.5f, 0, 0), // maroon - new Color(0, 0.5f, 0), // green - new Color(0.5f, 0.5f, 0), // olive - new Color(0, 0, 0.5f), // navy - new Color(0.5f, 0, 0.5f), // purple - new Color(0, 0.5f, 0.5f), // teal - new Color(0, 0, 0), // black - new Color(0.5f, 0.5f, 0.5f), // gray - new Color(0.75f, 0.75f, 0.75f), // silver - new Color(1.0f, 1.0f, 1.0f), // white - }; - private JPanel playerSetupPanel; private JPanel playerSettingsViewport; private JPanel ruleSetupPanel; @@ -97,8 +79,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { break; } - PlayerSettingsPanel panel = new PlayerSettingsPanel("Spieler " + num, - color); + PlayerSettingsPanel panel = new PlayerSettingsPanel("Spieler " + num, color); playerSettingsPanels.add(panel); playerSettingsViewport.add(panel, playerSettingsViewport.getComponentCount() - 1); @@ -124,8 +105,7 @@ class SettingsPanel extends JPanel implements ISettingsPanel { playerSettingsViewport.add(addPlayerPanel); JButton addPlayerButton = new JButton("+"); - addPlayerButton - .setFont(addPlayerButton.getFont().deriveFont(Font.BOLD)); + addPlayerButton.setFont(addPlayerButton.getFont().deriveFont(Font.BOLD)); addPlayerButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -175,8 +155,8 @@ class SettingsPanel extends JPanel implements ISettingsPanel { }); add(startButton, c); - setBorder(new CompoundBorder(new LineBorder(Color.BLACK), - new EmptyBorder(10, 10, 10, 10))); + setBorder(new CompoundBorder(new LineBorder(Color.BLACK), new EmptyBorder( + 10, 10, 10, 10))); } private class PlayerSettingsPanel extends JPanel { @@ -195,8 +175,8 @@ class SettingsPanel extends JPanel implements ISettingsPanel { } private void updateColor() { - colorButton.setIcon(ImageUtil.createColorIcon(settings.getColor(), - 16, 2)); + colorButton + .setIcon(ImageUtil.createColorIcon(settings.getColor(), 16, 2)); } private void setName() { |