summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/terminal/AbstractClientConnector.java14
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java4
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/ClientConnector.java2
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java2
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java10
-rw-r--r--server/src/com/vaadin/ui/Component.java4
-rw-r--r--server/src/com/vaadin/ui/ConnectorTracker.java2
-rw-r--r--server/src/com/vaadin/ui/LoginForm.java2
-rw-r--r--server/src/com/vaadin/ui/UI.java12
-rw-r--r--server/src/com/vaadin/ui/Window.java4
-rw-r--r--tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java2
-rw-r--r--tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java2
-rw-r--r--tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/TouchScrollables.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java2
-rwxr-xr-xtests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java4
-rw-r--r--tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java2
-rw-r--r--tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest2.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest4.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest5.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest6.java2
-rw-r--r--tests/testbench/com/vaadin/tests/dd/DDTest7.java2
-rw-r--r--tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java2
-rw-r--r--tests/testbench/com/vaadin/tests/serialization/SerializerTest.java4
-rw-r--r--tests/testbench/com/vaadin/tests/tickets/Ticket34.java2
34 files changed, 57 insertions, 57 deletions
diff --git a/server/src/com/vaadin/terminal/AbstractClientConnector.java b/server/src/com/vaadin/terminal/AbstractClientConnector.java
index 87e1dbaa38..157bd17e41 100644
--- a/server/src/com/vaadin/terminal/AbstractClientConnector.java
+++ b/server/src/com/vaadin/terminal/AbstractClientConnector.java
@@ -94,7 +94,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
/* Documentation copied from interface */
@Override
public void markAsDirty() {
- UI uI = getRoot();
+ UI uI = getUI();
if (uI != null) {
uI.getConnectorTracker().markDirty(this);
}
@@ -154,7 +154,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
sharedState = createState();
}
- UI uI = getRoot();
+ UI uI = getUI();
if (uI != null && !uI.getConnectorTracker().isDirty(this)) {
requestRepaint();
}
@@ -363,7 +363,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
* @return The connector's application, or <code>null</code> if not attached
*/
protected Application getApplication() {
- UI uI = getRoot();
+ UI uI = getUI();
if (uI == null) {
return null;
} else {
@@ -380,7 +380,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
* is found.
*/
@Override
- public UI getRoot() {
+ public UI getUI() {
ClientConnector connector = this;
while (connector != null) {
if (connector instanceof UI) {
@@ -528,7 +528,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
public void attach() {
markAsDirty();
- getRoot().getConnectorTracker().registerConnector(this);
+ getUI().getConnectorTracker().registerConnector(this);
for (ClientConnector connector : getAllChildrenIterable(this)) {
connector.attach();
@@ -540,7 +540,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
* {@inheritDoc}
*
* <p>
- * The {@link #getApplication()} and {@link #getRoot()} methods might return
+ * The {@link #getApplication()} and {@link #getUI()} methods might return
* <code>null</code> after this method is called.
* </p>
*/
@@ -550,7 +550,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
connector.detach();
}
- getRoot().getConnectorTracker().unregisterConnector(this);
+ getUI().getConnectorTracker().unregisterConnector(this);
}
@Override
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index 7662564233..e19cfc4de6 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -1245,7 +1245,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
public static JSONObject encodeState(ClientConnector connector,
SharedState state) throws JSONException {
- UI uI = connector.getRoot();
+ UI uI = connector.getUI();
ConnectorTracker connectorTracker = uI.getConnectorTracker();
Class<? extends SharedState> stateType = connector.getStateType();
Object diffState = connectorTracker.getDiffState(connector);
@@ -2353,7 +2353,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
* handling post
*/
String paintableId = owner.getConnectorId();
- int rootId = owner.getRoot().getUIId();
+ int rootId = owner.getUI().getUIId();
String key = rootId + "/" + paintableId + "/" + name;
if (pidToNameToStreamVariable == null) {
diff --git a/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java b/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
index 3a18dbd6f4..1a5019a7c1 100644
--- a/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
+++ b/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
@@ -180,7 +180,7 @@ public interface ClientConnector extends Connector, RpcTarget {
* @return The UI this connector is attached to or null if it is not
* attached to any UI
*/
- public UI getRoot();
+ public UI getUI();
/**
* Called before the shared state and RPC invocations are sent to the
diff --git a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
index 42312b72fd..0106f466fc 100644
--- a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
+++ b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
@@ -327,7 +327,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
}
@Override
- public UI getRoot() {
+ public UI getUI() {
return null;
}
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 147034fe6b..0b97e1667d 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -561,9 +561,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
* here, we use the default documentation from implemented interface.
*/
@Override
- public UI getRoot() {
+ public UI getUI() {
// Just make method from implemented Component interface public
- return super.getRoot();
+ return super.getUI();
}
/*
@@ -601,7 +601,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
if (this instanceof Focusable) {
final Application app = getApplication();
if (app != null) {
- getRoot().setFocusedComponent((Focusable) this);
+ getUI().setFocusedComponent((Focusable) this);
delayedFocus = false;
} else {
delayedFocus = true;
@@ -1310,13 +1310,13 @@ public abstract class AbstractComponent extends AbstractClientConnector
* component.
*/
private void setActionManagerViewer() {
- if (actionManager != null && getRoot() != null) {
+ if (actionManager != null && getUI() != null) {
// Attached and has action manager
Window w = findAncestor(Window.class);
if (w != null) {
actionManager.setViewer(w);
} else {
- actionManager.setViewer(getRoot());
+ actionManager.setViewer(getUI());
}
}
diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java
index 7406303af9..400dd66cac 100644
--- a/server/src/com/vaadin/ui/Component.java
+++ b/server/src/com/vaadin/ui/Component.java
@@ -518,7 +518,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* attached to a UI
*/
@Override
- public UI getRoot();
+ public UI getUI();
/**
* Gets the application object to which the component is attached.
@@ -548,7 +548,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* <p>
* Reimplementing the {@code attach()} method is useful for tasks that need
* to get a reference to the parent, window, or application object with the
- * {@link #getParent()}, {@link #getRoot()}, and {@link #getApplication()}
+ * {@link #getParent()}, {@link #getUI()}, and {@link #getApplication()}
* methods. A component does not yet know these objects in the constructor,
* so in such case, the methods will return {@code null}. For example, the
* following is invalid:
diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java
index 3a6e1e4ea8..c7c7bc9784 100644
--- a/server/src/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/com/vaadin/ui/ConnectorTracker.java
@@ -244,7 +244,7 @@ public class ConnectorTracker implements Serializable {
return null;
}
if (connector instanceof Component) {
- return ((Component) connector).getRoot();
+ return ((Component) connector).getUI();
}
return getRootForConnector(connector.getParent());
diff --git a/server/src/com/vaadin/ui/LoginForm.java b/server/src/com/vaadin/ui/LoginForm.java
index f127a2705b..1c154699d8 100644
--- a/server/src/com/vaadin/ui/LoginForm.java
+++ b/server/src/com/vaadin/ui/LoginForm.java
@@ -100,7 +100,7 @@ public class LoginForm extends CustomComponent {
String requestPathInfo = request.getRequestPathInfo();
if ("/loginHandler".equals(requestPathInfo)) {
// Ensure UI.getCurrent() works in listeners
- UI.setCurrent(getRoot());
+ UI.setCurrent(getUI());
response.setCacheTime(-1);
response.setContentType("text/html; charset=utf-8");
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 957e00385d..c0b3ed9929 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -515,10 +515,10 @@ public abstract class UI extends AbstractComponentContainer implements
*
* @return this UI
*
- * @see com.vaadin.ui.AbstractComponent#getRoot()
+ * @see com.vaadin.ui.AbstractComponent#getUI()
*/
@Override
- public UI getRoot() {
+ public UI getUI() {
return this;
}
@@ -543,9 +543,9 @@ public abstract class UI extends AbstractComponentContainer implements
if (pendingFocus != null) {
// ensure focused component is still attached to this main window
- if (pendingFocus.getRoot() == this
- || (pendingFocus.getRoot() != null && pendingFocus
- .getRoot().getParent() == this)) {
+ if (pendingFocus.getUI() == this
+ || (pendingFocus.getUI() != null && pendingFocus
+ .getUI().getParent() == this)) {
target.addAttribute("focused", pendingFocus);
}
pendingFocus = null;
@@ -804,7 +804,7 @@ public abstract class UI extends AbstractComponentContainer implements
*/
public void scrollIntoView(Component component)
throws IllegalArgumentException {
- if (component.getRoot() != this) {
+ if (component.getUI() != this) {
throw new IllegalArgumentException(
"The component where to scroll must belong to this UI.");
}
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index 335f7fd67d..ad2bbd0576 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -222,7 +222,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* </p>
*/
public void close() {
- UI uI = getRoot();
+ UI uI = getUI();
// Don't do anything if not attached to a root
if (uI != null) {
@@ -476,7 +476,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* <p>
*/
public void bringToFront() {
- UI uI = getRoot();
+ UI uI = getUI();
if (uI == null) {
throw new IllegalStateException(
"Window must be attached to parent before calling bringToFront method.");
diff --git a/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java b/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
index 4e26ffaf45..5ea4bc52c4 100644
--- a/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/tests/server-side/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -36,7 +36,7 @@ public class TestStreamVariableMapping extends TestCase {
};
owner = new Upload() {
@Override
- public UI getRoot() {
+ public UI getUI() {
return uI;
}
};
diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
index dd1675c75d..3a251ecbb9 100644
--- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
+++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
@@ -49,7 +49,7 @@ public class RemoveListenersOnDetach {
}
@Override
- public com.vaadin.ui.UI getRoot() {
+ public com.vaadin.ui.UI getUI() {
return uI;
};
diff --git a/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java b/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
index 7a06dedd63..9fa716a23e 100644
--- a/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
+++ b/tests/testbench/com/vaadin/tests/appengine/GAESyncTest.java
@@ -93,8 +93,8 @@ public class GAESyncTest extends Application.LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
- if (getRoot() == getMainWindow()) {
- getRoot().getPage().showNotification(
+ if (getUI() == getMainWindow()) {
+ getUI().getPage().showNotification(
new Notification("main"));
try {
Thread.sleep((5000));
diff --git a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
index 415f660c62..6c340804af 100644
--- a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
+++ b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java
@@ -51,7 +51,7 @@ public class TouchScrollables extends TestBase {
TestUtils
.injectCSS(
- getLayout().getRoot(),
+ getLayout().getUI(),
"body * {-webkit-user-select: none;} .v-table-row-drag-middle .v-table-cell-content {"
+ " background-color: inherit ; border-bottom: 1px solid cyan;"
+ "}"
@@ -81,7 +81,7 @@ public class TouchScrollables extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- getLayout().getRoot().scrollIntoView(l);
+ getLayout().getUI().scrollIntoView(l);
}
});
cssLayout.addComponent(button);
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
index c0490c127d..393a8ceb6b 100644
--- a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
@@ -25,7 +25,7 @@ public class ComboBoxInPopup extends TestBase {
close.setClickShortcut(KeyCode.ESCAPE, null);
w.addComponent(close);
- getLayout().getRoot().addWindow(w);
+ getLayout().getUI().addWindow(w);
}
diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
index 1bb3e7abe2..5091f3a929 100644
--- a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
+++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedApplet.java
@@ -38,6 +38,6 @@ public class EmbeddedApplet extends TestBase {
Window window = new Window("Testwindow");
window.addComponent(new Label("I am inside the window"));
- applet.getRoot().addWindow(window);
+ applet.getUI().addWindow(window);
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
index c3854d2420..252229cbe3 100644
--- a/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
+++ b/tests/testbench/com/vaadin/tests/components/embedded/EmbeddedPdf.java
@@ -35,7 +35,7 @@ public class EmbeddedPdf extends TestBase {
}
}));
- player.getRoot().addWindow(new Window("Testwindow"));
+ player.getUI().addWindow(new Window("Testwindow"));
}
}
diff --git a/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java b/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
index db64df936f..b9076a152d 100755
--- a/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
+++ b/tests/testbench/com/vaadin/tests/components/loginform/LoginFormRootInLoginHandler.java
@@ -23,7 +23,7 @@ public class LoginFormRootInLoginHandler extends TestBase {
} else {
addComponent(new Label("UI.getCurrent() is null"));
}
- UI r2 = ((LoginForm) event.getSource()).getRoot();
+ UI r2 = ((LoginForm) event.getSource()).getUI();
if (r2 != null) {
addComponent(new Label("event.getSource().data: "
+ r2.getData()));
@@ -34,7 +34,7 @@ public class LoginFormRootInLoginHandler extends TestBase {
}
});
addComponent(lf);
- getLayout().getRoot().setData("This root");
+ getLayout().getUI().setData("This root");
}
@Override
diff --git a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
index 46fd6ee852..08793e9a9c 100644
--- a/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
+++ b/tests/testbench/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
@@ -117,7 +117,7 @@ public class OrderedLayoutCases extends AbstractTestRoot {
protected void setup(WrappedRequest request) {
TestUtils
.injectCSS(
- getRoot(),
+ getUI(),
".sampleChild, .theLayout {border: 1px solid black;}"
+ ".theLayout > div:first-child {background: aqua;}"
+ ".theLayout > div:first-child + div {background: yellow;}"
diff --git a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
index 73d7a95e9f..6eaffa5cf3 100644
--- a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
+++ b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaWithKeyboardShortcuts.java
@@ -48,7 +48,7 @@ public class RichTextAreaWithKeyboardShortcuts extends TestBase {
@Override
protected void setup() {
- getLayout().getRoot().addActionHandler(actionHandler);
+ getLayout().getUI().addActionHandler(actionHandler);
getLayout().addComponent(createRichTextArea("InMainLayout"));
Panel panel = new Panel("RTA Panel");
@@ -61,7 +61,7 @@ public class RichTextAreaWithKeyboardShortcuts extends TestBase {
w.addComponent(createRichTextArea("InSubWindow"));
w.getContent().setSizeUndefined();
- getLayout().getRoot().addWindow(w);
+ getLayout().getUI().addWindow(w);
}
diff --git a/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java b/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
index 136dcfe9a5..9a94a203f1 100644
--- a/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
+++ b/tests/testbench/com/vaadin/tests/components/table/TableInTabsheet.java
@@ -18,7 +18,7 @@ public class TableInTabsheet extends AbstractTestRoot {
@Override
protected void setup(WrappedRequest request) {
- getRoot().setCaption("test");
+ getUI().setCaption("test");
VerticalLayout vPrinc = new VerticalLayout();
vPrinc.setStyleName(Reindeer.LAYOUT_BLUE);
diff --git a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
index a12a5a8836..b38dd36284 100644
--- a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
+++ b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEvents.java
@@ -88,7 +88,7 @@ public class TextChangeEvents extends TestBase {
@Override
public void attach() {
super.attach();
- TestUtils.injectCSS(getRoot(), ".match { background:green ;} "
+ TestUtils.injectCSS(getUI(), ".match { background:green ;} "
+ ".nomatch {background:red;}");
}
diff --git a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
index 5b84ff20f2..5991ac6ff7 100644
--- a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
+++ b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
@@ -24,7 +24,7 @@ public class TextChangeListenerChangingNonTextProperties extends TestBase {
super.attach();
TestUtils
.injectCSS(
- getRoot(),
+ getUI(),
".red { background:red;} "
+ ".green { background:green;} .blue { background:blue;} .cyan { background:cyan;} .magenta { background:magenta;}");
}
diff --git a/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java b/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
index fc8d7474af..1cdfdef0b5 100644
--- a/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
+++ b/tests/testbench/com/vaadin/tests/components/window/ExtraWindowShown.java
@@ -29,7 +29,7 @@ public class ExtraWindowShown extends TestBase {
iconButton
.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
w.addComponent(iconButton);
- event.getButton().getRoot().addWindow(w);
+ event.getButton().getUI().addWindow(w);
}
});
diff --git a/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
index e4a7e288ad..273d48514c 100644
--- a/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
+++ b/tests/testbench/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
@@ -64,7 +64,7 @@ public class SubWindowFocusAndBlurListeners extends TestBase {
}
});
- UI main = getLayout().getRoot();
+ UI main = getLayout().getUI();
main.addWindow(window);
diff --git a/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java b/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
index 0f0db3a028..5f55ad8cf3 100644
--- a/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
+++ b/tests/testbench/com/vaadin/tests/components/window/WindowScrollingUp.java
@@ -28,7 +28,7 @@ public class WindowScrollingUp extends AbstractTestCase {
@Override
public void buttonClick(ClickEvent event) {
- up.getRoot().setScrollTop(0);
+ up.getUI().setScrollTop(0);
}
});
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest2.java b/tests/testbench/com/vaadin/tests/dd/DDTest2.java
index 99020d0b5b..4d649c6056 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest2.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest2.java
@@ -45,7 +45,7 @@ public class DDTest2 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
/* darn reindeer has no icons */
/* Make all trees (their nodes actually) draggable */
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest4.java b/tests/testbench/com/vaadin/tests/dd/DDTest4.java
index bb85dff0b6..044fe1f49a 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest4.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest4.java
@@ -28,7 +28,7 @@ public class DDTest4 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
TestUtils
.injectCSS(
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest5.java b/tests/testbench/com/vaadin/tests/dd/DDTest5.java
index cb99b17da4..43342fdc35 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest5.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest5.java
@@ -47,7 +47,7 @@ public class DDTest5 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
HorizontalSortableCssLayoutWithWrappers verticalSortableCssLayoutWithWrappers = new HorizontalSortableCssLayoutWithWrappers();
w.addWindow(verticalSortableCssLayoutWithWrappers);
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest6.java b/tests/testbench/com/vaadin/tests/dd/DDTest6.java
index c6ac0b1859..f1e31c1452 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest6.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest6.java
@@ -164,7 +164,7 @@ public class DDTest6 extends TestBase {
getLayout().addComponent(sp);
TestUtils
.injectCSS(
- getLayout().getRoot(),
+ getLayout().getUI(),
""
+ ".v-tree .v-icon {height:16px;} "
+ ".v-tree-node-caption-drag-top {/*border-top: none;*/} "
diff --git a/tests/testbench/com/vaadin/tests/dd/DDTest7.java b/tests/testbench/com/vaadin/tests/dd/DDTest7.java
index 2af93c6c72..1abf9e379c 100644
--- a/tests/testbench/com/vaadin/tests/dd/DDTest7.java
+++ b/tests/testbench/com/vaadin/tests/dd/DDTest7.java
@@ -29,7 +29,7 @@ public class DDTest7 extends TestBase {
@Override
protected void setup() {
- UI w = getLayout().getRoot();
+ UI w = getLayout().getUI();
TestUtils
.injectCSS(
diff --git a/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java b/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
index 25821cb92c..7877ca3fe3 100644
--- a/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
+++ b/tests/testbench/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
@@ -73,7 +73,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
restart.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
- mainLayout.getRoot().getApplication().close();
+ mainLayout.getUI().getApplication().close();
}
});
diff --git a/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java b/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
index a301ecf828..3e194010d1 100644
--- a/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
+++ b/tests/testbench/com/vaadin/tests/serialization/SerializerTest.java
@@ -98,12 +98,12 @@ public class SerializerTest extends AbstractTestRoot {
}, new HashMap<Connector, Boolean>() {
{
put(testExtension, true);
- put(getRoot(), false);
+ put(getUI(), false);
}
}, new HashMap<Integer, Connector>() {
{
put(5, testExtension);
- put(10, getRoot());
+ put(10, getUI());
}
}, new HashMap<SimpleTestBean, SimpleTestBean>() {
{
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket34.java b/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
index 15d55ba643..67db77a5af 100644
--- a/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
+++ b/tests/testbench/com/vaadin/tests/tickets/Ticket34.java
@@ -95,7 +95,7 @@ public class Ticket34 extends Application.LegacyApplication {
public void buttonClick(ClickEvent event) {
String viewName = tf.getValue().toString();
// fragmentChangedListener will change the view if possible
- event.getButton().getRoot().getPage().setFragment(viewName);
+ event.getButton().getUI().getPage().setFragment(viewName);
}
});