diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-24 11:47:50 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-24 13:23:20 +0300 |
commit | 5c557b50bc5f7f754d60a2ed435907b897b6750b (patch) | |
tree | 7a9db946a00c955a75035db121b3109fece20574 /client | |
parent | 0b0ddb86876a965f68c6160fe7a499412b6c199d (diff) | |
download | vaadin-framework-5c557b50bc5f7f754d60a2ed435907b897b6750b.tar.gz vaadin-framework-5c557b50bc5f7f754d60a2ed435907b897b6750b.zip |
Remaining Root -> UI renames (#8908)
Diffstat (limited to 'client')
5 files changed, 31 insertions, 28 deletions
diff --git a/client/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/client/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index aa7a9fc72a..6621de7f95 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/client/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -31,6 +31,7 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Window; import com.vaadin.shared.ApplicationConstants; +import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.terminal.gwt.client.metadata.BundleLoadCallback; import com.vaadin.terminal.gwt.client.metadata.ConnectorBundleLoader; import com.vaadin.terminal.gwt.client.metadata.NoDataException; @@ -202,7 +203,7 @@ public class ApplicationConfiguration implements EntryPoint { private String id; private String themeUri; private String appUri; - private int rootId; + private int uiId; private boolean standalone; private ErrorMessage communicationError; private ErrorMessage authorizationError; @@ -288,8 +289,8 @@ public class ApplicationConfiguration implements EntryPoint { * * @return the root id */ - public int getRootId() { - return rootId; + public int getUIId() { + return uiId; } public JavaScriptObject getVersionInfoJSObject() { @@ -314,7 +315,8 @@ public class ApplicationConfiguration implements EntryPoint { appUri += '/'; } themeUri = jsoConfiguration.getConfigString("themeUri"); - rootId = jsoConfiguration.getConfigInteger("rootId").intValue(); + uiId = jsoConfiguration.getConfigInteger(UIConstants.UI_ID_PARAMETER) + .intValue(); // null -> true useDebugIdInDom = jsoConfiguration.getConfigBoolean("useDebugIdInDom") != Boolean.FALSE; diff --git a/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 44f52d3e7f..fc063a1908 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -58,6 +58,7 @@ import com.vaadin.shared.Version; import com.vaadin.shared.communication.LegacyChangeVariablesInvocation; import com.vaadin.shared.communication.MethodInvocation; import com.vaadin.shared.communication.SharedState; +import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.terminal.gwt.client.ApplicationConfiguration.ErrorMessage; import com.vaadin.terminal.gwt.client.ResourceLoader.ResourceLoadEvent; import com.vaadin.terminal.gwt.client.ResourceLoader.ResourceLoadListener; @@ -495,8 +496,8 @@ public class ApplicationConnection { if (extraParams != null && extraParams.length() > 0) { uri = addGetParameters(uri, extraParams); } - uri = addGetParameters(uri, ApplicationConstants.ROOT_ID_PARAMETER - + "=" + configuration.getRootId()); + uri = addGetParameters(uri, UIConstants.UI_ID_PARAMETER + "=" + + configuration.getUIId()); doUidlRequest(uri, payload, forceSync); diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java b/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java index 2fb48623fd..f260481c3c 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java @@ -36,10 +36,10 @@ import com.google.web.bindery.event.shared.HandlerRegistration; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; -import com.vaadin.shared.ui.root.PageClientRpc; -import com.vaadin.shared.ui.root.RootConstants; -import com.vaadin.shared.ui.root.UIServerRpc; -import com.vaadin.shared.ui.root.UIState; +import com.vaadin.shared.ui.ui.PageClientRpc; +import com.vaadin.shared.ui.ui.UIConstants; +import com.vaadin.shared.ui.ui.UIServerRpc; +import com.vaadin.shared.ui.ui.UIState; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ComponentConnector; @@ -107,7 +107,7 @@ public class UIConnector extends AbstractComponentContainerConnector getWidget().connection = client; getWidget().immediate = getState().isImmediate(); - getWidget().resizeLazy = uidl.hasAttribute(RootConstants.RESIZE_LAZY); + getWidget().resizeLazy = uidl.hasAttribute(UIConstants.RESIZE_LAZY); String newTheme = uidl.getStringAttribute("theme"); if (getWidget().theme != null && !newTheme.equals(getWidget().theme)) { // Complete page refresh is needed due css can affect layout @@ -263,9 +263,9 @@ public class UIConnector extends AbstractComponentContainerConnector scrollIntoView(connector); } - if (uidl.hasAttribute(RootConstants.FRAGMENT_VARIABLE)) { + if (uidl.hasAttribute(UIConstants.FRAGMENT_VARIABLE)) { getWidget().currentFragment = uidl - .getStringAttribute(RootConstants.FRAGMENT_VARIABLE); + .getStringAttribute(UIConstants.FRAGMENT_VARIABLE); if (!getWidget().currentFragment.equals(History.getToken())) { History.newItem(getWidget().currentFragment, true); } @@ -276,7 +276,7 @@ public class UIConnector extends AbstractComponentContainerConnector // Include current fragment in the next request client.updateVariable(getWidget().id, - RootConstants.FRAGMENT_VARIABLE, + UIConstants.FRAGMENT_VARIABLE, getWidget().currentFragment, false); } diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java b/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java index cb6b181f1d..1c4b69a3b9 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java @@ -33,7 +33,7 @@ import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.SimplePanel; import com.vaadin.shared.ApplicationConstants; -import com.vaadin.shared.ui.root.RootConstants; +import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ComponentConnector; @@ -130,7 +130,7 @@ public class VUI extends SimplePanel implements ResizeHandler, // Send the new fragment to the server if it has changed if (!newFragment.equals(currentFragment) && connection != null) { currentFragment = newFragment; - connection.updateVariable(id, RootConstants.FRAGMENT_VARIABLE, + connection.updateVariable(id, UIConstants.FRAGMENT_VARIABLE, newFragment, true); } } diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/notification/VNotification.java b/client/src/com/vaadin/terminal/gwt/client/ui/notification/VNotification.java index b4cea2dc72..b668c9a88c 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/notification/VNotification.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/notification/VNotification.java @@ -30,7 +30,7 @@ import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Widget; import com.vaadin.shared.Position; -import com.vaadin.shared.ui.root.RootConstants; +import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.UIDL; @@ -384,19 +384,19 @@ public class VNotification extends VOverlay { public static void showNotification(ApplicationConnection client, final UIDL notification) { boolean onlyPlainText = notification - .hasAttribute(RootConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED); + .hasAttribute(UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED); String html = ""; if (notification - .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_ICON)) { + .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON)) { final String parsedUri = client .translateVaadinUri(notification - .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_ICON)); + .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON)); html += "<img src=\"" + Util.escapeAttribute(parsedUri) + "\" />"; } if (notification - .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION)) { + .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION)) { String caption = notification - .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION); + .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION); if (onlyPlainText) { caption = Util.escapeHTML(caption); caption = caption.replaceAll("\\n", "<br />"); @@ -404,9 +404,9 @@ public class VNotification extends VOverlay { html += "<h1>" + caption + "</h1>"; } if (notification - .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE)) { + .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE)) { String message = notification - .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE); + .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE); if (onlyPlainText) { message = Util.escapeHTML(message); message = message.replaceAll("\\n", "<br />"); @@ -415,16 +415,16 @@ public class VNotification extends VOverlay { } final String style = notification - .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_STYLE) ? notification - .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_STYLE) + .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_STYLE) ? notification + .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_STYLE) : null; final int pos = notification - .getIntAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_POSITION); + .getIntAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_POSITION); Position position = Position.values()[pos]; final int delay = notification - .getIntAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_DELAY); + .getIntAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY); createNotification(delay).show(html, position, style); } |