diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-02 05:12:53 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-02 05:12:53 +0200 |
commit | fcef81715bff95ac04176dd3d93bb44e1b625087 (patch) | |
tree | e02dcb3d31185afe5943680e1e4549f4ce66775c /src/jrummikub/view/impl/StoneCollection.java | |
parent | a9cf0d8c8fb5b489f07e4cc408cc5edf413ce26e (diff) | |
download | JRummikub-fcef81715bff95ac04176dd3d93bb44e1b625087.tar JRummikub-fcef81715bff95ac04176dd3d93bb44e1b625087.zip |
Add JavaDoc to view implementation
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@66 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl/StoneCollection.java')
-rw-r--r-- | src/jrummikub/view/impl/StoneCollection.java | 15 |
1 files changed, 13 insertions, 2 deletions
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<Stone> 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<Stone> 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++; } } |