diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/view/impl/StonePainter.java | 11 | ||||
-rw-r--r-- | src/jrummikub/view/impl/Table.java | 12 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/jrummikub/view/impl/StonePainter.java b/src/jrummikub/view/impl/StonePainter.java index c1b6d2c..fa039f7 100644 --- a/src/jrummikub/view/impl/StonePainter.java +++ b/src/jrummikub/view/impl/StonePainter.java @@ -205,15 +205,4 @@ class StonePainter { paintCircle(g, x, y, width, height); } - - - public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) { - float x = pos.getX(); - - for(Stone stone : stoneSet){ - paintStone(g, stone, new Position(x, pos.getY())); - x++; - } - - } } diff --git a/src/jrummikub/view/impl/Table.java b/src/jrummikub/view/impl/Table.java index 23ce19d..a8c513e 100644 --- a/src/jrummikub/view/impl/Table.java +++ b/src/jrummikub/view/impl/Table.java @@ -16,6 +16,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import jrummikub.model.Position; +import jrummikub.model.Stone; import jrummikub.model.StoneSet; import jrummikub.util.Event1; import jrummikub.util.IEvent1; @@ -94,6 +95,15 @@ public class Table extends JPanel implements ITable { }); } + public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) { + float x = pos.getX(); + + for(Stone stone : stoneSet){ + stonePainter.paintStone(g, stone, new Position(x, pos.getY())); + x++; + } + } + @Override protected void paintComponent(Graphics g1) { Graphics2D g = (Graphics2D) g1; @@ -108,7 +118,7 @@ public class Table extends JPanel implements ITable { RenderingHints.VALUE_ANTIALIAS_ON); for (Map.Entry<StoneSet, Position> stoneSet : stoneSets.entrySet()) { - stonePainter.paintStoneSet(g, stoneSet.getKey(), stoneSet.getValue()); + paintStoneSet(g, stoneSet.getKey(), stoneSet.getValue()); } } } |