diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-08-24 16:33:15 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-08-24 16:38:15 +0300 |
commit | fc3f7f62b05ae69b242d64084f676d7733962c60 (patch) | |
tree | 3873a0e95b2496f0446fb1e19477f6e41f90ee3c /shared/src | |
parent | d379f5cb09a8530b9f6f24c600c5cc5acc7f36ea (diff) | |
download | vaadin-framework-fc3f7f62b05ae69b242d64084f676d7733962c60.tar.gz vaadin-framework-fc3f7f62b05ae69b242d64084f676d7733962c60.zip |
Migrate Slider to Vaadin 7 (#9304)
Diffstat (limited to 'shared/src')
3 files changed, 79 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java b/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java new file mode 100644 index 0000000000..d130550946 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/slider/SliderOrientation.java @@ -0,0 +1,5 @@ +package com.vaadin.shared.ui.slider; + +public enum SliderOrientation { + HORIZONTAL, VERTICAL; +} diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java b/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java new file mode 100644 index 0000000000..6ea02f0a95 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/slider/SliderServerRpc.java @@ -0,0 +1,14 @@ +package com.vaadin.shared.ui.slider; + +import com.vaadin.shared.communication.ServerRpc; + +public interface SliderServerRpc extends ServerRpc { + + /** + * Invoked when the value of a variable has changed. Slider listeners are + * notified if the slider value has changed. + * + * @param value + */ + public void valueChanged(double value); +} diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderState.java b/shared/src/com/vaadin/shared/ui/slider/SliderState.java new file mode 100644 index 0000000000..98168b80af --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/slider/SliderState.java @@ -0,0 +1,60 @@ +package com.vaadin.shared.ui.slider; + +import com.vaadin.shared.AbstractFieldState; + +public class SliderState extends AbstractFieldState { + + protected double value; + + protected double maxValue; + protected double minValue; + + /** + * The number of fractional digits that are considered significant. Must be + * non-negative. + */ + protected int resolution; + + protected SliderOrientation orientation; + + public double getValue() { + return value; + } + + public void setValue(double value) { + this.value = value; + } + + public double getMaxValue() { + return maxValue; + } + + public void setMaxValue(double maxValue) { + this.maxValue = maxValue; + } + + public double getMinValue() { + return minValue; + } + + public void setMinValue(double minValue) { + this.minValue = minValue; + } + + public int getResolution() { + return resolution; + } + + public void setResolution(int resolution) { + this.resolution = resolution; + } + + public SliderOrientation getOrientation() { + return orientation; + } + + public void setOrientation(SliderOrientation orientation) { + this.orientation = orientation; + } + +} |