diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-22 00:12:07 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-22 00:12:07 +0200 |
commit | 9861417ac10271103d74abeb591518ec2a50b43a (patch) | |
tree | 015e2df54e96b6f68397b4eda518ca565a84deab /src/jrummikub/view | |
parent | b7da5ad6313ae17dee738593ab3482c56675b61a (diff) | |
download | JRummikub-9861417ac10271103d74abeb591518ec2a50b43a.tar JRummikub-9861417ac10271103d74abeb591518ec2a50b43a.zip |
ALLES was muss und da ist ist kommentiert
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@561 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view')
-rw-r--r-- | src/jrummikub/view/impl/WinPanel.java | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/jrummikub/view/impl/WinPanel.java b/src/jrummikub/view/impl/WinPanel.java index d274b19..4d9aacc 100644 --- a/src/jrummikub/view/impl/WinPanel.java +++ b/src/jrummikub/view/impl/WinPanel.java @@ -136,18 +136,7 @@ class WinPanel extends JPanel { fontSize = MAX_BUTTON_FONT_SIZE; if (type == BottomPanelType.WIN_PANEL) { - waitingLabel.setVisible(false); - newRoundButton.setBounds(x, buttonY, buttonWidth, buttonHeight); - newRoundButton.setFont(newRoundButton.getFont().deriveFont(fontSize)); - newRoundButton.setVisible(true); - - newGameButton.setBounds(x + buttonWidth + PANEL_SEPARATOR, buttonY, - buttonWidth, buttonHeight); - newGameButton.setFont(newGameButton.getFont().deriveFont(fontSize)); - - endProgramButton.setBounds(x + 2 * (buttonWidth + PANEL_SEPARATOR), - buttonY, buttonWidth, buttonHeight); - endProgramButton.setFont(endProgramButton.getFont().deriveFont(fontSize)); + rescaleWinPanel(x, buttonWidth, buttonHeight, buttonY, fontSize); } else if (type == BottomPanelType.NETWORK_WIN_PANEL) { waitingLabel.setBounds(x, y, width, labelHeight); waitingLabel.setVisible(true); @@ -163,6 +152,22 @@ class WinPanel extends JPanel { } } + private void rescaleWinPanel(int x, int buttonWidth, int buttonHeight, + int buttonY, float fontSize) { + waitingLabel.setVisible(false); + newRoundButton.setBounds(x, buttonY, buttonWidth, buttonHeight); + newRoundButton.setFont(newRoundButton.getFont().deriveFont(fontSize)); + newRoundButton.setVisible(true); + + newGameButton.setBounds(x + buttonWidth + PANEL_SEPARATOR, buttonY, + buttonWidth, buttonHeight); + newGameButton.setFont(newGameButton.getFont().deriveFont(fontSize)); + + endProgramButton.setBounds(x + 2 * (buttonWidth + PANEL_SEPARATOR), + buttonY, buttonWidth, buttonHeight); + endProgramButton.setFont(endProgramButton.getFont().deriveFont(fontSize)); + } + void setType(BottomPanelType type) { this.type = type; rescale(); |