diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-21 15:23:29 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-21 15:23:29 +0200 |
commit | 7899a38fe63a819d405a18e0139cea6ff95aac33 (patch) | |
tree | 559c4f4f80f0fad9548bb31673be9e89c70b72c5 /src/jrummikub/view/impl/HandPanel.java | |
parent | e4e66240bf864354715f3812f70444d7f7511dd2 (diff) | |
download | JRummikub-7899a38fe63a819d405a18e0139cea6ff95aac33.tar JRummikub-7899a38fe63a819d405a18e0139cea6ff95aac33.zip |
Noch mehr Kommentare, z.B. alle Methoden im Model und in der IView
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@547 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl/HandPanel.java')
-rw-r--r-- | src/jrummikub/view/impl/HandPanel.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/jrummikub/view/impl/HandPanel.java b/src/jrummikub/view/impl/HandPanel.java index c07bee0..ebe4f54 100644 --- a/src/jrummikub/view/impl/HandPanel.java +++ b/src/jrummikub/view/impl/HandPanel.java @@ -140,6 +140,9 @@ class HandPanel extends AbstractStonePanel implements IHandPanel { playerPanel.updateButtons(); } + /** + * Updates panel after visible row changed + */ void rowUp() { currentRow--; repaintAll = true; @@ -148,6 +151,9 @@ class HandPanel extends AbstractStonePanel implements IHandPanel { playerPanel.updateButtons(); } + /** + * Updates panel after visible row changed + */ void rowDown() { currentRow++; repaintAll = true; @@ -163,10 +169,20 @@ class HandPanel extends AbstractStonePanel implements IHandPanel { playerPanel.updateButtons(); } + /** + * Is there a higher row than the current row + * + * @return higher row present + */ boolean canRowUp() { return (currentRow > 0); } + /** + * Is there a lower row than the current row + * + * @return higher row present + */ boolean canRowDown() { return (currentRow < maxRow); } @@ -188,6 +204,13 @@ class HandPanel extends AbstractStonePanel implements IHandPanel { repaint(); } + /** + * Rescales the hand panel according to window size + * + * @param height + * of hand panel + * @return width of hand panel + */ int rescale(int height) { Insets insets = getInsets(); int size = (height - insets.top - insets.bottom) / HEIGHT; |