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
This commit is contained in:
Matthias Schiffer 2011-05-01 21:29:26 +02:00
parent b2dbfcc317
commit 2b32d554d1

View file

@ -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