]> source.dussan.org Git - vaadin-framework.git/commitdiff
Rename Application.getRootConnector to getUIConnector (#10158) 33/233/1
authorJohannes Dahlström <johannesd@vaadin.com>
Thu, 8 Nov 2012 14:25:03 +0000 (16:25 +0200)
committerJohannes Dahlström <johannesd@vaadin.com>
Thu, 8 Nov 2012 14:25:03 +0000 (16:25 +0200)
Change-Id: I9f7714cc8a723550e521b1cd0fb70499f3f12138

client/src/com/vaadin/client/ApplicationConnection.java
client/src/com/vaadin/client/ComponentLocator.java
client/src/com/vaadin/client/LayoutManager.java
client/src/com/vaadin/client/Util.java
client/src/com/vaadin/client/VDebugConsole.java
client/src/com/vaadin/client/ui/VOverlay.java
client/src/com/vaadin/client/ui/notification/VNotification.java
client/src/com/vaadin/client/ui/window/WindowConnector.java
uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java

index e227ef64e473bbbb67940617c222c4391ea68835..5475be487709f8cc6e283503ced2d5739d9aa1b3 100644 (file)
@@ -1502,10 +1502,10 @@ public class ApplicationConnection {
                         if (!c.getParent().getChildren().contains(c)) {
                             VConsole.error("ERROR: Connector is connected to a parent but the parent does not contain the connector");
                         }
-                    } else if ((c instanceof UIConnector && c == getRootConnector())) {
+                    } else if (c == getUIConnector()) {
                         // UIConnector for this connection, leave as-is
                     } else if (c instanceof WindowConnector
-                            && getRootConnector().hasSubWindow(
+                            && getUIConnector().hasSubWindow(
                                     (WindowConnector) c)) {
                         // Sub window attached to this UIConnector, leave
                         // as-is
@@ -2782,7 +2782,7 @@ public class ApplicationConnection {
      * 
      * @return the main view
      */
-    public UIConnector getRootConnector() {
+    public UIConnector getUIConnector() {
         return uIConnector;
     }
 
index d24b12ffe5c92d7fbd4b67e4afd17c5e431616e7..15962fefa97b863d9f099661401dceb802377bd0 100644 (file)
@@ -453,7 +453,7 @@ public class ComponentLocator {
         } else if (w instanceof VWindow) {
             Connector windowConnector = ConnectorMap.get(client)
                     .getConnector(w);
-            List<WindowConnector> subWindowList = client.getRootConnector()
+            List<WindowConnector> subWindowList = client.getUIConnector()
                     .getSubWindows();
             int indexOfSubWindow = subWindowList.indexOf(windowConnector);
             return PARENTCHILD_SEPARATOR + "VWindow[" + indexOfSubWindow + "]";
@@ -514,7 +514,7 @@ public class ComponentLocator {
             if (part.equals(ROOT_ID)) {
                 w = RootPanel.get();
             } else if (part.equals("")) {
-                w = client.getRootConnector().getWidget();
+                w = client.getUIConnector().getWidget();
             } else if (w == null) {
                 String id = part;
                 // Must be old static pid (PID_S*)
@@ -523,7 +523,7 @@ public class ComponentLocator {
                 if (connector == null) {
                     // Lookup by component id
                     // TODO Optimize this
-                    connector = findConnectorById(client.getRootConnector(),
+                    connector = findConnectorById(client.getUIConnector(),
                             id.substring(5));
                 }
 
@@ -632,7 +632,7 @@ public class ComponentLocator {
                  * compatibility
                  */
                 if (widgetClassName.equals("VWindow")) {
-                    List<WindowConnector> windows = client.getRootConnector()
+                    List<WindowConnector> windows = client.getUIConnector()
                             .getSubWindows();
                     List<VWindow> windowWidgets = new ArrayList<VWindow>(
                             windows.size());
index 9ed8f261e7f274730828ed821fa3f8c40111de9d..99f207edce7eba9b29c9bfeb6847c3d3644ef61d 100644 (file)
@@ -401,7 +401,7 @@ public class LayoutManager {
             if (passes > 100) {
                 VConsole.log(LOOP_ABORT_MESSAGE);
                 VNotification.createNotification(VNotification.DELAY_FOREVER,
-                        connection.getRootConnector().getWidget()).show(
+                        connection.getUIConnector().getWidget()).show(
                         LOOP_ABORT_MESSAGE, VNotification.CENTERED, "error");
                 break;
             }
index c9fe22528d9fe2e682bbdfd37427e62576f4d58b..d111bd3093ab5be0f43693d0751038076933a355 100644 (file)
@@ -703,7 +703,7 @@ public class Util {
         VOverlay overlay = findWidget(element, VOverlay.class);
         if (overlay != null && overlay.getOwner() != null) {
 
-            return getConnectorForElement(client, client.getRootConnector()
+            return getConnectorForElement(client, client.getUIConnector()
                     .getWidget(), overlay.getOwner().getElement());
         } else {
             return null;
index a5dbc9ede58a417285e5701b03296766f9ddae7b..a436f6e6480d40c215ef169df41beeb7feafc0dc 100644 (file)
@@ -117,7 +117,7 @@ public class VDebugConsole extends VOverlay implements Console {
                 for (ApplicationConnection a : ApplicationConfiguration
                         .getRunningApplications()) {
                     ComponentConnector connector = Util.getConnectorForElement(
-                            a, a.getRootConnector().getWidget(), eventTarget);
+                            a, a.getUIConnector().getWidget(), eventTarget);
                     if (connector == null) {
                         connector = Util.getConnectorForElement(a,
                                 RootPanel.get(), eventTarget);
@@ -146,7 +146,7 @@ public class VDebugConsole extends VOverlay implements Console {
                 for (ApplicationConnection a : ApplicationConfiguration
                         .getRunningApplications()) {
                     ComponentConnector paintable = Util.getConnectorForElement(
-                            a, a.getRootConnector().getWidget(), eventTarget);
+                            a, a.getUIConnector().getWidget(), eventTarget);
                     if (paintable == null) {
                         paintable = Util.getConnectorForElement(a,
                                 RootPanel.get(), eventTarget);
@@ -922,7 +922,7 @@ public class VDebugConsole extends VOverlay implements Console {
     }
 
     protected void dumpConnectorInfo(ApplicationConnection a) {
-        UIConnector root = a.getRootConnector();
+        UIConnector root = a.getUIConnector();
         log("================");
         log("Connector hierarchy for Root: " + root.getState().caption + " ("
                 + root.getConnectorId() + ")");
index 064e9fae44f92864bab7a619cf39139d45704794..dc6c7e4dffee799f35de634bdc4343a070aea858 100644 (file)
@@ -657,7 +657,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> {
             if (container == null) {
                 container = DOM.createDiv();
                 container.setId(id);
-                String styles = ac.getRootConnector().getWidget().getParent()
+                String styles = ac.getUIConnector().getWidget().getParent()
                         .getStyleName();
                 container.setClassName(styles);
                 RootPanel.get().getElement().appendChild(container);
index 1c456a53b39ff9d59d78e7a7f1b124d67c5512ab..436712ac6fc4f0d8bacc949828dab256f9a75af4 100644 (file)
@@ -424,7 +424,7 @@ public class VNotification extends VOverlay {
 
         final int delay = notification
                 .getIntAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY);
-        createNotification(delay, client.getRootConnector().getWidget()).show(
+        createNotification(delay, client.getUIConnector().getWidget()).show(
                 html, position, style);
     }
 
index 6b1f4b9697693acfeda3cc9787b1fecf93c34ca3..ebcdd24feef70545321f927eb078ee5b3ff965bc 100644 (file)
@@ -72,7 +72,7 @@ public class WindowConnector extends AbstractComponentContainerConnector
         getLayoutManager().registerDependency(this, getWidget().header);
         getLayoutManager().registerDependency(this, getWidget().footer);
 
-        getWidget().setOwner(getConnection().getRootConnector().getWidget());
+        getWidget().setOwner(getConnection().getUIConnector().getWidget());
     }
 
     @Override
index 6822edb34cb6f583dbe4f7938c8c8ec5202650d8..26d41bc655d191501b65b0b5bdb6a4f669bc3856 100644 (file)
@@ -79,7 +79,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
                     updatedIntSet.add(Integer.valueOf(-integer.intValue()));
                 }
                 rpc.sendSet(updatedIntSet,
-                        Collections.singleton(getRootConnector()), beanSet);
+                        Collections.singleton(getUIConnector()), beanSet);
             }
 
             @Override
@@ -103,7 +103,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
 
                 rpc.sendMap(Collections.singletonMap("a", stringMap.get("b")),
                         Collections.singletonMap(getThisConnector(),
-                                connectorMap.get(getRootConnector())),
+                                connectorMap.get(getUIConnector())),
                         Collections.singletonMap(
                                 Integer.valueOf(stringMap.size()),
                                 getThisConnector()), updatedBeanMap);
@@ -121,7 +121,7 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
                 Collections.sort(intList);
                 Collections.reverse(beanList);
                 rpc.sendList(intList,
-                        Arrays.asList(getThisConnector(), getRootConnector()),
+                        Arrays.asList(getThisConnector(), getUIConnector()),
                         beanList);
             }
 
@@ -243,8 +243,8 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
         });
     }
 
-    private Connector getRootConnector() {
-        return getConnection().getRootConnector();
+    private Connector getUIConnector() {
+        return getConnection().getUIConnector();
     }
 
     private Connector getThisConnector() {