diff options
Diffstat (limited to 'src/jrummikub/view/impl/Table.java')
-rw-r--r-- | src/jrummikub/view/impl/Table.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/jrummikub/view/impl/Table.java b/src/jrummikub/view/impl/Table.java index 67bf124..1d78ac1 100644 --- a/src/jrummikub/view/impl/Table.java +++ b/src/jrummikub/view/impl/Table.java @@ -21,6 +21,9 @@ import jrummikub.model.StoneSet; import jrummikub.view.IStoneCollection; import jrummikub.view.ITable; +/** + * The implementation of the table + */ @SuppressWarnings("serial") class Table extends StonePanel implements ITable { private final static ImageIcon background = new ImageIcon( @@ -61,7 +64,13 @@ class Table extends StonePanel implements ITable { return stoneCollection; } - public void setSelectedStones(Collection<Stone> stones) { + /** + * Sets the currently selected stones + * + * @param stones + * the selected stones + */ + void setSelectedStones(Collection<Stone> stones) { selectedStones = stones; stoneCollection.setSelectedStones(stones); repaint(); @@ -80,6 +89,9 @@ class Table extends StonePanel implements ITable { y + height - stoneCollection.getHeight() - COLLECTION_GAP); } + /** + * Creates a new Table instance + */ Table() { super(DEFAULT_SCALE); @@ -119,7 +131,7 @@ class Table extends StonePanel implements ITable { stoneCollection.addComponentListener(rescaleListener); } - public void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) { + private void paintStoneSet(Graphics2D g, StoneSet stoneSet, Position pos) { float x = pos.getX(); int width = getStonePainter().getStoneWidth(), height = getStonePainter() .getStoneHeight(); |