summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl/StonePainter.java
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-06 04:33:13 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-06 04:33:13 +0200
commit4390c766303610c3a20b158d54d1c5bef64475a6 (patch)
tree17327bbec227ce9a8eb16d750145809b012dd347 /src/jrummikub/view/impl/StonePainter.java
parent706406ed6ffe788794268a4ab4e05403cf482dfa (diff)
downloadJRummikub-4390c766303610c3a20b158d54d1c5bef64475a6.tar
JRummikub-4390c766303610c3a20b158d54d1c5bef64475a6.zip
Handle click events next to the collection as click events for the table
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@168 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl/StonePainter.java')
-rw-r--r--src/jrummikub/view/impl/StonePainter.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jrummikub/view/impl/StonePainter.java b/src/jrummikub/view/impl/StonePainter.java
index bfa61ea..0812beb 100644
--- a/src/jrummikub/view/impl/StonePainter.java
+++ b/src/jrummikub/view/impl/StonePainter.java
@@ -64,9 +64,9 @@ class StonePainter {
}
private static Color hover(Color color) {
- int r = (int) (color.getRed() * HOVER_RATIO + 255 * (1-HOVER_RATIO));
- int g = (int) (color.getGreen() * HOVER_RATIO + 255 * (1-HOVER_RATIO));
- int b = (int) (color.getBlue() * HOVER_RATIO + 255 * (1-HOVER_RATIO));
+ int r = (int) (color.getRed() * HOVER_RATIO + 255 * (1 - HOVER_RATIO));
+ int g = (int) (color.getGreen() * HOVER_RATIO + 255 * (1 - HOVER_RATIO));
+ int b = (int) (color.getBlue() * HOVER_RATIO + 255 * (1 - HOVER_RATIO));
return new Color(r > 255 ? 255 : r, g > 255 ? 255 : g, b > 255 ? 255 : b);
}
@@ -327,7 +327,6 @@ class StonePainter {
*/
public void paintStone(Graphics2D g, Stone stone, Position p,
boolean selected, boolean hovered) {
- // Color background = selected ? SELECTED_COLOR : BACKGROUND_COLOR;
int width = getStoneWidth();
int height = getStoneHeight();
int x = (int) (p.getX() * width), y = (int) (p.getY() * height);