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
This commit is contained in:
Ida Massow 2011-06-22 00:12:07 +02:00
parent b7da5ad631
commit 9861417ac1
2 changed files with 78 additions and 60 deletions

View file

@ -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();