summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-08-28 10:06:06 +0300
committerJohn Ahlroos <john@vaadin.com>2012-08-28 10:06:06 +0300
commit04664a99cd88442b87d147e5951caef07742ddc2 (patch)
treec5b94fe8f68a45356bcb43410b4508e22a53e3af
parent435a2e735251464529f8329b0563c26d5b4cc6a9 (diff)
downloadvaadin-framework-04664a99cd88442b87d147e5951caef07742ddc2.tar.gz
vaadin-framework-04664a99cd88442b87d147e5951caef07742ddc2.zip
Fixed conflicting issues from merge
-rw-r--r--client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractBoxLayoutConnector.java91
-rw-r--r--client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/VBoxLayout.java14
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java80
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java30
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java22
-rw-r--r--tests/testbench/com/vaadin/tests/themes/LiferayThemeTest.java4
7 files changed, 137 insertions, 108 deletions
diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractBoxLayoutConnector.java b/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractBoxLayoutConnector.java
index bbf9aed570..82bf4e0108 100644
--- a/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractBoxLayoutConnector.java
+++ b/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractBoxLayoutConnector.java
@@ -1,4 +1,4 @@
-/*
+/*
@VaadinApache2LicenseForJavaFiles@
*/
package com.vaadin.terminal.gwt.client.ui.orderedlayout;
@@ -12,7 +12,7 @@ import com.google.gwt.user.client.Element;
import com.vaadin.shared.AbstractFieldState;
import com.vaadin.shared.ui.AlignmentInfo;
import com.vaadin.shared.ui.LayoutClickRpc;
-import com.vaadin.shared.ui.VMarginInfo;
+import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -30,7 +30,7 @@ import com.vaadin.terminal.gwt.client.ui.orderedlayout.VBoxLayout.CaptionPositio
import com.vaadin.terminal.gwt.client.ui.orderedlayout.VBoxLayout.Slot;
public abstract class AbstractBoxLayoutConnector extends
- AbstractLayoutConnector /* implements PostLayoutListener */{
+AbstractLayoutConnector /* implements PostLayoutListener */{
AbstractOrderedLayoutServerRpc rpc;
@@ -101,52 +101,53 @@ public abstract class AbstractBoxLayoutConnector extends
*/
private HashMap<Element, Integer> childCaptionElementHeight = new HashMap<Element, Integer>();
+ @Override
public void updateCaption(ComponentConnector child) {
Slot slot = getWidget().getSlot(child);
String caption = child.getState().getCaption();
String iconUrl = child.getState().getIcon() != null ? child.getState()
.getIcon().getURL() : null;
- List<String> styles = child.getState().getStyles();
- String error = child.getState().getErrorMessage();
- boolean showError = error != null;
- if (child.getState() instanceof AbstractFieldState) {
- AbstractFieldState abstractFieldState = (AbstractFieldState) child
- .getState();
- showError = showError && !abstractFieldState.isHideErrors();
- }
- boolean required = false;
- if (child instanceof AbstractFieldConnector) {
- required = ((AbstractFieldConnector) child).isRequired();
- }
- boolean enabled = child.getState().isEnabled();
+ List<String> styles = child.getState().getStyles();
+ String error = child.getState().getErrorMessage();
+ boolean showError = error != null;
+ if (child.getState() instanceof AbstractFieldState) {
+ AbstractFieldState abstractFieldState = (AbstractFieldState) child
+ .getState();
+ showError = showError && !abstractFieldState.isHideErrors();
+ }
+ boolean required = false;
+ if (child instanceof AbstractFieldConnector) {
+ required = ((AbstractFieldConnector) child).isRequired();
+ }
+ boolean enabled = child.getState().isEnabled();
- slot.setCaption(caption, iconUrl, styles, error, showError, required,
- enabled);
+ slot.setCaption(caption, iconUrl, styles, error, showError, required,
+ enabled);
- slot.setRelativeWidth(child.isRelativeWidth());
- slot.setRelativeHeight(child.isRelativeHeight());
+ slot.setRelativeWidth(child.isRelativeWidth());
+ slot.setRelativeHeight(child.isRelativeHeight());
- if (slot.hasCaption()) {
- CaptionPosition pos = slot.getCaptionPosition();
- getLayoutManager().addElementResizeListener(
- slot.getCaptionElement(), slotCaptionResizeListener);
- if (child.isRelativeHeight()
- && (pos == CaptionPosition.TOP || pos == CaptionPosition.BOTTOM)) {
- getWidget().updateCaptionOffset(slot.getCaptionElement());
- } else if (child.isRelativeWidth()
- && (pos == CaptionPosition.LEFT || pos == CaptionPosition.RIGHT)) {
- getWidget().updateCaptionOffset(slot.getCaptionElement());
- }
- } else {
- childCaptionElementHeight.remove(child.getWidget().getElement());
- }
+ if (slot.hasCaption()) {
+ CaptionPosition pos = slot.getCaptionPosition();
+ getLayoutManager().addElementResizeListener(
+ slot.getCaptionElement(), slotCaptionResizeListener);
+ if (child.isRelativeHeight()
+ && (pos == CaptionPosition.TOP || pos == CaptionPosition.BOTTOM)) {
+ getWidget().updateCaptionOffset(slot.getCaptionElement());
+ } else if (child.isRelativeWidth()
+ && (pos == CaptionPosition.LEFT || pos == CaptionPosition.RIGHT)) {
+ getWidget().updateCaptionOffset(slot.getCaptionElement());
+ }
+ } else {
+ childCaptionElementHeight.remove(child.getWidget().getElement());
+ }
- updateLayoutHeight();
+ updateLayoutHeight();
- if (needsExpand()) {
- updateExpand();
- }
+ if (needsExpand()) {
+ updateExpand();
+ }
}
@Override
@@ -174,15 +175,15 @@ public abstract class AbstractBoxLayoutConnector extends
needsMeasure.remove(child.getWidget().getElement());
// childElementHeight.remove(child.getWidget().getElement());
childCaptionElementHeight
- .remove(child.getWidget().getElement());
+ .remove(child.getWidget().getElement());
getLayoutManager().removeElementResizeListener(
child.getWidget().getElement(),
childComponentResizeListener);
if (slot.hasCaption()) {
getLayoutManager()
- .removeElementResizeListener(
- slot.getCaptionElement(),
- slotCaptionResizeListener);
+ .removeElementResizeListener(
+ slot.getCaptionElement(),
+ slotCaptionResizeListener);
}
if (slot.getSpacingElement() != null) {
getLayoutManager().removeElementResizeListener(
@@ -207,7 +208,7 @@ public abstract class AbstractBoxLayoutConnector extends
super.onStateChanged(stateChangeEvent);
clickEventHandler.handleEventHandlerRegistration();
- getWidget().setMargin(new VMarginInfo(getState().getMarginsBitmask()));
+ getWidget().setMargin(new MarginInfo(getState().getMarginsBitmask()));
getWidget().setSpacing(getState().isSpacing());
hasExpandRatio.clear();
@@ -265,6 +266,7 @@ public abstract class AbstractBoxLayoutConnector extends
}
StateChangeHandler childStateChangeHandler = new StateChangeHandler() {
+ @Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
ComponentConnector child = (ComponentConnector) stateChangeEvent
@@ -413,6 +415,7 @@ public abstract class AbstractBoxLayoutConnector extends
// };
private ElementResizeListener slotCaptionResizeListener = new ElementResizeListener() {
+ @Override
public void onElementResize(ElementResizeEvent e) {
// Get all needed element references
@@ -471,6 +474,7 @@ public abstract class AbstractBoxLayoutConnector extends
};
private ElementResizeListener childComponentResizeListener = new ElementResizeListener() {
+ @Override
public void onElementResize(ElementResizeEvent e) {
// int h = getLayoutManager().getOuterHeight(e.getElement());
// childElementHeight.put((Element) e.getElement().cast(), h);
@@ -483,6 +487,7 @@ public abstract class AbstractBoxLayoutConnector extends
};
private ElementResizeListener spacingResizeListener = new ElementResizeListener() {
+ @Override
public void onElementResize(ElementResizeEvent e) {
if (needsExpand()) {
updateExpand();
diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/VBoxLayout.java b/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/VBoxLayout.java
index dcc33a36b7..c8fff17cba 100644
--- a/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/VBoxLayout.java
+++ b/client/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/VBoxLayout.java
@@ -1,4 +1,4 @@
-/*
+/*
@VaadinApache2LicenseForJavaFiles@
*/
package com.vaadin.terminal.gwt.client.ui.orderedlayout;
@@ -20,7 +20,7 @@ import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.shared.ui.AlignmentInfo;
-import com.vaadin.shared.ui.VMarginInfo;
+import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.LayoutManager;
@@ -374,7 +374,7 @@ public class VBoxLayout extends FlowPanel {
captionWrap.getStyle().setProperty(
direction,
getWidget().getElement().getStyle()
- .getProperty(direction));
+ .getProperty(direction));
captionWrap.addClassName("v-has-" + direction);
} else if (hasCaption()) {
if (direction.equals("height")) {
@@ -548,7 +548,7 @@ public class VBoxLayout extends FlowPanel {
}
}
- void setMargin(VMarginInfo marginInfo) {
+ void setMargin(MarginInfo marginInfo) {
toggleStyleName("v-margin-top", marginInfo.hasTop());
toggleStyleName("v-margin-right", marginInfo.hasRight());
toggleStyleName("v-margin-bottom", marginInfo.hasBottom());
@@ -698,11 +698,11 @@ public class VBoxLayout extends FlowPanel {
if (vertical) {
expandWrapper.getStyle().setPaddingTop(totalSize, Unit.PX);
expandWrapper.getFirstChildElement().getStyle()
- .setMarginTop(-totalSize, Unit.PX);
+ .setMarginTop(-totalSize, Unit.PX);
} else {
expandWrapper.getStyle().setPaddingLeft(totalSize, Unit.PX);
expandWrapper.getFirstChildElement().getStyle()
- .setMarginLeft(-totalSize, Unit.PX);
+ .setMarginLeft(-totalSize, Unit.PX);
}
recalculateExpands();
@@ -740,7 +740,7 @@ public class VBoxLayout extends FlowPanel {
newHeight = getElement().getOffsetHeight();
}
VBoxLayout.this.getElement().getStyle()
- .setHeight(newHeight, Unit.PX);
+ .setHeight(newHeight, Unit.PX);
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
index 86015a0109..d235086ca9 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
@@ -12,7 +12,7 @@ import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.UserError;
import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.AbstractOrderedLayout;
@@ -30,7 +30,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
@Theme("tests-components")
-public class BoxLayoutTest extends AbstractTestRoot {
+public class BoxLayoutTest extends AbstractTestUI {
protected AbstractOrderedLayout view;
@@ -66,7 +66,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
}
setContent(view);
- getApplication().setRootPreserved(true);
+ getApplication().setUiPreserved(true);
}
private Component createHorizontalTest() {
@@ -108,6 +108,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
final CheckBox vertical = new CheckBox("Vertical", !horizontal);
vertical.setImmediate(true);
vertical.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
view.removeAllComponents();
@@ -124,37 +125,40 @@ public class BoxLayoutTest extends AbstractTestRoot {
Button addComponent = new Button("Add Component",
new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ GridLayout grid = new GridLayout(2, 2);
+ Button grow = new Button("Grow Me",
+ new Button.ClickListener() {
+ @Override
public void buttonClick(ClickEvent event) {
- GridLayout grid = new GridLayout(2, 2);
- Button grow = new Button("Grow Me",
- new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- if (event.getButton().getWidth() == -1) {
- event.getButton().setHeight("50px");
- event.getButton().setWidth("200px");
- } else {
- event.getButton()
- .setSizeUndefined();
- }
- }
- });
- grid.addComponent(new Label("Grid cell 1"));
- grid.addComponent(new Label("Grid cell 2"));
- grid.addComponent(grow);
- grid.addComponent(new Label("Grid cell 4"));
- l.addComponent(grid);
- // l.addComponent(new TextField("Some field"));
+ if (event.getButton().getWidth() == -1) {
+ event.getButton().setHeight("50px");
+ event.getButton().setWidth("200px");
+ } else {
+ event.getButton()
+ .setSizeUndefined();
+ }
}
});
+ grid.addComponent(new Label("Grid cell 1"));
+ grid.addComponent(new Label("Grid cell 2"));
+ grid.addComponent(grow);
+ grid.addComponent(new Label("Grid cell 4"));
+ l.addComponent(grid);
+ // l.addComponent(new TextField("Some field"));
+ }
+ });
header.addComponent(addComponent);
Button removeComponent = new Button("Remove Component",
new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- Component last = l.getComponent(l.getComponentCount() - 1);
- l.removeComponent(last);
- }
- });
+ @Override
+ public void buttonClick(ClickEvent event) {
+ Component last = l.getComponent(l.getComponentCount() - 1);
+ l.removeComponent(last);
+ }
+ });
header.addComponent(removeComponent);
// Second row
@@ -175,6 +179,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
final NativeSelect width = new NativeSelect(null, sizes);
width.setImmediate(true);
width.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (width.getValue() != null) {
l.setWidth(width.getValue().toString());
@@ -188,6 +193,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
final NativeSelect height = new NativeSelect(null, sizes);
height.setImmediate(true);
height.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (height.getValue() != null) {
l.setHeight(height.getValue().toString());
@@ -200,6 +206,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
final CheckBox margin = new CheckBox("Margin", false);
margin.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
l.setMargin(margin.getValue().booleanValue());
}
@@ -210,6 +217,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
final CheckBox spacing = new CheckBox("Spacing", false);
spacing.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
l.setSpacing(spacing.getValue().booleanValue());
}
@@ -241,6 +249,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
align.setNullSelectionAllowed(false);
align.select(Alignment.TOP_LEFT);
align.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (target == null) {
return;
@@ -254,6 +263,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
expand.setImmediate(true);
expand.setEnabled(false);
expand.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (target != null) {
l.setExpandRatio(target, expand.getValue() ? 1 : 0);
@@ -276,6 +286,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentWidth.setImmediate(true);
componentWidth.setEnabled(false);
componentWidth.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (target == null) {
return;
@@ -294,6 +305,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentHeight.setImmediate(true);
componentHeight.setEnabled(false);
componentHeight.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (componentHeight.getValue() != null) {
target.setHeight(componentHeight.getValue().toString());
@@ -309,6 +321,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentCaption.setImmediate(true);
componentCaption.setEnabled(false);
componentCaption.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (componentCaption.getValue() != null) {
target.setCaption(componentCaption.getValue().toString());
@@ -324,6 +337,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentIcon.setImmediate(true);
componentIcon.setEnabled(false);
componentIcon.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (componentIcon.getValue() != null) {
target.setIcon(new ThemeResource(componentIcon.getValue()
@@ -339,6 +353,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentDescription.setImmediate(true);
componentDescription.setEnabled(false);
componentDescription.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
target.setDescription(componentDescription.getValue());
}
@@ -349,6 +364,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentError.setImmediate(true);
componentError.setEnabled(false);
componentError.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (target != null) {
target.setComponentError(componentError.getValue() ? new UserError(
@@ -362,6 +378,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
componentRequired.setImmediate(true);
componentRequired.setEnabled(false);
componentRequired.addListener(new ValueChangeListener() {
+ @Override
public void valueChange(ValueChangeEvent event) {
if (target != null && target instanceof AbstractField) {
((AbstractField<?>) target).setRequired(componentRequired
@@ -389,6 +406,7 @@ public class BoxLayoutTest extends AbstractTestRoot {
l.addComponent(new Button("Component 2"));
l.addListener(new LayoutClickListener() {
+ @Override
public void layoutClick(LayoutClickEvent event) {
if (event.getChildComponent() == null
|| target == event.getChildComponent()) {
@@ -416,15 +434,15 @@ public class BoxLayoutTest extends AbstractTestRoot {
if (target != null) {
if (target.getWidth() > -1) {
componentWidth.select(new Float(target.getWidth())
- .intValue()
- + target.getWidthUnits().getSymbol());
+ .intValue()
+ + target.getWidthUnits().getSymbol());
} else {
componentWidth.select(null);
}
if (target.getHeight() > -1) {
componentHeight.select(new Float(target.getHeight())
- .intValue()
- + target.getHeightUnits().getSymbol());
+ .intValue()
+ + target.getHeightUnits().getSymbol());
} else {
componentHeight.select(null);
}
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
index 871a467877..961ec86ab0 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
@@ -6,7 +6,7 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Root;
+import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
@@ -14,7 +14,7 @@ public class LayoutRenderTimeTest extends LegacyApplication {
@Override
public void init() {
- Root.LegacyWindow main = new Root.LegacyWindow();
+ UI.LegacyWindow main = new UI.LegacyWindow();
setMainWindow(main);
VerticalLayout root = new VerticalLayout();
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
index 62c552ee75..c52543d6f2 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
@@ -37,27 +37,27 @@ public class LayoutResizeTest extends TestBase {
Button resize = new Button("Resize to 700x400",
new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- event.getButton()
- .getRoot()
- .getPage()
- .getJavaScript()
- .execute(
- "setTimeout(function() {window.resizeTo(700,400)}, 500)");
- }
- });
+ @Override
+ public void buttonClick(ClickEvent event) {
+ event.getButton()
+ .getUI()
+ .getPage()
+ .getJavaScript()
+ .execute(
+ "setTimeout(function() {window.resizeTo(700,400)}, 500)");
+ }
+ });
left.addComponent(resize);
resize = new Button("Resize to 900x600", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
event.getButton()
- .getRoot()
- .getPage()
- .getJavaScript()
- .execute(
- "setTimeout(function() {window.resizeTo(900,600)}, 500)");
+ .getUI()
+ .getPage()
+ .getJavaScript()
+ .execute(
+ "setTimeout(function() {window.resizeTo(900,600)}, 500)");
}
});
left.addComponent(resize);
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
index 973bd63d76..5ebb702baf 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
@@ -1,10 +1,12 @@
package com.vaadin.tests.components.orderedlayout;
import com.vaadin.annotations.Theme;
+import com.vaadin.shared.ui.MarginInfo;
+import com.vaadin.shared.ui.slider.SliderOrientation;
import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.ComboBox;
@@ -19,7 +21,7 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
@Theme("tests-components")
-public class VaadinTunesLayout extends AbstractTestRoot {
+public class VaadinTunesLayout extends AbstractTestUI {
@Override
public void setup(WrappedRequest request) {
@@ -53,7 +55,9 @@ public class VaadinTunesLayout extends AbstractTestRoot {
// modes and search
HorizontalLayout top = new HorizontalLayout();
top.setWidth("100%");
- top.setMargin(false, true, false, true); // Enable horizontal margins
+ top.setMargin(new MarginInfo(false, true, false, true)); // Enable
+ // horizontal
+ // margins
top.setSpacing(true);
// Let's attach that one straight away too
@@ -100,7 +104,7 @@ public class VaadinTunesLayout extends AbstractTestRoot {
// Volume controls
Button mute = new NativeButton("mute");
Slider vol = new Slider();
- vol.setOrientation(Slider.ORIENTATION_HORIZONTAL);
+ vol.setOrientation(SliderOrientation.HORIZONTAL);
vol.setWidth("100px");
Button max = new NativeButton("max");
volume.addComponent(mute);
@@ -123,7 +127,7 @@ public class VaadinTunesLayout extends AbstractTestRoot {
track.setWidth(null);
album.setWidth(null);
Slider progress = new Slider();
- progress.setOrientation(Slider.ORIENTATION_HORIZONTAL);
+ progress.setOrientation(SliderOrientation.HORIZONTAL);
progress.setWidth("100%");
trackDetails.addComponent(track);
trackDetails.addComponent(album);
@@ -252,7 +256,7 @@ public class VaadinTunesLayout extends AbstractTestRoot {
"Bullet For My Valentine", "Chasing Victory", "Chimaira",
"Danko Jones", "Deadlock", "Deftones", "From Autumn To Ashes",
"Haste The Day", "Four Year Strong", "In Flames", "Kemopetrol",
- "John Legend" };
+ "John Legend" };
String[] albums = new String[] { "Once Again", "The Caitiff Choir",
"The Devil And God", "Light Grenades", "Dicthonomy",
"Back In Black", "Dreamer", "Come Clarity", "Year Zero",
@@ -261,7 +265,7 @@ public class VaadinTunesLayout extends AbstractTestRoot {
String[] genres = new String[] { "Rock", "Metal", "Hardcore", "Indie",
"Pop", "Alternative", "Blues", "Jazz", "Hip Hop",
"Electronica", "Punk", "Hard Rock", "Dance", "R'n'B", "Gospel",
- "Country" };
+ "Country" };
for (int i = 0; i < 1000; i++) {
NativeSelect s = new NativeSelect();
s.addItem("1 star");
@@ -294,7 +298,9 @@ public class VaadinTunesLayout extends AbstractTestRoot {
top.setHeight("75px"); // Same as the background image height
playback.setStyleName("playback");
- playback.setMargin(false, true, false, false); // Add right-side margin
+ playback.setMargin(new MarginInfo(false, true, false, false)); // Add
+ // right-side
+ // margin
play.setStyleName("play");
next.setStyleName("next");
prev.setStyleName("prev");
diff --git a/tests/testbench/com/vaadin/tests/themes/LiferayThemeTest.java b/tests/testbench/com/vaadin/tests/themes/LiferayThemeTest.java
index fa15d88799..f956a93cd5 100644
--- a/tests/testbench/com/vaadin/tests/themes/LiferayThemeTest.java
+++ b/tests/testbench/com/vaadin/tests/themes/LiferayThemeTest.java
@@ -2,13 +2,13 @@ package com.vaadin.tests.themes;
import com.vaadin.annotations.Theme;
import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.tests.components.AbstractTestRoot;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.themes.LiferayTheme;
@Theme("liferay")
-public class LiferayThemeTest extends AbstractTestRoot {
+public class LiferayThemeTest extends AbstractTestUI {
@Override
protected void setup(WrappedRequest request) {