summaryrefslogtreecommitdiffstats
path: root/compatibility-server
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-09-27 13:06:27 +0300
committerGitHub <noreply@github.com>2017-09-27 13:06:27 +0300
commit94c57dea3848635e0ae42fae464e23301f9e7c2c (patch)
treeaf8c11734f0765b98349b0f20cb5c3cd6166cf2f /compatibility-server
parent22566d5d9d3794edc1bad59a709f3a78b3a3ba28 (diff)
downloadvaadin-framework-94c57dea3848635e0ae42fae464e23301f9e7c2c.tar.gz
vaadin-framework-94c57dea3848635e0ae42fae464e23301f9e7c2c.zip
Eliminate the use of AWT in non-test code (#10094)
Diffstat (limited to 'compatibility-server')
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java
index 0f9d93be75..4b96f0de12 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java
@@ -15,7 +15,7 @@
*/
package com.vaadin.v7.ui.components.colorpicker;
-import java.awt.Point;
+import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@@ -34,6 +34,24 @@ import com.vaadin.v7.shared.ui.colorpicker.ColorPickerGridState;
public class ColorPickerGrid extends AbstractComponent
implements ColorSelector {
+ private static class Point implements Serializable {
+ private int x;
+ private int y;
+
+ public Point(int x, int y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+ }
+
private static final String STYLENAME = "v-colorpicker-grid";
private static final Method COLOR_CHANGE_METHOD;
@@ -150,8 +168,8 @@ public class ColorPickerGrid extends AbstractComponent
String color = c.getCSS();
colors[counter] = color;
- XCoords[counter] = String.valueOf((int) p.getX());
- YCoords[counter] = String.valueOf((int) p.getY());
+ XCoords[counter] = String.valueOf(p.getX());
+ YCoords[counter] = String.valueOf(p.getY());
counter++;
}
getState().changedColor = colors;