summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-08-24 16:33:15 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-08-24 16:38:15 +0300
commitfc3f7f62b05ae69b242d64084f676d7733962c60 (patch)
tree3873a0e95b2496f0446fb1e19477f6e41f90ee3c /tests
parentd379f5cb09a8530b9f6f24c600c5cc5acc7f36ea (diff)
downloadvaadin-framework-fc3f7f62b05ae69b242d64084f676d7733962c60.tar.gz
vaadin-framework-fc3f7f62b05ae69b242d64084f676d7733962c60.zip
Migrate Slider to Vaadin 7 (#9304)
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/slider/SliderTest.java11
-rw-r--r--tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java5
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/slider/SliderTest.java b/tests/testbench/com/vaadin/tests/components/slider/SliderTest.java
index 9be1fea987..0b9c2d6c5a 100644
--- a/tests/testbench/com/vaadin/tests/components/slider/SliderTest.java
+++ b/tests/testbench/com/vaadin/tests/components/slider/SliderTest.java
@@ -2,6 +2,7 @@ package com.vaadin.tests.components.slider;
import java.util.LinkedHashMap;
+import com.vaadin.shared.ui.slider.SliderOrientation;
import com.vaadin.tests.components.abstractfield.AbstractFieldTest;
import com.vaadin.ui.Slider;
@@ -21,9 +22,9 @@ public class SliderTest extends AbstractFieldTest<Slider> {
}
};
- private Command<Slider, Integer> orientationCommand = new Command<Slider, Integer>() {
+ private Command<Slider, SliderOrientation> orientationCommand = new Command<Slider, SliderOrientation>() {
@Override
- public void execute(Slider c, Integer value, Object data) {
+ public void execute(Slider c, SliderOrientation value, Object data) {
c.setOrientation(value);
}
};
@@ -56,9 +57,9 @@ public class SliderTest extends AbstractFieldTest<Slider> {
}
private void createOrientationSelect(String category) {
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
- options.put("Horizontal", Slider.ORIENTATION_HORIZONTAL);
- options.put("Vertical", Slider.ORIENTATION_VERTICAL);
+ LinkedHashMap<String, SliderOrientation> options = new LinkedHashMap<String, SliderOrientation>();
+ options.put("Horizontal", SliderOrientation.HORIZONTAL);
+ options.put("Vertical", SliderOrientation.VERTICAL);
createSelectAction("Orientation", category, options, "Horizontal",
orientationCommand);
diff --git a/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java b/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java
index 41a3d18f9f..a233191070 100644
--- a/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java
+++ b/tests/testbench/com/vaadin/tests/integration/LiferayThemeDemo.java
@@ -10,6 +10,7 @@ import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.event.Action;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.shared.ui.slider.SliderOrientation;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.Page;
import com.vaadin.terminal.Resource;
@@ -39,7 +40,6 @@ import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Panel;
import com.vaadin.ui.PopupView;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Slider;
import com.vaadin.ui.Slider.ValueOutOfBoundsException;
import com.vaadin.ui.TabSheet;
@@ -50,6 +50,7 @@ import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TwinColSelect;
+import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.VerticalSplitPanel;
import com.vaadin.ui.Window;
@@ -534,7 +535,7 @@ public class LiferayThemeDemo extends Application.LegacyApplication {
l.addComponent(new Label("Vertical Slider", ContentMode.XHTML));
s = new Slider();
- s.setOrientation(Slider.ORIENTATION_VERTICAL);
+ s.setOrientation(SliderOrientation.VERTICAL);
s.setHeight("200px");
try {
s.setValue(50);