From fcef81715bff95ac04176dd3d93bb44e1b625087 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 2 May 2011 05:12:53 +0200 Subject: Add JavaDoc to view implementation git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@66 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/StoneCollection.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/view/impl/StoneCollection.java') diff --git a/src/jrummikub/view/impl/StoneCollection.java b/src/jrummikub/view/impl/StoneCollection.java index 95813da..a374dd2 100644 --- a/src/jrummikub/view/impl/StoneCollection.java +++ b/src/jrummikub/view/impl/StoneCollection.java @@ -13,6 +13,9 @@ import jrummikub.model.Position; import jrummikub.model.Stone; import jrummikub.view.IStoneCollection; +/** + * Implementation of the stone collection (selection) + */ @SuppressWarnings("serial") class StoneCollection extends StonePanel implements IStoneCollection { private final static int INSET = 7; @@ -20,6 +23,9 @@ class StoneCollection extends StonePanel implements IStoneCollection { private Collection selectedStones = Collections.emptyList(); + /** + * Creates a new StoneCollection instance + */ StoneCollection() { super(STONE_SCALE); @@ -28,6 +34,12 @@ class StoneCollection extends StonePanel implements IStoneCollection { setBorder(new EmptyBorder(INSET, INSET, INSET, INSET)); } + /** + * Sets the stones to be shown in the collection + * + * @param stones + * the selected stones + */ void setSelectedStones(Collection stones) { selectedStones = stones; @@ -56,8 +68,7 @@ class StoneCollection extends StonePanel implements IStoneCollection { float xpos = 0; for (Stone stone : selectedStones) { - getStonePainter().paintStone(g, stone, new Position(xpos, 0), - false); + getStonePainter().paintStone(g, stone, new Position(xpos, 0), false); xpos++; } } -- cgit v1.2.3