summaryrefslogtreecommitdiffstats
path: root/server/src/main
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2017-09-20 10:59:02 +0300
committerHenri Sara <henri.sara@gmail.com>2017-09-20 11:37:03 +0300
commitf3ae6c2c2b1245d20d94cb4eeee4efee8c2b06c6 (patch)
treea445f0d5da46124d2589412cbe869ef1fceece87 /server/src/main
parent5558b8768b1eddedb7364cf90c12aa1a36e068c4 (diff)
downloadvaadin-framework-f3ae6c2c2b1245d20d94cb4eeee4efee8c2b06c6.tar.gz
vaadin-framework-f3ae6c2c2b1245d20d94cb4eeee4efee8c2b06c6.zip
Fix ColorPickerGrid indexing
Fixes #9018
Diffstat (limited to 'server/src/main')
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
index 6ab1ac1ccb..e51d03c5e0 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
@@ -38,7 +38,7 @@ public class ColorPickerGrid extends AbstractField<Color> {
@Override
public void select(int x, int y) {
- Color oldValue = colorGrid[x][y];
+ Color oldValue = colorGrid[y][x];
ColorPickerGrid.this.x = x;
ColorPickerGrid.this.y = y;
fireEvent(new ValueChangeEvent<>(ColorPickerGrid.this, oldValue,
@@ -195,12 +195,12 @@ public class ColorPickerGrid extends AbstractField<Color> {
@Override
public Color getValue() {
- return colorGrid[x][y];
+ return colorGrid[y][x];
}
@Override
protected void doSetValue(Color color) {
- colorGrid[x][y] = color;
+ colorGrid[y][x] = color;
changedColors.put(new Point(x, y), color);
sendChangedColors();
}