summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui')
-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
6 files changed, 17 insertions, 17 deletions
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.");