Change-Id: I9f7714cc8a723550e521b1cd0fb70499f3f12138tags/7.0.0.beta9
@@ -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; | |||
} | |||
@@ -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()); |
@@ -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; | |||
} |
@@ -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; |
@@ -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() + ")"); |
@@ -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); |
@@ -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); | |||
} | |||
@@ -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 |
@@ -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() { |