diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-10 14:51:44 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-10 14:51:44 +0200 |
commit | e7ee6778b020b555ce5e4a2e96d850b19ba02e35 (patch) | |
tree | cefbc3081e34f3bb5e2788709d6622e5ab8507a0 /src/jrummikub/view/impl/PlayerPanel.java | |
parent | d940351fe4ce6c59718661e261d44d23a5c5fcd7 (diff) | |
download | JRummikub-e7ee6778b020b555ce5e4a2e96d850b19ba02e35.tar JRummikub-e7ee6778b020b555ce5e4a2e96d850b19ba02e35.zip |
Added load and network buttons to settings panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@395 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl/PlayerPanel.java')
-rw-r--r-- | src/jrummikub/view/impl/PlayerPanel.java | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index 5b17d38..f18f053 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -411,20 +411,9 @@ class PlayerPanel extends JPanel implements IPlayerPanel { smallFontSize = MAX_BUTTON_FONT_SIZE; } - handRowUpButton.setBounds(0, 0, handButtonWidth, getHeight() / 2); - handRowUpButton.setFont(handRowUpButton.getFont().deriveFont( - fontSize * 1.5f)); - handRowDownButton.setBounds(0, getHeight() / 2, handButtonWidth, - getHeight() / 2); - handRowDownButton.setFont(handRowDownButton.getFont().deriveFont( - fontSize * 1.5f)); + rescaleUpDownButtons(handButtonWidth, fontSize); - timeBar.setBounds(x, y, width - firstLineHeight - SIDE_PANEL_SEPARATOR, - firstLineHeight); - pauseButton.setBounds(x + width - firstLineHeight, y, firstLineHeight, - firstLineHeight); - pauseButton.setIcon(ImageUtil - .createPauseIcon((int) (firstLineHeight * 0.5f))); + rescaleTimeBar(x, y, width, firstLineHeight); endTurnButton.setBounds(x, y + firstLineHeight + SIDE_PANEL_SEPARATOR, buttonWidth, buttonHeight); @@ -440,5 +429,24 @@ class PlayerPanel extends JPanel implements IPlayerPanel { smallFontSize)); } + + private void rescaleTimeBar(int x, int y, int width, int firstLineHeight) { + timeBar.setBounds(x, y, width - firstLineHeight - SIDE_PANEL_SEPARATOR, + firstLineHeight); + pauseButton.setBounds(x + width - firstLineHeight, y, firstLineHeight, + firstLineHeight); + pauseButton.setIcon(ImageUtil + .createPauseIcon((int) (firstLineHeight * 0.5f))); + } + + private void rescaleUpDownButtons(int handButtonWidth, float fontSize) { + handRowUpButton.setBounds(0, 0, handButtonWidth, getHeight() / 2); + handRowUpButton.setFont(handRowUpButton.getFont().deriveFont( + fontSize * 1.5f)); + handRowDownButton.setBounds(0, getHeight() / 2, handButtonWidth, + getHeight() / 2); + handRowDownButton.setFont(handRowDownButton.getFont().deriveFont( + fontSize * 1.5f)); + } } } |