summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-01 21:29:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-01 21:29:26 +0200
commit2b32d554d18a5979f53cf26a7c61dce19ba8e526 (patch)
treec449971dcfd2ff6cdb5c1f1d948dd7e5344eb33b /src/jrummikub
parentb2dbfcc317d7cdec57cc4081801e75a9d25b1d07 (diff)
downloadJRummikub-2b32d554d18a5979f53cf26a7c61dce19ba8e526.tar
JRummikub-2b32d554d18a5979f53cf26a7c61dce19ba8e526.zip
Draw "connector bars" next to sets on the table
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@53 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub')
-rw-r--r--src/jrummikub/view/impl/Table.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jrummikub/view/impl/Table.java b/src/jrummikub/view/impl/Table.java
index eb163d1..1d61749 100644
--- a/src/jrummikub/view/impl/Table.java
+++ b/src/jrummikub/view/impl/Table.java
@@ -84,12 +84,19 @@ class Table extends StonePanel implements ITable {
public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) {
float x = pos.getX();
-
+ int width = getStonePainter().getStoneWidth(), height = getStonePainter().getStoneHeight();
+
+ g.setColor(new Color(0, 0, 0, 0.25f));
+ g.fillRect((int)(x*width)-width/4, (int)(pos.getY()*height), width/4, height);
+
for (Stone stone : stoneSet) {
getStonePainter().paintStone(g, stone, new Position(x, pos.getY()),
selectedStones.contains(stone));
x++;
}
+
+ g.setColor(new Color(0, 0, 0, 0.25f));
+ g.fillRect((int)(x*width), (int)(pos.getY()*height), width/4, height);
}
@Override