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:
parent
b2dbfcc317
commit
2b32d554d1
1 changed files with 8 additions and 1 deletions
|
@ -84,12 +84,19 @@ class Table extends StonePanel implements ITable {
|
||||||
|
|
||||||
public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) {
|
public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) {
|
||||||
float x = pos.getX();
|
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) {
|
for (Stone stone : stoneSet) {
|
||||||
getStonePainter().paintStone(g, stone, new Position(x, pos.getY()),
|
getStonePainter().paintStone(g, stone, new Position(x, pos.getY()),
|
||||||
selectedStones.contains(stone));
|
selectedStones.contains(stone));
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g.setColor(new Color(0, 0, 0, 0.25f));
|
||||||
|
g.fillRect((int)(x*width), (int)(pos.getY()*height), width/4, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Reference in a new issue