From 2b32d554d18a5979f53cf26a7c61dce19ba8e526 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 1 May 2011 21:29:26 +0200 Subject: 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 --- src/jrummikub/view/impl/Table.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/jrummikub/view') 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 -- cgit v1.2.3