diff options
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() { |