summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2016-09-28 13:46:10 +0300
committerVaadin Code Review <review@vaadin.com>2016-10-03 13:34:58 +0000
commit9583be47338d2831aca345f7483d6df45f7da94b (patch)
tree06e4de351f59ae4a6b15c1ede0d5a37978066862 /client/src
parent7b8ca912859a59a33021147c8727cd2ec9aec469 (diff)
downloadvaadin-framework-9583be47338d2831aca345f7483d6df45f7da94b.tar.gz
vaadin-framework-9583be47338d2831aca345f7483d6df45f7da94b.zip
Copy ColorPicker to compatibility-server (again)
This version should be Vaadin 7 compatible, using v7 versions of Slider, ComboBox, etc. Change-Id: I3d79ded7cc3f4cc645ac68ca6766fe096f6c0494
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java18
2 files changed, 15 insertions, 9 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
index b75bee23c1..f530d7ada7 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
@@ -107,14 +107,14 @@ public class VColorPickerGradient extends FocusPanel implements
/**
* Returns the latest x-coordinate for pressed-down mouse cursor.
*/
- protected int getCursorX() {
+ public int getCursorX() {
return cursorX;
}
/**
* Returns the latest y-coordinate for pressed-down mouse cursor.
*/
- protected int getCursorY() {
+ public int getCursorY() {
return cursorY;
}
@@ -123,7 +123,7 @@ public class VColorPickerGradient extends FocusPanel implements
*
* @param bgColor
*/
- protected void setBGColor(String bgColor) {
+ public void setBGColor(String bgColor) {
if (bgColor == null) {
background.getElement().getStyle().clearBackgroundColor();
} else {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
index 67f2ce07dd..6d8eb2c9c1 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
@@ -68,11 +68,13 @@ public class VColorPickerGrid extends AbsolutePanel
/**
* Updates the row and column count and creates a new grid based on them.
* The new grid replaces the old grid if one existed.
- *
+ * <p>
+ * For internal use only. May be renamed or removed in a future release.
+ *
* @param rowCount
* @param columnCount
*/
- protected void updateGrid(int rowCount, int columnCount) {
+ public void updateGrid(int rowCount, int columnCount) {
rows = rowCount;
columns = columnCount;
this.remove(grid);
@@ -83,12 +85,14 @@ public class VColorPickerGrid extends AbsolutePanel
* Updates the changed colors within the grid based on the given x- and
* y-coordinates. Nothing happens if any of the parameters is null or the
* parameter lengths don't match.
+ * <p>
+ * For internal use only. May be renamed or removed in a future release.
*
* @param changedColor
* @param changedX
* @param changedY
*/
- protected void updateColor(String[] changedColor, String[] changedX,
+ public void updateColor(String[] changedColor, String[] changedX,
String[] changedY) {
if (changedColor != null && changedX != null && changedY != null) {
if (changedColor.length == changedX.length
@@ -109,22 +113,24 @@ public class VColorPickerGrid extends AbsolutePanel
/**
* Returns currently selected x-coordinate of the grid.
*/
- protected int getSelectedX() {
+ public int getSelectedX() {
return selectedX;
}
/**
* Returns currently selected y-coordinate of the grid.
*/
- protected int getSelectedY() {
+ public int getSelectedY() {
return selectedY;
}
/**
* Returns true if the colors have been successfully updated at least once,
* false otherwise.
+ * <p>
+ * For internal use only. May be renamed or removed in a future release.
*/
- protected boolean isGridLoaded() {
+ public boolean isGridLoaded() {
return gridLoaded;
}