]> source.dussan.org Git - vaadin-framework.git/commitdiff
Eliminated dependencies from server to client (#9279)
authorArtur Signell <artur@vaadin.com>
Mon, 13 Aug 2012 16:13:24 +0000 (19:13 +0300)
committerArtur Signell <artur@vaadin.com>
Mon, 13 Aug 2012 16:18:50 +0000 (19:18 +0300)
84 files changed:
client/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
client/src/com/vaadin/terminal/gwt/client/Util.java
client/src/com/vaadin/terminal/gwt/client/communication/JsonEncoder.java
client/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java
client/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java
client/src/com/vaadin/terminal/gwt/client/ui/accordion/VAccordion.java
client/src/com/vaadin/terminal/gwt/client/ui/combobox/ComboBoxConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/combobox/VFilterSelect.java
client/src/com/vaadin/terminal/gwt/client/ui/datefield/AbstractDateFieldConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/datefield/VDateField.java
client/src/com/vaadin/terminal/gwt/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/draganddropwrapper/VDragAndDropWrapper.java
client/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/embedded/VEmbedded.java
client/src/com/vaadin/terminal/gwt/client/ui/menubar/MenuBarConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/menubar/VMenuBar.java
client/src/com/vaadin/terminal/gwt/client/ui/notification/VNotification.java
client/src/com/vaadin/terminal/gwt/client/ui/optiongroup/OptionGroupConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/optiongroup/VOptionGroup.java
client/src/com/vaadin/terminal/gwt/client/ui/root/RootConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/root/VRoot.java
client/src/com/vaadin/terminal/gwt/client/ui/table/TableConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/table/VScrollTable.java
client/src/com/vaadin/terminal/gwt/client/ui/tabsheet/TabsheetBaseConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/tabsheet/TabsheetConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/tabsheet/VTabsheet.java
client/src/com/vaadin/terminal/gwt/client/ui/textfield/TextFieldConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/textfield/VTextField.java
client/src/com/vaadin/terminal/gwt/client/ui/tree/TreeConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
client/src/com/vaadin/terminal/gwt/client/ui/treetable/TreeTableConnector.java
client/src/com/vaadin/terminal/gwt/client/ui/twincolselect/VTwinColSelect.java
server/src/com/vaadin/Application.java
server/src/com/vaadin/terminal/Page.java
server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
server/src/com/vaadin/terminal/gwt/server/JsonCodec.java
server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java
server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java
server/src/com/vaadin/ui/AbsoluteLayout.java
server/src/com/vaadin/ui/AbstractJavaScriptComponent.java
server/src/com/vaadin/ui/AbstractOrderedLayout.java
server/src/com/vaadin/ui/AbstractSplitPanel.java
server/src/com/vaadin/ui/AbstractTextField.java
server/src/com/vaadin/ui/ComboBox.java
server/src/com/vaadin/ui/ConnectorTracker.java
server/src/com/vaadin/ui/CssLayout.java
server/src/com/vaadin/ui/DateField.java
server/src/com/vaadin/ui/DragAndDropWrapper.java
server/src/com/vaadin/ui/Embedded.java
server/src/com/vaadin/ui/GridLayout.java
server/src/com/vaadin/ui/LoginForm.java
server/src/com/vaadin/ui/MenuBar.java
server/src/com/vaadin/ui/OptionGroup.java
server/src/com/vaadin/ui/Panel.java
server/src/com/vaadin/ui/Root.java
server/src/com/vaadin/ui/TabSheet.java
server/src/com/vaadin/ui/Table.java
server/src/com/vaadin/ui/Tree.java
server/src/com/vaadin/ui/TreeTable.java
server/src/com/vaadin/ui/TwinColSelect.java
server/src/com/vaadin/ui/Window.java
shared/src/com/vaadin/shared/ApplicationConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/EventId.java
shared/src/com/vaadin/shared/JsonConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/combobox/ComboBoxConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/datefield/DateFieldConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/embedded/EmbeddedConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/menubar/MenuBarConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/root/RootConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/table/TableConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/textfield/TextFieldConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/tree/TreeConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/treetable/TreeTableConstants.java [new file with mode: 0644]
shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java [new file with mode: 0644]

index 71707e723a7f0aa3f33c1c0c680dbd179e8f0a7e..ae5e8ed42e26279799c7c8b637b6861edeeb18c8 100644 (file)
@@ -19,12 +19,11 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.Window;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector;
 
 public class ApplicationConfiguration implements EntryPoint {
 
-    public static final String PORTLET_RESOUCE_URL_BASE = "portletAppURLBase";
-
     /**
      * Helper class for reading configuration options from the bootstap
      * javascript
@@ -230,8 +229,8 @@ public class ApplicationConfiguration implements EntryPoint {
     }
 
     public String getPortletResourceUrl() {
-        return getJsoConfiguration(id)
-                .getConfigString(PORTLET_RESOUCE_URL_BASE);
+        return getJsoConfiguration(id).getConfigString(
+                ApplicationConstants.PORTLET_RESOUCE_URL_BASE);
     }
 
     public String getRootPanelId() {
index d757bf89a289c1e12a6cd8d9a5986620c9ec1297..b7df9d51560f68402c632450ec4000bf54911703 100644 (file)
@@ -39,6 +39,7 @@ import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.ui.HasWidgets;
 import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.ComponentState;
 import com.vaadin.shared.communication.MethodInvocation;
 import com.vaadin.shared.communication.SharedState;
@@ -78,21 +79,6 @@ import com.vaadin.terminal.gwt.server.AbstractCommunicationManager;
  * Entry point classes (widgetsets) define <code>onModuleLoad()</code>.
  */
 public class ApplicationConnection {
-    public static final String APP_REQUEST_PATH = "APP/";
-
-    public static final String UIDL_REQUEST_PATH = "UIDL/";
-
-    public static final String APP_PROTOCOL_PREFIX = "app://";
-
-    public static final String V_RESOURCE_PATH = "v-resourcePath";
-
-    public static final String CONNECTOR_PROTOCOL_PREFIX = "connector://";
-
-    public static final String CONNECTOR_RESOURCE_PREFIX = APP_REQUEST_PATH
-            + "CONNECTOR";
-
-    // This indicates the whole page is generated by us (not embedded)
-    public static final String GENERATED_BODY_CLASSNAME = "v-generated-body";
 
     public static final String MODIFIED_CLASSNAME = "v-modified";
 
@@ -102,28 +88,10 @@ public class ApplicationConnection {
 
     public static final String ERROR_CLASSNAME_EXT = "-error";
 
-    public static final String UPDATE_VARIABLE_INTERFACE = "v";
-    public static final String UPDATE_VARIABLE_METHOD = "v";
-
     public static final char VAR_BURST_SEPARATOR = '\u001d';
 
     public static final char VAR_ESCAPE_CHARACTER = '\u001b';
 
-    public static final String UIDL_SECURITY_TOKEN_ID = "Vaadin-Security-Key";
-
-    /**
-     * Name of the parameter used to transmit root ids back and forth
-     */
-    public static final String ROOT_ID_PARAMETER = "rootId";
-
-    /**
-     * @deprecated use UIDL_SECURITY_TOKEN_ID instead
-     */
-    @Deprecated
-    public static final String UIDL_SECURITY_HEADER = UIDL_SECURITY_TOKEN_ID;
-
-    public static final String PARAM_UNLOADBURST = "onunloadburst";
-
     private static SerializerMap serializerMap;
 
     /**
@@ -520,13 +488,14 @@ public class ApplicationConnection {
         final String payload = uidlSecurityKey + VAR_BURST_SEPARATOR
                 + requestData;
         VConsole.log("Making UIDL Request with params: " + payload);
-        String uri = translateVaadinUri(APP_PROTOCOL_PREFIX + UIDL_REQUEST_PATH);
+        String uri = translateVaadinUri(ApplicationConstants.APP_PROTOCOL_PREFIX
+                + ApplicationConstants.UIDL_REQUEST_PATH);
 
         if (extraParams != null && extraParams.length() > 0) {
             uri = addGetParameters(uri, extraParams);
         }
-        uri = addGetParameters(uri,
-                ROOT_ID_PARAMETER + "=" + configuration.getRootId());
+        uri = addGetParameters(uri, ApplicationConstants.ROOT_ID_PARAMETER
+                + "=" + configuration.getRootId());
 
         doUidlRequest(uri, payload, forceSync);
 
@@ -651,8 +620,8 @@ public class ApplicationConnection {
         } else {
             // Synchronized call, discarded response (leaving the page)
             SynchronousXHR syncXHR = (SynchronousXHR) SynchronousXHR.create();
-            syncXHR.synchronousPost(uri + "&" + PARAM_UNLOADBURST + "=1",
-                    payload);
+            syncXHR.synchronousPost(uri + "&"
+                    + ApplicationConstants.PARAM_UNLOADBURST + "=1", payload);
             /*
              * Although we are in theory leaving the page, the page may still
              * stay open. End request properly here too. See #3289
@@ -1046,8 +1015,9 @@ public class ApplicationConnection {
         final MultiStepDuration handleUIDLDuration = new MultiStepDuration();
 
         // Get security key
-        if (json.containsKey(UIDL_SECURITY_TOKEN_ID)) {
-            uidlSecurityKey = json.getString(UIDL_SECURITY_TOKEN_ID);
+        if (json.containsKey(ApplicationConstants.UIDL_SECURITY_TOKEN_ID)) {
+            uidlSecurityKey = json
+                    .getString(ApplicationConstants.UIDL_SECURITY_TOKEN_ID);
         }
         VConsole.log(" * Handling resources from server");
 
@@ -1714,8 +1684,9 @@ public class ApplicationConnection {
         // note that type is now deduced from value
         // TODO could eliminate invocations of same shared variable setter
         addMethodInvocationToQueue(new MethodInvocation(connectorId,
-                UPDATE_VARIABLE_INTERFACE, UPDATE_VARIABLE_METHOD,
-                new Object[] { variableName, new UidlValue(value) }), immediate);
+                ApplicationConstants.UPDATE_VARIABLE_INTERFACE,
+                ApplicationConstants.UPDATE_VARIABLE_METHOD, new Object[] {
+                        variableName, new UidlValue(value) }), immediate);
     }
 
     /**
@@ -1857,9 +1828,9 @@ public class ApplicationConnection {
     }
 
     private boolean isLegacyVariableChange(MethodInvocation invocation) {
-        return ApplicationConnection.UPDATE_VARIABLE_METHOD.equals(invocation
+        return ApplicationConstants.UPDATE_VARIABLE_METHOD.equals(invocation
                 .getInterfaceName())
-                && ApplicationConnection.UPDATE_VARIABLE_METHOD
+                && ApplicationConstants.UPDATE_VARIABLE_METHOD
                         .equals(invocation.getMethodName());
     }
 
@@ -2304,17 +2275,21 @@ public class ApplicationConnection {
             uidlUri = themeUri + uidlUri.substring(7);
         }
 
-        if (uidlUri.startsWith(CONNECTOR_PROTOCOL_PREFIX)) {
+        if (uidlUri.startsWith(ApplicationConstants.CONNECTOR_PROTOCOL_PREFIX)) {
             // getAppUri *should* always end with /
             // substring *should* always start with / (connector:///foo.bar
             // without connector://)
-            uidlUri = APP_PROTOCOL_PREFIX + CONNECTOR_RESOURCE_PREFIX
-                    + uidlUri.substring(CONNECTOR_PROTOCOL_PREFIX.length());
+            uidlUri = ApplicationConstants.APP_PROTOCOL_PREFIX
+                    + ApplicationConstants.CONNECTOR_RESOURCE_PREFIX
+                    + uidlUri
+                            .substring(ApplicationConstants.CONNECTOR_PROTOCOL_PREFIX
+                                    .length());
             // Let translation of app:// urls take care of the rest
         }
-        if (uidlUri.startsWith(APP_PROTOCOL_PREFIX)) {
+        if (uidlUri.startsWith(ApplicationConstants.APP_PROTOCOL_PREFIX)) {
             String relativeUrl = uidlUri
-                    .substring(APP_PROTOCOL_PREFIX.length());
+                    .substring(ApplicationConstants.APP_PROTOCOL_PREFIX
+                            .length());
             if (getConfiguration().usePortletURLs()) {
                 // Should put path in v-resourcePath parameter and append query
                 // params to base portlet url
@@ -2332,7 +2307,7 @@ public class ApplicationConnection {
                 if (!path.startsWith("/")) {
                     path = '/' + path;
                 }
-                String pathParam = V_RESOURCE_PATH + "="
+                String pathParam = ApplicationConstants.V_RESOURCE_PATH + "="
                         + URL.encodeQueryString(path);
                 url = addGetParameters(url, pathParam);
                 uidlUri = url;
index a27c77fa452f634e52ca162c183dc97f2626491d..04c83c353e5ea3040bd3a0ab1dcb00f55e960114 100644 (file)
@@ -27,6 +27,7 @@ import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.HasWidgets;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.ComponentState;
 import com.vaadin.shared.communication.MethodInvocation;
 import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
@@ -841,7 +842,7 @@ public class Util {
         for (MethodInvocation invocation : invocations) {
             Object[] parameters = invocation.getParameters();
             String formattedParams = null;
-            if (ApplicationConnection.UPDATE_VARIABLE_METHOD.equals(invocation
+            if (ApplicationConstants.UPDATE_VARIABLE_METHOD.equals(invocation
                     .getMethodName()) && parameters.length == 2) {
                 // name, value
                 Object value = parameters[1];
index 404f1238e08d74da88dfa79cc822f7b14d591c7f..e08aa37e7311144252a19ec62e01a02d5f2bd442 100644 (file)
@@ -18,6 +18,7 @@ import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.json.client.JSONString;
 import com.google.gwt.json.client.JSONValue;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.JsonConstants;
 import com.vaadin.shared.communication.UidlValue;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 
@@ -34,20 +35,6 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection;
  */
 public class JsonEncoder {
 
-    public static final String VTYPE_CONNECTOR = "c";
-    public static final String VTYPE_BOOLEAN = "b";
-    public static final String VTYPE_DOUBLE = "d";
-    public static final String VTYPE_FLOAT = "f";
-    public static final String VTYPE_LONG = "l";
-    public static final String VTYPE_INTEGER = "i";
-    public static final String VTYPE_STRING = "s";
-    public static final String VTYPE_ARRAY = "a";
-    public static final String VTYPE_STRINGARRAY = "S";
-    public static final String VTYPE_MAP = "m";
-    public static final String VTYPE_LIST = "L";
-    public static final String VTYPE_SET = "q";
-    public static final String VTYPE_NULL = "n";
-
     /**
      * Encode a value to a JSON representation for transport from the client to
      * the server.
@@ -252,34 +239,34 @@ public class JsonEncoder {
      */
     private static String getTransportType(Object value) {
         if (value == null) {
-            return VTYPE_NULL;
+            return JsonConstants.VTYPE_NULL;
         } else if (value instanceof String) {
-            return VTYPE_STRING;
+            return JsonConstants.VTYPE_STRING;
         } else if (value instanceof Connector) {
-            return VTYPE_CONNECTOR;
+            return JsonConstants.VTYPE_CONNECTOR;
         } else if (value instanceof Boolean) {
-            return VTYPE_BOOLEAN;
+            return JsonConstants.VTYPE_BOOLEAN;
         } else if (value instanceof Integer) {
-            return VTYPE_INTEGER;
+            return JsonConstants.VTYPE_INTEGER;
         } else if (value instanceof Float) {
-            return VTYPE_FLOAT;
+            return JsonConstants.VTYPE_FLOAT;
         } else if (value instanceof Double) {
-            return VTYPE_DOUBLE;
+            return JsonConstants.VTYPE_DOUBLE;
         } else if (value instanceof Long) {
-            return VTYPE_LONG;
+            return JsonConstants.VTYPE_LONG;
         } else if (value instanceof List) {
-            return VTYPE_LIST;
+            return JsonConstants.VTYPE_LIST;
         } else if (value instanceof Set) {
-            return VTYPE_SET;
+            return JsonConstants.VTYPE_SET;
         } else if (value instanceof String[]) {
-            return VTYPE_STRINGARRAY;
+            return JsonConstants.VTYPE_STRINGARRAY;
         } else if (value instanceof Object[]) {
-            return VTYPE_ARRAY;
+            return JsonConstants.VTYPE_ARRAY;
         } else if (value instanceof Map) {
-            return VTYPE_MAP;
+            return JsonConstants.VTYPE_MAP;
         } else if (value instanceof Enum<?>) {
             // Enum value is processed as a string
-            return VTYPE_STRING;
+            return JsonConstants.VTYPE_STRING;
         }
         return null;
     }
index b7b6b13d3cfe6ca1eaa5689c087fb26b59ffbe4e..d1ed7415907103ab324a08b0aa652a2659d7e42a 100644 (file)
@@ -4,16 +4,15 @@
 package com.vaadin.terminal.gwt.client.ui;
 
 import com.google.gwt.dom.client.NativeEvent;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
 import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder;
 
 public abstract class ClickEventHandler extends AbstractClickEventHandler {
 
-    public static final String CLICK_EVENT_IDENTIFIER = "click";
-
     public ClickEventHandler(ComponentConnector connector) {
-        this(connector, CLICK_EVENT_IDENTIFIER);
+        this(connector, EventId.CLICK_EVENT_IDENTIFIER);
     }
 
     public ClickEventHandler(ComponentConnector connector,
index 9aafaa0bbff96cdd9e87557c2716de50be53e2f0..444e44495c4611c4e8e23ff1d96c8fc4ef4532e6 100644 (file)
@@ -5,6 +5,7 @@ package com.vaadin.terminal.gwt.client.ui;
 
 import com.google.gwt.dom.client.NativeEvent;
 import com.google.gwt.user.client.Element;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.LayoutClickRpc;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -12,10 +13,8 @@ import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder;
 
 public abstract class LayoutClickEventHandler extends AbstractClickEventHandler {
 
-    public static final String LAYOUT_CLICK_EVENT_IDENTIFIER = "lClick";
-
     public LayoutClickEventHandler(ComponentConnector connector) {
-        this(connector, LAYOUT_CLICK_EVENT_IDENTIFIER);
+        this(connector, EventId.LAYOUT_CLICK_EVENT_IDENTIFIER);
     }
 
     public LayoutClickEventHandler(ComponentConnector connector,
index d9320787e81478bafb9b6f6bf0e801eb9541d12f..53498d910829a8626ac364f3804e193d231e2bb5 100644 (file)
@@ -15,6 +15,7 @@ import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.ComplexPanel;
 import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
 import com.vaadin.terminal.gwt.client.ConnectorMap;
 import com.vaadin.terminal.gwt.client.UIDL;
@@ -22,7 +23,6 @@ import com.vaadin.terminal.gwt.client.Util;
 import com.vaadin.terminal.gwt.client.VCaption;
 import com.vaadin.terminal.gwt.client.ui.TouchScrollDelegate;
 import com.vaadin.terminal.gwt.client.ui.TouchScrollDelegate.TouchScrollHandler;
-import com.vaadin.terminal.gwt.client.ui.tabsheet.TabsheetBaseConnector;
 import com.vaadin.terminal.gwt.client.ui.tabsheet.VTabsheetBase;
 
 public class VAccordion extends VTabsheetBase {
@@ -442,11 +442,11 @@ public class VAccordion extends VTabsheetBase {
         public void updateCaption(UIDL uidl) {
             // TODO need to call this because the caption does not have an owner
             caption.updateCaptionWithoutOwner(
-                    uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE),
-                    uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON));
+                    uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_CAPTION),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE),
+                    uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON));
         }
 
         public int getWidgetWidth() {
index 0fa71bb7a6706480ea1815c07db0aa9d011ba196..65d9f3a09f94344cb43c8bb1e5cb4889ba432026 100644 (file)
@@ -6,6 +6,7 @@ package com.vaadin.terminal.gwt.client.ui.combobox;
 import java.util.Iterator;
 
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.combobox.ComboBoxConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.Paintable;
 import com.vaadin.terminal.gwt.client.UIDL;
@@ -46,8 +47,8 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
         // Inverse logic here to make the default case (text input enabled)
         // work without additional UIDL messages
         boolean noTextInput = uidl
-                .hasAttribute(VFilterSelect.ATTR_NO_TEXT_INPUT)
-                && uidl.getBooleanAttribute(VFilterSelect.ATTR_NO_TEXT_INPUT);
+                .hasAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT)
+                && uidl.getBooleanAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT);
         getWidget().setTextInputEnabled(!noTextInput);
 
         // not a FocusWidget -> needs own tabindex handling
@@ -72,10 +73,10 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
             getWidget().pageLength = uidl.getIntAttribute("pagelength");
         }
 
-        if (uidl.hasAttribute(VFilterSelect.ATTR_INPUTPROMPT)) {
+        if (uidl.hasAttribute(ComboBoxConstants.ATTR_INPUTPROMPT)) {
             // input prompt changed from server
             getWidget().inputPrompt = uidl
-                    .getStringAttribute(VFilterSelect.ATTR_INPUTPROMPT);
+                    .getStringAttribute(ComboBoxConstants.ATTR_INPUTPROMPT);
         } else {
             getWidget().inputPrompt = "";
         }
index 6e24a74e049f26b714a8b05f40d323f0d402d649..c7c071f225981b9a3fa3f9b27f79ee80a0e6d399 100644 (file)
@@ -919,8 +919,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
 
     // shown in unfocused empty field, disappears on focus (e.g "Search here")
     private static final String CLASSNAME_PROMPT = "prompt";
-    protected static final String ATTR_INPUTPROMPT = "prompt";
-    public static final String ATTR_NO_TEXT_INPUT = "noInput";
     protected String inputPrompt = "";
     protected boolean prompting = false;
 
@@ -1688,9 +1686,9 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
     @Override
     public Element getSubPartElement(String subPart) {
         if ("textbox".equals(subPart)) {
-            return this.tb.getElement();
+            return tb.getElement();
         } else if ("button".equals(subPart)) {
-            return this.popupOpener.getElement();
+            return popupOpener.getElement();
         }
         return null;
     }
index 159b5bc41486c98511a41f3580d62226427bb59d..f0b3510a558f3b948eb4adb339554def04202b6e 100644 (file)
@@ -5,6 +5,7 @@ package com.vaadin.terminal.gwt.client.ui.datefield;
 
 import java.util.Date;
 
+import com.vaadin.shared.ui.datefield.DateFieldConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.LocaleNotLoadedException;
 import com.vaadin.terminal.gwt.client.Paintable;
@@ -46,7 +47,7 @@ public class AbstractDateFieldConnector extends AbstractFieldConnector
         // We show week numbers only if the week starts with Monday, as ISO 8601
         // specifies
         getWidget().showISOWeekNumbers = uidl
-                .getBooleanAttribute(VDateField.WEEK_NUMBERS)
+                .getBooleanAttribute(DateFieldConstants.ATTR_WEEK_NUMBERS)
                 && getWidget().dts.getFirstDayOfWeek() == 1;
 
         int newResolution;
index 614c4febdd01024c4a06ab6cc70ec4a97b1b721e..130e3f23259fba316e850210614c4fb7215dbc0b 100644 (file)
@@ -28,8 +28,6 @@ public class VDateField extends FlowPanel implements Field {
     public static final int RESOLUTION_MIN = 16;
     public static final int RESOLUTION_SEC = 32;
 
-    public static final String WEEK_NUMBERS = "wn";
-
     static String resolutionToString(int res) {
         if (res > RESOLUTION_DAY) {
             return "full";
index 6914b451fa397c5c1a3f88b4c9cf3314f10020a7..4b7a0ae109a67bd8f4e1d6b68fd01400bf4feb01 100644 (file)
@@ -7,6 +7,7 @@ import java.util.HashMap;
 import java.util.Set;
 
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.Paintable;
 import com.vaadin.terminal.gwt.client.UIDL;
@@ -54,10 +55,10 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
             getWidget().startNextUpload();
 
             getWidget().dragStartMode = uidl
-                    .getIntAttribute(VDragAndDropWrapper.DRAG_START_MODE);
+                    .getIntAttribute(DragAndDropWrapperConstants.DRAG_START_MODE);
             getWidget().initDragStartMode();
             getWidget().html5DataFlavors = uidl
-                    .getMapAttribute(VDragAndDropWrapper.HTML5_DATA_FLAVORS);
+                    .getMapAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS);
 
             // Used to prevent wrapper from stealing tooltips when not defined
             getWidget().hasTooltip = getState().hasDescription();
index e77055764ed841fce0fa7bdeb4cccf4b7956e672..0be1e899a3f24ec4f72efd62a15caf121d1c938e 100644 (file)
@@ -53,8 +53,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VTransferable;
  */
 public class VDragAndDropWrapper extends VCustomComponent implements
         VHasDropHandler {
-    public static final String DRAG_START_MODE = "dragStartMode";
-    public static final String HTML5_DATA_FLAVORS = "html5-data-flavors";
 
     private static final String CLASSNAME = "v-ddwrapper";
     protected static final String DRAGGABLE = "draggable";
index a1851d9c847560987db519e060f182f53ccb594b..9071324e568764c4679f060d63de8aabbc5b16e8 100644 (file)
@@ -17,6 +17,7 @@ import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.embedded.EmbeddedConstants;
 import com.vaadin.shared.ui.embedded.EmbeddedServerRpc;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.Paintable;
@@ -32,8 +33,6 @@ import com.vaadin.ui.Embedded;
 public class EmbeddedConnector extends AbstractComponentConnector implements
         Paintable {
 
-    public static final String ALTERNATE_TEXT = "alt";
-
     EmbeddedServerRpc rpc;
 
     @Override
@@ -96,9 +95,10 @@ public class EmbeddedConnector extends AbstractComponentConnector implements
                 DOM.setElementProperty(el, "src",
                         getWidget().getSrc(uidl, client));
 
-                if (uidl.hasAttribute(ALTERNATE_TEXT)) {
-                    el.setPropertyString(ALTERNATE_TEXT,
-                            uidl.getStringAttribute(ALTERNATE_TEXT));
+                if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
+                    el.setPropertyString(
+                            EmbeddedConstants.ALTERNATE_TEXT,
+                            uidl.getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
                 }
 
                 if (created) {
@@ -188,8 +188,9 @@ public class EmbeddedConnector extends AbstractComponentConnector implements
                             uidl.getStringAttribute("standby"));
                 }
                 getWidget().getElement().appendChild(obj);
-                if (uidl.hasAttribute(ALTERNATE_TEXT)) {
-                    obj.setInnerText(uidl.getStringAttribute(ALTERNATE_TEXT));
+                if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
+                    obj.setInnerText(uidl
+                            .getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
                 }
             } else {
                 VConsole.log("Unknown Embedded mimetype '" + mime + "'");
index 1d2a5a156ab2288005a92eba5b2371896325f7f7..70703c1b06dc049b694e9168fa2832456161111b 100644 (file)
@@ -12,6 +12,7 @@ import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.HTML;
+import com.vaadin.shared.ui.embedded.EmbeddedConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -153,9 +154,9 @@ public class VEmbedded extends HTML {
         // End embed tag
         html.append("></embed>");
 
-        if (uidl.hasAttribute(EmbeddedConnector.ALTERNATE_TEXT)) {
+        if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
             html.append(uidl
-                    .getStringAttribute(EmbeddedConnector.ALTERNATE_TEXT));
+                    .getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
         }
 
         // End object tag
index 2a8923bbc0549ea757158b4638d068d1ca13ba6a..539e6aa0e7fed4417ba522217d7719db661f00c8 100644 (file)
@@ -11,6 +11,7 @@ import com.google.gwt.dom.client.Element;
 import com.google.gwt.user.client.Command;
 import com.vaadin.shared.ui.Connect;
 import com.vaadin.shared.ui.Connect.LoadStyle;
+import com.vaadin.shared.ui.menubar.MenuBarConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.Paintable;
 import com.vaadin.terminal.gwt.client.TooltipInfo;
@@ -19,11 +20,11 @@ import com.vaadin.terminal.gwt.client.Util;
 import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
 import com.vaadin.terminal.gwt.client.ui.Icon;
 import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
-import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar.CustomMenuItem;
 
 @Connect(value = com.vaadin.ui.MenuBar.class, loadStyle = LoadStyle.LAZY)
 public class MenuBarConnector extends AbstractComponentConnector implements
         Paintable, SimpleManagedLayout {
+
     /**
      * This method must be implemented to update the client-side component from
      * UIDL data received from server.
@@ -38,10 +39,10 @@ public class MenuBarConnector extends AbstractComponentConnector implements
         }
 
         getWidget().htmlContentAllowed = uidl
-                .hasAttribute(VMenuBar.HTML_CONTENT_ALLOWED);
+                .hasAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED);
 
         getWidget().openRootOnHover = uidl
-                .getBooleanAttribute(VMenuBar.OPEN_ROOT_MENU_ON_HOWER);
+                .getBooleanAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER);
 
         getWidget().enabled = isEnabled();
 
@@ -74,7 +75,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements
             }
             itemHTML.append(moreItemText);
 
-            getWidget().moreItem = GWT.create(CustomMenuItem.class);
+            getWidget().moreItem = GWT.create(VMenuBar.CustomMenuItem.class);
             getWidget().moreItem.setHTML(itemHTML.toString());
             getWidget().moreItem.setCommand(VMenuBar.emptyCommand);
 
@@ -92,13 +93,13 @@ public class MenuBarConnector extends AbstractComponentConnector implements
 
         while (itr.hasNext()) {
             UIDL item = (UIDL) itr.next();
-            CustomMenuItem currentItem = null;
+            VMenuBar.CustomMenuItem currentItem = null;
 
             final int itemId = item.getIntAttribute("id");
 
             boolean itemHasCommand = item.hasAttribute("command");
             boolean itemIsCheckable = item
-                    .hasAttribute(VMenuBar.ATTRIBUTE_CHECKED);
+                    .hasAttribute(MenuBarConstants.ATTRIBUTE_CHECKED);
 
             String itemHTML = getWidget().buildItemHTML(item);
 
@@ -138,7 +139,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements
 
             while (!itr.hasNext() && !iteratorStack.empty()) {
                 boolean hasCheckableItem = false;
-                for (CustomMenuItem menuItem : currentMenu.getItems()) {
+                for (VMenuBar.CustomMenuItem menuItem : currentMenu.getItems()) {
                     hasCheckableItem = hasCheckableItem
                             || menuItem.isCheckable();
                 }
@@ -174,7 +175,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements
         // Check content of widget to find tooltip for element
         if (element != getWidget().getElement()) {
 
-            CustomMenuItem item = getWidget().getMenuItemWithElement(
+            VMenuBar.CustomMenuItem item = getWidget().getMenuItemWithElement(
                     (com.google.gwt.user.client.Element) element);
             if (item != null) {
                 info = item.getTooltip();
index 47bda81362682f9181d5e20340550d59de723e08..eaffb058d17efe90ba06b9b6e89bfecbab01cd0c 100644 (file)
@@ -30,6 +30,7 @@ import com.google.gwt.user.client.ui.HasHTML;
 import com.google.gwt.user.client.ui.PopupPanel;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.shared.ui.menubar.MenuBarConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.LayoutManager;
@@ -66,16 +67,6 @@ public class VMenuBar extends SimpleFocusablePanel implements
     // associated
     protected static final Command emptyCommand = null;
 
-    public static final String OPEN_ROOT_MENU_ON_HOWER = "ormoh";
-
-    public static final String ATTRIBUTE_CHECKED = "checked";
-    public static final String ATTRIBUTE_ITEM_DESCRIPTION = "description";
-    public static final String ATTRIBUTE_ITEM_ICON = "icon";
-    public static final String ATTRIBUTE_ITEM_DISABLED = "disabled";
-    public static final String ATTRIBUTE_ITEM_STYLE = "style";
-
-    public static final String HTML_CONTENT_ALLOWED = "usehtml";
-
     /** Widget fields **/
     protected boolean subMenu;
     protected ArrayList<CustomMenuItem> items;
@@ -905,26 +896,29 @@ public class VMenuBar extends SimpleFocusablePanel implements
 
         public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
             setSeparator(uidl.hasAttribute("separator"));
-            setEnabled(!uidl.hasAttribute(ATTRIBUTE_ITEM_DISABLED));
+            setEnabled(!uidl
+                    .hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DISABLED));
 
-            if (!isSeparator() && uidl.hasAttribute(ATTRIBUTE_CHECKED)) {
+            if (!isSeparator()
+                    && uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_CHECKED)) {
                 // if the selected attribute is present (either true or false),
                 // the item is selectable
                 setCheckable(true);
-                setChecked(uidl.getBooleanAttribute(ATTRIBUTE_CHECKED));
+                setChecked(uidl
+                        .getBooleanAttribute(MenuBarConstants.ATTRIBUTE_CHECKED));
             } else {
                 setCheckable(false);
             }
 
-            if (uidl.hasAttribute(ATTRIBUTE_ITEM_STYLE)) {
+            if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE)) {
                 String itemStyle = uidl
-                        .getStringAttribute(ATTRIBUTE_ITEM_STYLE);
+                        .getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE);
                 addStyleDependentName(itemStyle);
             }
 
-            if (uidl.hasAttribute(ATTRIBUTE_ITEM_DESCRIPTION)) {
+            if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION)) {
                 description = uidl
-                        .getStringAttribute(ATTRIBUTE_ITEM_DESCRIPTION);
+                        .getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION);
             }
         }
 
index 13091554434598555b204871df428ec215a6699e..e48f504464249886e9aa48b962abb3d8f0816f9a 100644 (file)
@@ -17,12 +17,12 @@ import com.google.gwt.user.client.Event;
 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.ui.root.RootConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.terminal.gwt.client.Util;
 import com.vaadin.terminal.gwt.client.ui.VOverlay;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
 
 public class VNotification extends VOverlay {
 
@@ -60,13 +60,6 @@ public class VNotification extends VOverlay {
     private ArrayList<EventListener> listeners;
     private static final int TOUCH_DEVICE_IDLE_DELAY = 1000;
 
-    public static final String ATTRIBUTE_NOTIFICATION_STYLE = "style";
-    public static final String ATTRIBUTE_NOTIFICATION_CAPTION = "caption";
-    public static final String ATTRIBUTE_NOTIFICATION_MESSAGE = "message";
-    public static final String ATTRIBUTE_NOTIFICATION_ICON = "icon";
-    public static final String ATTRIBUTE_NOTIFICATION_POSITION = "position";
-    public static final String ATTRIBUTE_NOTIFICATION_DELAY = "delay";
-
     /**
      * Default constructor. You should use GWT.create instead.
      */
@@ -378,25 +371,29 @@ public class VNotification extends VOverlay {
     public static void showNotification(ApplicationConnection client,
             final UIDL notification) {
         boolean onlyPlainText = notification
-                .hasAttribute(VRoot.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED);
+                .hasAttribute(RootConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED);
         String html = "";
-        if (notification.hasAttribute(ATTRIBUTE_NOTIFICATION_ICON)) {
-            final String parsedUri = client.translateVaadinUri(notification
-                    .getStringAttribute(ATTRIBUTE_NOTIFICATION_ICON));
+        if (notification
+                .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_ICON)) {
+            final String parsedUri = client
+                    .translateVaadinUri(notification
+                            .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_ICON));
             html += "<img src=\"" + Util.escapeAttribute(parsedUri) + "\" />";
         }
-        if (notification.hasAttribute(ATTRIBUTE_NOTIFICATION_CAPTION)) {
+        if (notification
+                .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION)) {
             String caption = notification
-                    .getStringAttribute(ATTRIBUTE_NOTIFICATION_CAPTION);
+                    .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION);
             if (onlyPlainText) {
                 caption = Util.escapeHTML(caption);
                 caption = caption.replaceAll("\\n", "<br />");
             }
             html += "<h1>" + caption + "</h1>";
         }
-        if (notification.hasAttribute(ATTRIBUTE_NOTIFICATION_MESSAGE)) {
+        if (notification
+                .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE)) {
             String message = notification
-                    .getStringAttribute(ATTRIBUTE_NOTIFICATION_MESSAGE);
+                    .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE);
             if (onlyPlainText) {
                 message = Util.escapeHTML(message);
                 message = message.replaceAll("\\n", "<br />");
@@ -405,12 +402,13 @@ public class VNotification extends VOverlay {
         }
 
         final String style = notification
-                .hasAttribute(ATTRIBUTE_NOTIFICATION_STYLE) ? notification
-                .getStringAttribute(ATTRIBUTE_NOTIFICATION_STYLE) : null;
+                .hasAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_STYLE) ? notification
+                .getStringAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_STYLE)
+                : null;
         final int position = notification
-                .getIntAttribute(ATTRIBUTE_NOTIFICATION_POSITION);
+                .getIntAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_POSITION);
         final int delay = notification
-                .getIntAttribute(ATTRIBUTE_NOTIFICATION_DELAY);
+                .getIntAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_DELAY);
         createNotification(delay).show(html, position, style);
     }
 
index caf85348d424764bc8f1a0dbb530d03b6fc8cfc5..3376ca32921412c94fae5c4edaaadc3999cb93cc 100644 (file)
@@ -11,6 +11,7 @@ import com.google.gwt.user.client.ui.CheckBox;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.shared.EventId;
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.ui.OptionGroup;
@@ -21,7 +22,7 @@ public class OptionGroupConnector extends OptionGroupBaseConnector {
     @Override
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
         getWidget().htmlContentAllowed = uidl
-                .hasAttribute(VOptionGroup.HTML_CONTENT_ALLOWED);
+                .hasAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED);
 
         super.updateFromUIDL(uidl, client);
 
index a6cdf7e8886121bff5e9ff299b8e79bc14d9f3e8..130282ac1b0042c0ddabf1ce750adb34bf4e711f 100644 (file)
@@ -26,6 +26,7 @@ import com.google.gwt.user.client.ui.Panel;
 import com.google.gwt.user.client.ui.RadioButton;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.shared.EventId;
+import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.terminal.gwt.client.Util;
@@ -35,12 +36,8 @@ import com.vaadin.terminal.gwt.client.ui.checkbox.VCheckBox;
 public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
         BlurHandler {
 
-    public static final String HTML_CONTENT_ALLOWED = "usehtml";
-
     public static final String CLASSNAME = "v-select-optiongroup";
 
-    public static final String ATTRIBUTE_OPTION_DISABLED = "disabled";
-
     protected final Panel panel;
 
     private final Map<CheckBox, String> optionsToKeys;
@@ -112,7 +109,7 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
             op.addStyleName(CLASSNAME_OPTION);
             op.setValue(opUidl.getBooleanAttribute("selected"));
             boolean enabled = !opUidl
-                    .getBooleanAttribute(ATTRIBUTE_OPTION_DISABLED)
+                    .getBooleanAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED)
                     && !isReadonly() && !isDisabled();
             op.setEnabled(enabled);
             setStyleName(op.getElement(),
index 7b5097ff77f431181aadea4c98f3c9e9e91eca50..6d339d2c13ceac638117c9d7e11ab654c20412cd 100644 (file)
@@ -23,6 +23,7 @@ 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.RootServerRpc;
 import com.vaadin.shared.ui.root.RootState;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
@@ -82,7 +83,7 @@ public class RootConnector extends AbstractComponentContainerConnector
         getWidget().connection = client;
 
         getWidget().immediate = getState().isImmediate();
-        getWidget().resizeLazy = uidl.hasAttribute(VRoot.RESIZE_LAZY);
+        getWidget().resizeLazy = uidl.hasAttribute(RootConstants.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
@@ -238,9 +239,9 @@ public class RootConnector extends AbstractComponentContainerConnector
             scrollIntoView(connector);
         }
 
-        if (uidl.hasAttribute(VRoot.FRAGMENT_VARIABLE)) {
+        if (uidl.hasAttribute(RootConstants.FRAGMENT_VARIABLE)) {
             getWidget().currentFragment = uidl
-                    .getStringAttribute(VRoot.FRAGMENT_VARIABLE);
+                    .getStringAttribute(RootConstants.FRAGMENT_VARIABLE);
             if (!getWidget().currentFragment.equals(History.getToken())) {
                 History.newItem(getWidget().currentFragment, true);
             }
@@ -250,7 +251,8 @@ public class RootConnector extends AbstractComponentContainerConnector
             getWidget().currentFragment = History.getToken();
 
             // Include current fragment in the next request
-            client.updateVariable(getWidget().id, VRoot.FRAGMENT_VARIABLE,
+            client.updateVariable(getWidget().id,
+                    RootConstants.FRAGMENT_VARIABLE,
                     getWidget().currentFragment, false);
         }
 
index fddb76e75513894c407ee69395322c961b5e46f8..7b8a5091ba954c0367762e94acd343e209e753ba 100644 (file)
@@ -19,6 +19,8 @@ import com.google.gwt.user.client.History;
 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.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -38,16 +40,8 @@ import com.vaadin.terminal.gwt.client.ui.textfield.VTextField;
 public class VRoot extends SimplePanel implements ResizeHandler,
         Window.ClosingHandler, ShortcutActionHandlerOwner, Focusable {
 
-    public static final String FRAGMENT_VARIABLE = "fragment";
-
-    public static final String BROWSER_HEIGHT_VAR = "browserHeight";
-
-    public static final String BROWSER_WIDTH_VAR = "browserWidth";
-
     private static final String CLASSNAME = "v-view";
 
-    public static final String NOTIFICATION_HTML_CONTENT_NOT_ALLOWED = "useplain";
-
     private static int MONITOR_PARENT_TIMER_INTERVAL = 1000;
 
     String theme;
@@ -73,9 +67,6 @@ public class VRoot extends SimplePanel implements ResizeHandler,
 
     ApplicationConnection connection;
 
-    /** Identifies the click event */
-    public static final String CLICK_EVENT_ID = "click";
-
     /**
      * Keep track of possible parent size changes when an embedded application.
      * 
@@ -102,11 +93,6 @@ public class VRoot extends SimplePanel implements ResizeHandler,
 
     boolean resizeLazy = false;
 
-    /**
-     * Attribute name for the lazy resize setting .
-     */
-    public static final String RESIZE_LAZY = "rL";
-
     private HandlerRegistration historyHandlerRegistration;
 
     private TouchScrollHandler touchScrollHandler;
@@ -130,8 +116,8 @@ public class VRoot 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, FRAGMENT_VARIABLE, newFragment,
-                        true);
+                connection.updateVariable(id, RootConstants.FRAGMENT_VARIABLE,
+                        newFragment, true);
             }
         }
     };
@@ -311,7 +297,7 @@ public class VRoot extends SimplePanel implements ResizeHandler,
      */
     public boolean isEmbedded() {
         return !getElement().getOwnerDocument().getBody().getClassName()
-                .contains(ApplicationConnection.GENERATED_BODY_CLASSNAME);
+                .contains(ApplicationConstants.GENERATED_BODY_CLASSNAME);
     }
 
     /**
@@ -409,9 +395,10 @@ public class VRoot extends SimplePanel implements ResizeHandler,
         int windowWidth = Window.getClientWidth();
         int windowHeight = Window.getClientHeight();
 
-        connection.updateVariable(id, BROWSER_WIDTH_VAR, windowWidth, false);
-        connection.updateVariable(id, BROWSER_HEIGHT_VAR, windowHeight,
-                immediate);
+        connection.updateVariable(id, RootConstants.BROWSER_WIDTH_VAR,
+                windowWidth, false);
+        connection.updateVariable(id, RootConstants.BROWSER_HEIGHT_VAR,
+                windowHeight, immediate);
     }
 
     public native static void goTo(String url)
@@ -458,4 +445,5 @@ public class VRoot extends SimplePanel implements ResizeHandler,
         }
         touchScrollHandler.addElement(getElement());
     }
+
 }
index 7721a3d7633f91c56331db61534ba70ad8e35fc5..2c5a36ee3c47a2978ac2827fb8a88e948d037c5d 100644 (file)
@@ -13,6 +13,7 @@ import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.shared.AbstractFieldState;
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.table.TableConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -53,11 +54,11 @@ public class TableConnector extends AbstractComponentContainerConnector
         // required.
         ContextMenuDetails contextMenuBeforeUpdate = getWidget().contextMenu;
 
-        if (uidl.hasAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_FIRST)) {
+        if (uidl.hasAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST)) {
             getWidget().serverCacheFirst = uidl
-                    .getIntAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_FIRST);
+                    .getIntAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST);
             getWidget().serverCacheLast = uidl
-                    .getIntAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_LAST);
+                    .getIntAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_LAST);
         } else {
             getWidget().serverCacheFirst = -1;
             getWidget().serverCacheLast = -1;
@@ -255,8 +256,8 @@ public class TableConnector extends AbstractComponentContainerConnector
          * be cleared a little later when the row focus has been restored.
          * (#8584)
          */
-        if (uidl.hasAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET)
-                && uidl.getBooleanAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET)
+        if (uidl.hasAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET)
+                && uidl.getBooleanAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET)
                 && getWidget().selectionRangeStart != null) {
             assert !getWidget().selectionRangeStart.isAttached();
             getWidget().selectionRangeStart = getWidget().focusedRow;
index 8a58c28c5b84d4df6b1a1f9d41e2e06a69c96e1e..bab34768ceb2caa8ac776ed4bb2373ca87d86eed 100644 (file)
@@ -63,6 +63,7 @@ import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.shared.ComponentState;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.table.TableConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -131,26 +132,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
         }
     }
 
-    /**
-     * Tell the client that old keys are no longer valid because the server has
-     * cleared its key map.
-     */
-    public static final String ATTRIBUTE_KEY_MAPPER_RESET = "clearKeyMap";
-
     private static final String ROW_HEADER_COLUMN_KEY = "0";
 
     public static final String CLASSNAME = "v-table";
     public static final String CLASSNAME_SELECTION_FOCUS = CLASSNAME + "-focus";
 
-    public static final String ATTRIBUTE_PAGEBUFFER_FIRST = "pb-ft";
-    public static final String ATTRIBUTE_PAGEBUFFER_LAST = "pb-l";
-
-    public static final String ITEM_CLICK_EVENT_ID = "itemClick";
-    public static final String HEADER_CLICK_EVENT_ID = "handleHeaderClick";
-    public static final String FOOTER_CLICK_EVENT_ID = "handleFooterClick";
-    public static final String COLUMN_RESIZE_EVENT_ID = "columnResize";
-    public static final String COLUMN_REORDER_EVENT_ID = "columnReorder";
-
     private static final double CACHE_RATE_DEFAULT = 2;
 
     /**
@@ -1624,7 +1610,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
             }
         }
         client.updateVariable(paintableId, "columnorder", columnOrder, false);
-        if (client.hasEventListeners(this, COLUMN_REORDER_EVENT_ID)) {
+        if (client.hasEventListeners(this,
+                TableConstants.COLUMN_REORDER_EVENT_ID)) {
             client.sendPendingVariableChanges();
         }
     }
@@ -2324,7 +2311,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
                     boolean stopPropagation = true;
                     if (event.getTypeInt() == Event.ONCONTEXTMENU
                             && !client.hasEventListeners(VScrollTable.this,
-                                    HEADER_CLICK_EVENT_ID)) {
+                                    TableConstants.HEADER_CLICK_EVENT_ID)) {
                         // Prevent showing the browser's context menu only when
                         // there is a header click listener.
                         stopPropagation = false;
@@ -2377,7 +2364,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
          */
         private void fireHeaderClickedEvent(Event event) {
             if (client.hasEventListeners(VScrollTable.this,
-                    HEADER_CLICK_EVENT_ID)) {
+                    TableConstants.HEADER_CLICK_EVENT_ID)) {
                 MouseEventDetails details = MouseEventDetailsBuilder
                         .buildMouseEventDetails(event);
                 client.updateVariable(paintableId, "headerClickEvent",
@@ -3424,7 +3411,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
                 boolean stopPropagation = true;
                 if (event.getTypeInt() == Event.ONCONTEXTMENU
                         && !client.hasEventListeners(VScrollTable.this,
-                                FOOTER_CLICK_EVENT_ID)) {
+                                TableConstants.FOOTER_CLICK_EVENT_ID)) {
                     // Show browser context menu if a footer click listener is
                     // not present
                     stopPropagation = false;
@@ -3458,7 +3445,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
          */
         private void fireFooterClickedEvent(Event event) {
             if (client.hasEventListeners(VScrollTable.this,
-                    FOOTER_CLICK_EVENT_ID)) {
+                    TableConstants.FOOTER_CLICK_EVENT_ID)) {
                 MouseEventDetails details = MouseEventDetailsBuilder
                         .buildMouseEventDetails(event);
                 client.updateVariable(paintableId, "footerClickEvent",
@@ -4786,7 +4773,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
             private boolean handleClickEvent(Event event, Element targetTdOrTr,
                     boolean immediate) {
                 if (!client.hasEventListeners(VScrollTable.this,
-                        ITEM_CLICK_EVENT_ID)) {
+                        TableConstants.ITEM_CLICK_EVENT_ID)) {
                     // Don't send an event if nobody is listening
                     return false;
                 }
@@ -4960,8 +4947,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
                         showContextMenu(event);
                         if (enabled
                                 && (actionKeys != null || client
-                                        .hasEventListeners(VScrollTable.this,
-                                                ITEM_CLICK_EVENT_ID))) {
+                                        .hasEventListeners(
+                                                VScrollTable.this,
+                                                TableConstants.ITEM_CLICK_EVENT_ID))) {
                             /*
                              * Prevent browser context menu only if there are
                              * action handlers or item click listeners
index ea0bea6b0487105bb828d880b2172d38476e1641..35d5b65b04e8e6a8aa743ecca69eb9e51c819f09 100644 (file)
@@ -7,6 +7,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 
 import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
 import com.vaadin.terminal.gwt.client.Paintable;
@@ -16,12 +17,6 @@ import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
 public abstract class TabsheetBaseConnector extends
         AbstractComponentContainerConnector implements Paintable {
 
-    public static final String ATTRIBUTE_TAB_DISABLED = "disabled";
-    public static final String ATTRIBUTE_TAB_DESCRIPTION = "description";
-    public static final String ATTRIBUTE_TAB_ERROR_MESSAGE = "error";
-    public static final String ATTRIBUTE_TAB_CAPTION = "caption";
-    public static final String ATTRIBUTE_TAB_ICON = "icon";
-
     @Override
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
         getWidget().client = client;
@@ -55,7 +50,7 @@ public abstract class TabsheetBaseConnector extends
             final boolean selected = tab.getBooleanAttribute("selected");
             final boolean hidden = tab.getBooleanAttribute("hidden");
 
-            if (tab.getBooleanAttribute(ATTRIBUTE_TAB_DISABLED)) {
+            if (tab.getBooleanAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED)) {
                 getWidget().disabledTabKeys.add(key);
             }
 
index ce19f1e02a411401ee18114988359160376d033f..86e73149c3c658a513096f758631d904fd186eec 100644 (file)
@@ -19,6 +19,7 @@ import com.vaadin.ui.TabSheet;
 public class TabsheetConnector extends TabsheetBaseConnector implements
         SimpleManagedLayout, MayScrollChildren {
 
+    // Can't use "style" as it's already in use
     @Override
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
 
index 1f6314050eae953491f7de2068514be720218a37..517876db19706714c019fe5dcab0357bc291a6ac 100644 (file)
@@ -36,6 +36,8 @@ import com.google.gwt.user.client.ui.Widget;
 import com.google.gwt.user.client.ui.impl.FocusImpl;
 import com.vaadin.shared.ComponentState;
 import com.vaadin.shared.EventId;
+import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
+import com.vaadin.shared.ui.tabsheet.TabsheetConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -187,7 +189,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
             tabCaption.updateCaption(tabUidl);
 
             // Apply the styleName set for the tab
-            String newStyleName = tabUidl.getStringAttribute(TAB_STYLE_NAME);
+            String newStyleName = tabUidl
+                    .getStringAttribute(TabsheetConstants.TAB_STYLE_NAME);
             // Find the nth td element
             if (newStyleName != null && newStyleName.length() != 0) {
                 if (!newStyleName.equals(styleName)) {
@@ -250,10 +253,10 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
         }
 
         public boolean updateCaption(UIDL uidl) {
-            if (uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION)) {
+            if (uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION)) {
                 setTooltipInfo(new TooltipInfo(
-                        uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION),
-                        uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE)));
+                        uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION),
+                        uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE)));
             } else {
                 setTooltipInfo(null);
             }
@@ -261,11 +264,11 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
             // TODO need to call this instead of super because the caption does
             // not have an owner
             boolean ret = updateCaptionWithoutOwner(
-                    uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION),
-                    uidl.hasAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE),
-                    uidl.getStringAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON));
+                    uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_CAPTION),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION),
+                    uidl.hasAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE),
+                    uidl.getStringAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON));
 
             setClosable(uidl.hasAttribute("closable"));
 
@@ -541,9 +544,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
     public static final String TABS_CLASSNAME = "v-tabsheet-tabcontainer";
     public static final String SCROLLER_CLASSNAME = "v-tabsheet-scroller";
 
-    // Can't use "style" as it's already in use
-    public static final String TAB_STYLE_NAME = "tabstyle";
-
     final Element tabs; // tabbar and 'scroller' container
     Tab focusedTab;
     /**
index d98d27942ac465e698cbbe61a01558c36e5a177d..10bfe75e7be055ae50046e3359ada3bcf48a58d2 100644 (file)
@@ -10,6 +10,7 @@ import com.google.gwt.user.client.Event;
 import com.vaadin.shared.ui.Connect;
 import com.vaadin.shared.ui.Connect.LoadStyle;
 import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
+import com.vaadin.shared.ui.textfield.TextFieldConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.Paintable;
 import com.vaadin.terminal.gwt.client.UIDL;
@@ -45,13 +46,13 @@ public class TextFieldConnector extends AbstractFieldConnector implements
         getWidget().listenTextChangeEvents = hasEventListener("ie");
         if (getWidget().listenTextChangeEvents) {
             getWidget().textChangeEventMode = uidl
-                    .getStringAttribute(VTextField.ATTR_TEXTCHANGE_EVENTMODE);
+                    .getStringAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE);
             if (getWidget().textChangeEventMode
-                    .equals(VTextField.TEXTCHANGE_MODE_EAGER)) {
+                    .equals(TextFieldConstants.TEXTCHANGE_MODE_EAGER)) {
                 getWidget().textChangeEventTimeout = 1;
             } else {
                 getWidget().textChangeEventTimeout = uidl
-                        .getIntAttribute(VTextField.ATTR_TEXTCHANGE_TIMEOUT);
+                        .getIntAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT);
                 if (getWidget().textChangeEventTimeout < 1) {
                     // Sanitize and allow lazy/timeout with timeout set to 0 to
                     // work as eager
@@ -72,7 +73,7 @@ public class TextFieldConnector extends AbstractFieldConnector implements
          * value).
          */
         if (!(uidl
-                .getBooleanAttribute(VTextField.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS)
+                .getBooleanAttribute(TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS)
                 && getWidget().valueBeforeEdit != null && text
                     .equals(getWidget().valueBeforeEdit))) {
             getWidget().updateFieldContent(text);
index 7f8e5495504a77851022242bc474a4e8a63a92ed..2d817592d28590a8011e0617688c68a12d063ad6 100644 (file)
@@ -19,6 +19,7 @@ import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.ui.TextBoxBase;
 import com.vaadin.shared.EventId;
+import com.vaadin.shared.ui.textfield.TextFieldConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.Util;
@@ -33,9 +34,6 @@ import com.vaadin.terminal.gwt.client.ui.Field;
 public class VTextField extends TextBoxBase implements Field, ChangeHandler,
         FocusHandler, BlurHandler, KeyDownHandler {
 
-    public static final String VAR_CUR_TEXT = "curText";
-
-    public static final String ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS = "nvc";
     /**
      * The input node CSS classname.
      */
@@ -62,10 +60,6 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
     private int maxLength = -1;
 
     private static final String CLASSNAME_PROMPT = "prompt";
-    public static final String ATTR_TEXTCHANGE_TIMEOUT = "iet";
-    public static final String VAR_CURSOR = "c";
-    public static final String ATTR_TEXTCHANGE_EVENTMODE = "iem";
-    protected static final String TEXTCHANGE_MODE_EAGER = "EAGER";
     private static final String TEXTCHANGE_MODE_TIMEOUT = "TIMEOUT";
 
     private String inputPrompt = null;
@@ -142,7 +136,8 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
                 client.sendPendingVariableChanges();
             } else {
                 // Default case - just send an immediate text change message
-                client.updateVariable(paintableId, VAR_CUR_TEXT, text, true);
+                client.updateVariable(paintableId,
+                        TextFieldConstants.VAR_CUR_TEXT, text, true);
 
                 // Shouldn't investigate valueBeforeEdit to avoid duplicate text
                 // change events as the states are not in sync any more
@@ -334,7 +329,8 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
         if (Util.isAttachedAndDisplayed(this)) {
             int cursorPos = getCursorPos();
             if (lastCursorPos != cursorPos) {
-                client.updateVariable(paintableId, VAR_CURSOR, cursorPos, false);
+                client.updateVariable(paintableId,
+                        TextFieldConstants.VAR_CURSOR, cursorPos, false);
                 lastCursorPos = cursorPos;
                 return true;
             }
index def63edae9e28f4b0868dcfcad2660c515759b21..991b81821c8c33b0c18eef69a5edd9e328770693 100644 (file)
@@ -10,6 +10,7 @@ import java.util.Map;
 import com.google.gwt.dom.client.Element;
 import com.vaadin.shared.AbstractFieldState;
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.tree.TreeConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.Paintable;
@@ -24,13 +25,6 @@ import com.vaadin.ui.Tree;
 public class TreeConnector extends AbstractComponentConnector implements
         Paintable {
 
-    public static final String ATTRIBUTE_NODE_STYLE = "style";
-    public static final String ATTRIBUTE_NODE_CAPTION = "caption";
-    public static final String ATTRIBUTE_NODE_ICON = "icon";
-
-    public static final String ATTRIBUTE_ACTION_CAPTION = "caption";
-    public static final String ATTRIBUTE_ACTION_ICON = ATTRIBUTE_NODE_ICON;
-
     protected final Map<TreeNode, TooltipInfo> tooltipMap = new HashMap<TreeNode, TooltipInfo>();
 
     @Override
@@ -165,11 +159,12 @@ public class TreeConnector extends AbstractComponentConnector implements
             final UIDL action = (UIDL) it.next();
             final String key = action.getStringAttribute("key");
             final String caption = action
-                    .getStringAttribute(ATTRIBUTE_ACTION_CAPTION);
+                    .getStringAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION);
             String iconUrl = null;
-            if (action.hasAttribute(ATTRIBUTE_ACTION_ICON)) {
-                iconUrl = getConnection().translateVaadinUri(
-                        action.getStringAttribute(ATTRIBUTE_ACTION_ICON));
+            if (action.hasAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON)) {
+                iconUrl = getConnection()
+                        .translateVaadinUri(
+                                action.getStringAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON));
             }
             getWidget().registerAction(key, caption, iconUrl);
         }
@@ -178,7 +173,8 @@ public class TreeConnector extends AbstractComponentConnector implements
 
     public void updateNodeFromUIDL(TreeNode treeNode, UIDL uidl) {
         String nodeKey = uidl.getStringAttribute("key");
-        treeNode.setText(uidl.getStringAttribute(ATTRIBUTE_NODE_CAPTION));
+        treeNode.setText(uidl
+                .getStringAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION));
         treeNode.key = nodeKey;
 
         getWidget().registerNode(treeNode);
@@ -197,9 +193,9 @@ public class TreeConnector extends AbstractComponentConnector implements
         } else {
             treeNode.addStyleName(TreeNode.CLASSNAME + "-leaf");
         }
-        if (uidl.hasAttribute(ATTRIBUTE_NODE_STYLE)) {
+        if (uidl.hasAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE)) {
             treeNode.setNodeStyleName(uidl
-                    .getStringAttribute(ATTRIBUTE_NODE_STYLE));
+                    .getStringAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE));
         }
 
         String description = uidl.getStringAttribute("descr");
@@ -218,7 +214,8 @@ public class TreeConnector extends AbstractComponentConnector implements
             getWidget().selectedIds.add(nodeKey);
         }
 
-        treeNode.setIcon(uidl.getStringAttribute(ATTRIBUTE_NODE_ICON));
+        treeNode.setIcon(uidl
+                .getStringAttribute(TreeConstants.ATTRIBUTE_NODE_ICON));
     }
 
     void renderChildNodes(TreeNode containerNode, Iterator<UIDL> i) {
index f5fe6bce1a5f1d14229a16f91b9c045f293319de..430e8d81bae041d3089bf5ef8d3f5dfb03dc7016 100644 (file)
@@ -39,6 +39,7 @@ import com.google.gwt.user.client.ui.UIObject;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.tree.TreeConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.ComponentConnector;
@@ -71,8 +72,6 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
 
     public static final String CLASSNAME = "v-tree";
 
-    public static final String ITEM_CLICK_EVENT_ID = "itemClick";
-
     /**
      * Click selects the current node, ctrl/shift toggles multi selection
      */
@@ -663,8 +662,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
 
             final boolean inCaption = isCaptionElement(target);
             if (inCaption
-                    && client
-                            .hasEventListeners(VTree.this, ITEM_CLICK_EVENT_ID)
+                    && client.hasEventListeners(VTree.this,
+                            TreeConstants.ITEM_CLICK_EVENT_ID)
 
                     && (type == Event.ONDBLCLICK || type == Event.ONMOUSEUP)) {
                 fireClick(event);
index 06e916fbc9f686220d81ef7204f9eb1e175463a1..2cfbdf703e60e0a0f9547ef44c4ab6b4cd2165b1 100644 (file)
@@ -4,6 +4,7 @@
 package com.vaadin.terminal.gwt.client.ui.treetable;
 
 import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.treetable.TreeTableConstants;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.terminal.gwt.client.ui.FocusableScrollPanel;
@@ -14,7 +15,6 @@ import com.vaadin.ui.TreeTable;
 
 @Connect(TreeTable.class)
 public class TreeTableConnector extends TableConnector {
-    public static final String ATTRIBUTE_HIERARCHY_COLUMN_INDEX = "hci";
 
     @Override
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
@@ -26,8 +26,9 @@ public class TreeTableConnector extends TableConnector {
         }
         getWidget().animationsEnabled = uidl.getBooleanAttribute("animate");
         getWidget().colIndexOfHierarchy = uidl
-                .hasAttribute(ATTRIBUTE_HIERARCHY_COLUMN_INDEX) ? uidl
-                .getIntAttribute(ATTRIBUTE_HIERARCHY_COLUMN_INDEX) : 0;
+                .hasAttribute(TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX) ? uidl
+                .getIntAttribute(TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX)
+                : 0;
         int oldTotalRows = getWidget().getTotalRows();
         super.updateFromUIDL(uidl, client);
         if (getWidget().collapseRequest) {
index 1a2deae3b405604e73176d64fb7c04dee0039745..9c7ea76fb2aa07dc901145487c66d71ec760f24c 100644 (file)
@@ -26,6 +26,7 @@ import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.ListBox;
 import com.google.gwt.user.client.ui.Panel;
+import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.terminal.gwt.client.Util;
 import com.vaadin.terminal.gwt.client.ui.SubPartAware;
@@ -36,8 +37,6 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
         MouseDownHandler, DoubleClickHandler, SubPartAware {
 
     private static final String CLASSNAME = "v-select-twincol";
-    public static final String ATTRIBUTE_LEFT_CAPTION = "lc";
-    public static final String ATTRIBUTE_RIGHT_CAPTION = "rc";
 
     private static final int VISIBLE_COUNT = 10;
 
@@ -157,10 +156,14 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
     }
 
     protected void updateCaptions(UIDL uidl) {
-        String leftCaption = (uidl.hasAttribute(ATTRIBUTE_LEFT_CAPTION) ? uidl
-                .getStringAttribute(ATTRIBUTE_LEFT_CAPTION) : null);
-        String rightCaption = (uidl.hasAttribute(ATTRIBUTE_RIGHT_CAPTION) ? uidl
-                .getStringAttribute(ATTRIBUTE_RIGHT_CAPTION) : null);
+        String leftCaption = (uidl
+                .hasAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION) ? uidl
+                .getStringAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION)
+                : null);
+        String rightCaption = (uidl
+                .hasAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION) ? uidl
+                .getStringAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION)
+                : null);
 
         boolean hasCaptions = (leftCaption != null || rightCaption != null);
 
index 1d31410185eccb9a99b4b5b5a1d45828f484b16b..c7f3462b054a5423357992ee3b628580db202ec7 100644 (file)
@@ -38,6 +38,7 @@ import com.vaadin.data.util.converter.ConverterFactory;
 import com.vaadin.data.util.converter.DefaultConverterFactory;
 import com.vaadin.event.EventRouter;
 import com.vaadin.service.ApplicationContext;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.AbstractErrorMessage;
 import com.vaadin.terminal.ApplicationResource;
 import com.vaadin.terminal.CombinedRequest;
@@ -48,7 +49,6 @@ import com.vaadin.terminal.VariableOwner;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedRequest.BrowserDetails;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
 import com.vaadin.terminal.gwt.server.BootstrapFragmentResponse;
 import com.vaadin.terminal.gwt.server.BootstrapListener;
@@ -2300,7 +2300,7 @@ public class Application implements Terminal.ErrorListener, Serializable {
             request = combinedRequest.getSecondRequest();
         }
         String rootIdString = request
-                .getParameter(ApplicationConnection.ROOT_ID_PARAMETER);
+                .getParameter(ApplicationConstants.ROOT_ID_PARAMETER);
         Integer rootId = rootIdString == null ? null
                 : new Integer(rootIdString);
         return rootId;
index a068e7573e17cdc5f6e4d9bb28ec489c6c82da0b..5ae8f7b775394309ca2761dd775278cd85b178d9 100644 (file)
@@ -13,9 +13,8 @@ import java.util.List;
 
 import com.vaadin.event.EventRouter;
 import com.vaadin.shared.ui.root.PageClientRpc;
+import com.vaadin.shared.ui.root.RootConstants;
 import com.vaadin.terminal.WrappedRequest.BrowserDetails;
-import com.vaadin.terminal.gwt.client.ui.notification.VNotification;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
 import com.vaadin.terminal.gwt.server.WebApplicationContext;
 import com.vaadin.terminal.gwt.server.WebBrowser;
 import com.vaadin.tools.ReflectTools;
@@ -467,31 +466,32 @@ public class Page implements Serializable {
                 target.startTag("notification");
                 if (n.getCaption() != null) {
                     target.addAttribute(
-                            VNotification.ATTRIBUTE_NOTIFICATION_CAPTION,
+                            RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION,
                             n.getCaption());
                 }
                 if (n.getDescription() != null) {
                     target.addAttribute(
-                            VNotification.ATTRIBUTE_NOTIFICATION_MESSAGE,
+                            RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE,
                             n.getDescription());
                 }
                 if (n.getIcon() != null) {
                     target.addAttribute(
-                            VNotification.ATTRIBUTE_NOTIFICATION_ICON,
+                            RootConstants.ATTRIBUTE_NOTIFICATION_ICON,
                             n.getIcon());
                 }
                 if (!n.isHtmlContentAllowed()) {
                     target.addAttribute(
-                            VRoot.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED, true);
+                            RootConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
+                            true);
                 }
                 target.addAttribute(
-                        VNotification.ATTRIBUTE_NOTIFICATION_POSITION,
+                        RootConstants.ATTRIBUTE_NOTIFICATION_POSITION,
                         n.getPosition());
-                target.addAttribute(VNotification.ATTRIBUTE_NOTIFICATION_DELAY,
+                target.addAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_DELAY,
                         n.getDelayMsec());
                 if (n.getStyleName() != null) {
                     target.addAttribute(
-                            VNotification.ATTRIBUTE_NOTIFICATION_STYLE,
+                            RootConstants.ATTRIBUTE_NOTIFICATION_STYLE,
                             n.getStyleName());
                 }
                 target.endTag("notification");
@@ -501,7 +501,7 @@ public class Page implements Serializable {
         }
 
         if (fragment != null) {
-            target.addAttribute(VRoot.FRAGMENT_VARIABLE, fragment);
+            target.addAttribute(RootConstants.FRAGMENT_VARIABLE, fragment);
         }
 
     }
index 603bc74a2186421b8d58878e0faafd8f7c7d5c6b..6a6a00843c7936fafbf6333522770cb0b6939d59 100644 (file)
@@ -37,12 +37,12 @@ import javax.servlet.http.HttpSession;
 import com.vaadin.Application;
 import com.vaadin.Application.ApplicationStartEvent;
 import com.vaadin.Application.SystemMessages;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.Terminal;
 import com.vaadin.terminal.ThemeResource;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.server.AbstractCommunicationManager.Callback;
 import com.vaadin.ui.Root;
 
@@ -299,7 +299,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
             // key).
             if (requestType == RequestType.UIDL
                     && request.getParameterMap().containsKey(
-                            ApplicationConnection.PARAM_UNLOADBURST)
+                            ApplicationConstants.PARAM_UNLOADBURST)
                     && request.getContentLength() < 1
                     && getExistingApplication(request, false) == null) {
                 redirectToApplication(request, response);
@@ -1204,7 +1204,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
     }
 
     private boolean isOnUnloadRequest(HttpServletRequest request) {
-        return request.getParameter(ApplicationConnection.PARAM_UNLOADBURST) != null;
+        return request.getParameter(ApplicationConstants.PARAM_UNLOADBURST) != null;
     }
 
     /**
index ba1b3cadb6e60a124e1ce3b6f0b7c8daf5989759..3143ba2e353fef5f7afceac7fe7bfd38dbe432cb 100644 (file)
@@ -55,6 +55,7 @@ import com.vaadin.annotations.StyleSheet;
 import com.vaadin.external.json.JSONArray;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.Connector;
 import com.vaadin.shared.communication.MethodInvocation;
 import com.vaadin.shared.communication.SharedState;
@@ -74,7 +75,6 @@ import com.vaadin.terminal.Vaadin6Component;
 import com.vaadin.terminal.VariableOwner;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.server.BootstrapHandler.BootstrapContext;
 import com.vaadin.terminal.gwt.server.ComponentSizeValidator.InvalidLayout;
 import com.vaadin.terminal.gwt.server.RpcManager.RpcInvocationException;
@@ -90,7 +90,7 @@ import com.vaadin.ui.Window;
  * This is a common base class for the server-side implementations of the
  * communication system between the client code (compiled with GWT into
  * JavaScript) and the server side components. Its client side counterpart is
- * {@link ApplicationConnection}.
+ * {@link ApplicationConstants}.
  * 
  * TODO Document better!
  */
@@ -768,8 +768,8 @@ public abstract class AbstractCommunicationManager implements Serializable {
     public String getSecurityKeyUIDL(WrappedRequest request) {
         final String seckey = getSecurityKey(request);
         if (seckey != null) {
-            return "\"" + ApplicationConnection.UIDL_SECURITY_TOKEN_ID
-                    + "\":\"" + seckey + "\",";
+            return "\"" + ApplicationConstants.UIDL_SECURITY_TOKEN_ID + "\":\""
+                    + seckey + "\",";
         } else {
             return "";
         }
@@ -784,11 +784,11 @@ public abstract class AbstractCommunicationManager implements Serializable {
     protected String getSecurityKey(WrappedRequest request) {
         String seckey = null;
         seckey = (String) request
-                .getSessionAttribute(ApplicationConnection.UIDL_SECURITY_TOKEN_ID);
+                .getSessionAttribute(ApplicationConstants.UIDL_SECURITY_TOKEN_ID);
         if (seckey == null) {
             seckey = UUID.randomUUID().toString();
             request.setSessionAttribute(
-                    ApplicationConnection.UIDL_SECURITY_TOKEN_ID, seckey);
+                    ApplicationConstants.UIDL_SECURITY_TOKEN_ID, seckey);
         }
 
         return seckey;
@@ -1286,7 +1286,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
             }
         }
 
-        return ApplicationConnection.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
+        return ApplicationConstants.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
     }
 
     /**
@@ -1543,7 +1543,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
                     // ApplicationServlet has stored the security token in the
                     // session; check that it matched the one sent in the UIDL
                     String sessId = (String) request
-                            .getSessionAttribute(ApplicationConnection.UIDL_SECURITY_TOKEN_ID);
+                            .getSessionAttribute(ApplicationConstants.UIDL_SECURITY_TOKEN_ID);
 
                     if (sessId == null || !sessId.equals(bursts[0])) {
                         throw new InvalidUIDLSecurityKeyException(
@@ -2342,7 +2342,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
             streamVariableToSeckey.put(value, seckey);
         }
 
-        return ApplicationConnection.APP_PROTOCOL_PREFIX
+        return ApplicationConstants.APP_PROTOCOL_PREFIX
                 + ServletPortletHelper.UPLOAD_URL_PREFIX + key + "/" + seckey;
 
     }
@@ -2406,8 +2406,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
             params.put("widgetset", widgetset);
             params.put("themeUri", themeUri);
             // Root id might have changed based on e.g. window.name
-            params.put(ApplicationConnection.ROOT_ID_PARAMETER,
-                    root.getRootId());
+            params.put(ApplicationConstants.ROOT_ID_PARAMETER, root.getRootId());
             if (sendUIDL) {
                 String initialUIDL = getInitialUIDL(combinedRequest, root);
                 params.put("uidl", initialUIDL);
@@ -2484,7 +2483,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
         String pathInfo = request.getRequestPathInfo();
         // + 2 to also remove beginning and ending slashes
         String resourceName = pathInfo
-                .substring(ApplicationConnection.CONNECTOR_RESOURCE_PREFIX
+                .substring(ApplicationConstants.CONNECTOR_RESOURCE_PREFIX
                         .length() + 2);
 
         final String mimetype = response.getDeploymentConfiguration()
index 3a33621d108fb23ca5fb792b04d2df10dd553a31..33f4cd118da78b2fa3f9eddc629585b5658161c3 100644 (file)
@@ -23,8 +23,8 @@ import javax.servlet.http.HttpSessionBindingListener;
 
 import com.vaadin.Application;
 import com.vaadin.service.ApplicationContext;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.ApplicationResource;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 
 /**
  * Base class for web application contexts (including portlet contexts) that
@@ -181,8 +181,8 @@ public abstract class AbstractWebApplicationContext implements
 
         final String filename = resource.getFilename();
         if (filename == null) {
-            return ApplicationConnection.APP_PROTOCOL_PREFIX
-                    + ApplicationConnection.APP_REQUEST_PATH + mapKey + "/";
+            return ApplicationConstants.APP_PROTOCOL_PREFIX
+                    + ApplicationConstants.APP_REQUEST_PATH + mapKey + "/";
         } else {
             // #7738 At least Tomcat and JBoss refuses requests containing
             // encoded slashes or backslashes in URLs. Application resource URLs
@@ -190,8 +190,8 @@ public abstract class AbstractWebApplicationContext implements
             // in the future.
             String encodedFileName = urlEncode(filename).replace("%2F", "/")
                     .replace("%5C", "\\");
-            return ApplicationConnection.APP_PROTOCOL_PREFIX
-                    + ApplicationConnection.APP_REQUEST_PATH + mapKey + "/"
+            return ApplicationConstants.APP_PROTOCOL_PREFIX
+                    + ApplicationConstants.APP_REQUEST_PATH + mapKey + "/"
                     + encodedFileName;
         }
 
index e89737337b452a934f7936e23b5679d5a2b8216e..4d278a55a1234632b97c2c5fa24ce3f6ad00f814 100644 (file)
@@ -29,12 +29,12 @@ import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.Version;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.RequestHandler;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.ui.Root;
 
 public abstract class BootstrapHandler implements RequestHandler {
@@ -256,7 +256,7 @@ public abstract class BootstrapHandler implements RequestHandler {
 
         Element body = document.body();
         body.attr("scroll", "auto");
-        body.addClass(ApplicationConnection.GENERATED_BODY_CLASSNAME);
+        body.addClass(ApplicationConstants.GENERATED_BODY_CLASSNAME);
     }
 
     public BootstrapContext createContext(WrappedRequest request,
@@ -410,7 +410,7 @@ public abstract class BootstrapHandler implements RequestHandler {
         JSONObject appConfig = new JSONObject();
 
         if (rootId != null) {
-            appConfig.put(ApplicationConnection.ROOT_ID_PARAMETER, rootId);
+            appConfig.put(ApplicationConstants.ROOT_ID_PARAMETER, rootId);
         }
 
         if (context.getThemeName() != null) {
index 8199bc6ada38127eddedd2a85769f3d3293b3488..7df4e3e7c4ea2469c220835c9ca438f3fe69f5a7 100644 (file)
@@ -30,8 +30,8 @@ import com.vaadin.external.json.JSONArray;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.JsonConstants;
 import com.vaadin.shared.communication.UidlValue;
-import com.vaadin.terminal.gwt.client.communication.JsonEncoder;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ConnectorTracker;
 
@@ -52,24 +52,24 @@ public class JsonCodec implements Serializable {
     private static Map<String, Class<?>> transportTypeToType = new HashMap<String, Class<?>>();
 
     static {
-        registerType(String.class, JsonEncoder.VTYPE_STRING);
-        registerType(Connector.class, JsonEncoder.VTYPE_CONNECTOR);
-        registerType(Boolean.class, JsonEncoder.VTYPE_BOOLEAN);
-        registerType(boolean.class, JsonEncoder.VTYPE_BOOLEAN);
-        registerType(Integer.class, JsonEncoder.VTYPE_INTEGER);
-        registerType(int.class, JsonEncoder.VTYPE_INTEGER);
-        registerType(Float.class, JsonEncoder.VTYPE_FLOAT);
-        registerType(float.class, JsonEncoder.VTYPE_FLOAT);
-        registerType(Double.class, JsonEncoder.VTYPE_DOUBLE);
-        registerType(double.class, JsonEncoder.VTYPE_DOUBLE);
-        registerType(Long.class, JsonEncoder.VTYPE_LONG);
-        registerType(long.class, JsonEncoder.VTYPE_LONG);
-        registerType(String[].class, JsonEncoder.VTYPE_STRINGARRAY);
-        registerType(Object[].class, JsonEncoder.VTYPE_ARRAY);
-        registerType(Map.class, JsonEncoder.VTYPE_MAP);
-        registerType(HashMap.class, JsonEncoder.VTYPE_MAP);
-        registerType(List.class, JsonEncoder.VTYPE_LIST);
-        registerType(Set.class, JsonEncoder.VTYPE_SET);
+        registerType(String.class, JsonConstants.VTYPE_STRING);
+        registerType(Connector.class, JsonConstants.VTYPE_CONNECTOR);
+        registerType(Boolean.class, JsonConstants.VTYPE_BOOLEAN);
+        registerType(boolean.class, JsonConstants.VTYPE_BOOLEAN);
+        registerType(Integer.class, JsonConstants.VTYPE_INTEGER);
+        registerType(int.class, JsonConstants.VTYPE_INTEGER);
+        registerType(Float.class, JsonConstants.VTYPE_FLOAT);
+        registerType(float.class, JsonConstants.VTYPE_FLOAT);
+        registerType(Double.class, JsonConstants.VTYPE_DOUBLE);
+        registerType(double.class, JsonConstants.VTYPE_DOUBLE);
+        registerType(Long.class, JsonConstants.VTYPE_LONG);
+        registerType(long.class, JsonConstants.VTYPE_LONG);
+        registerType(String[].class, JsonConstants.VTYPE_STRINGARRAY);
+        registerType(Object[].class, JsonConstants.VTYPE_ARRAY);
+        registerType(Map.class, JsonConstants.VTYPE_MAP);
+        registerType(HashMap.class, JsonConstants.VTYPE_MAP);
+        registerType(List.class, JsonConstants.VTYPE_LIST);
+        registerType(Set.class, JsonConstants.VTYPE_SET);
     }
 
     private static void registerType(Class<?> type, String transportType) {
@@ -215,24 +215,24 @@ public class JsonCodec implements Serializable {
         }
 
         // Collections
-        if (JsonEncoder.VTYPE_LIST.equals(transportType)) {
+        if (JsonConstants.VTYPE_LIST.equals(transportType)) {
             return decodeList(targetType, restrictToInternalTypes,
                     (JSONArray) encodedJsonValue, connectorTracker);
-        } else if (JsonEncoder.VTYPE_SET.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_SET.equals(transportType)) {
             return decodeSet(targetType, restrictToInternalTypes,
                     (JSONArray) encodedJsonValue, connectorTracker);
-        } else if (JsonEncoder.VTYPE_MAP.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_MAP.equals(transportType)) {
             return decodeMap(targetType, restrictToInternalTypes,
                     encodedJsonValue, connectorTracker);
         }
 
         // Arrays
-        if (JsonEncoder.VTYPE_ARRAY.equals(transportType)) {
+        if (JsonConstants.VTYPE_ARRAY.equals(transportType)) {
 
             return decodeObjectArray(targetType, (JSONArray) encodedJsonValue,
                     connectorTracker);
 
-        } else if (JsonEncoder.VTYPE_STRINGARRAY.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_STRINGARRAY.equals(transportType)) {
             return decodeStringArray((JSONArray) encodedJsonValue);
         }
 
@@ -240,23 +240,23 @@ public class JsonCodec implements Serializable {
 
         String stringValue = String.valueOf(encodedJsonValue);
 
-        if (JsonEncoder.VTYPE_CONNECTOR.equals(transportType)) {
+        if (JsonConstants.VTYPE_CONNECTOR.equals(transportType)) {
             return connectorTracker.getConnector(stringValue);
         }
 
         // Legacy types
 
-        if (JsonEncoder.VTYPE_STRING.equals(transportType)) {
+        if (JsonConstants.VTYPE_STRING.equals(transportType)) {
             return stringValue;
-        } else if (JsonEncoder.VTYPE_INTEGER.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_INTEGER.equals(transportType)) {
             return Integer.valueOf(stringValue);
-        } else if (JsonEncoder.VTYPE_LONG.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_LONG.equals(transportType)) {
             return Long.valueOf(stringValue);
-        } else if (JsonEncoder.VTYPE_FLOAT.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_FLOAT.equals(transportType)) {
             return Float.valueOf(stringValue);
-        } else if (JsonEncoder.VTYPE_DOUBLE.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_DOUBLE.equals(transportType)) {
             return Double.valueOf(stringValue);
-        } else if (JsonEncoder.VTYPE_BOOLEAN.equals(transportType)) {
+        } else if (JsonConstants.VTYPE_BOOLEAN.equals(transportType)) {
             return Boolean.valueOf(stringValue);
         }
 
@@ -280,7 +280,7 @@ public class JsonCodec implements Serializable {
         if (encodedTransportType.equals(transportType)) {
             return true;
         }
-        if (encodedTransportType.equals(JsonEncoder.VTYPE_NULL)) {
+        if (encodedTransportType.equals(JsonConstants.VTYPE_NULL)) {
             return true;
         }
 
index 9dba05d2c1e845f1a7832db95495a5316c615106..a6b72a3fb546f87d71ca94a70fd2f8f0b8f9d6a5 100644 (file)
@@ -6,24 +6,24 @@ package com.vaadin.terminal.gwt.server;
 import java.util.HashMap;
 import java.util.Map;
 
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.shared.communication.MethodInvocation;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 
 public class LegacyChangeVariablesInvocation extends MethodInvocation {
     private Map<String, Object> variableChanges = new HashMap<String, Object>();
 
     public LegacyChangeVariablesInvocation(String connectorId,
             String variableName, Object value) {
-        super(connectorId, ApplicationConnection.UPDATE_VARIABLE_INTERFACE,
-                ApplicationConnection.UPDATE_VARIABLE_METHOD);
+        super(connectorId, ApplicationConstants.UPDATE_VARIABLE_INTERFACE,
+                ApplicationConstants.UPDATE_VARIABLE_METHOD);
         setVariableChange(variableName, value);
     }
 
     public static boolean isLegacyVariableChange(String interfaceName,
             String methodName) {
-        return ApplicationConnection.UPDATE_VARIABLE_METHOD
+        return ApplicationConstants.UPDATE_VARIABLE_METHOD
                 .equals(interfaceName)
-                && ApplicationConnection.UPDATE_VARIABLE_METHOD
+                && ApplicationConstants.UPDATE_VARIABLE_METHOD
                         .equals(methodName);
     }
 
index 39c27d05feb993b97154349257411a6942fe8656..b082cd47296b4dd07f27e8dca65eb95c23c12cb3 100644 (file)
@@ -17,11 +17,11 @@ import javax.portlet.ResourceURL;
 import com.vaadin.Application;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConfiguration;
 import com.vaadin.ui.Root;
 
 /**
@@ -91,7 +91,7 @@ public class PortletCommunicationManager extends AbstractCommunicationManager {
                         .createResourceURL();
                 portletResourceUrl
                         .setResourceID(AbstractApplicationPortlet.RESOURCE_URL_ID);
-                defaults.put(ApplicationConfiguration.PORTLET_RESOUCE_URL_BASE,
+                defaults.put(ApplicationConstants.PORTLET_RESOUCE_URL_BASE,
                         portletResourceUrl.toString());
 
                 defaults.put("pathInfo", "");
index 2a1dc318970c7ff5dde0eafe4eb992b153fc6067..ce8e8946cef3b9e6267bae4eedafd8b98e64dccb 100644 (file)
@@ -3,9 +3,9 @@ package com.vaadin.terminal.gwt.server;
 import java.io.Serializable;
 
 import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.ui.Root;
 
 /*
@@ -106,15 +106,15 @@ class ServletPortletHelper implements Serializable {
 
     public static boolean isConnectorResourceRequest(WrappedRequest request) {
         return hasPathPrefix(request,
-                ApplicationConnection.CONNECTOR_RESOURCE_PREFIX + "/");
+                ApplicationConstants.CONNECTOR_RESOURCE_PREFIX + "/");
     }
 
     public static boolean isUIDLRequest(WrappedRequest request) {
-        return hasPathPrefix(request, ApplicationConnection.UIDL_REQUEST_PATH);
+        return hasPathPrefix(request, ApplicationConstants.UIDL_REQUEST_PATH);
     }
 
     public static boolean isApplicationResourceRequest(WrappedRequest request) {
-        return hasPathPrefix(request, ApplicationConnection.APP_REQUEST_PATH);
+        return hasPathPrefix(request, ApplicationConstants.APP_REQUEST_PATH);
     }
 
 }
index a3fa172034b97fe727300ba25d332bf90027edbc..0a3623f987ce239e970031a6fac12d8a1fafd0f5 100644 (file)
@@ -14,10 +14,10 @@ import javax.portlet.PortletRequest;
 import javax.portlet.ResourceRequest;
 
 import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.CombinedRequest;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 
 /**
  * Wrapper for {@link PortletRequest} and its subclasses.
@@ -94,7 +94,7 @@ public class WrappedPortletRequest implements WrappedRequest {
             String resourceID = resourceRequest.getResourceID();
             if (AbstractApplicationPortlet.RESOURCE_URL_ID.equals(resourceID)) {
                 String resourcePath = resourceRequest
-                        .getParameter(ApplicationConnection.V_RESOURCE_PATH);
+                        .getParameter(ApplicationConstants.V_RESOURCE_PATH);
                 return resourcePath;
             }
             return resourceID;
index 1c84ca28652759344b12fe122cad1e29d09bfa6b..687f7452c564f5433e696b75ff47fa40ce05f012 100644 (file)
@@ -13,11 +13,11 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
 import com.vaadin.event.LayoutEvents.LayoutClickListener;
 import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutServerRpc;
 import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState;
 import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
 
 /**
  * AbsoluteLayout is a layout implementation that mimics html absolute
@@ -618,14 +618,14 @@ public class AbsoluteLayout extends AbstractLayout implements
 
     @Override
     public void addListener(LayoutClickListener listener) {
-        addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener,
                 LayoutClickListener.clickMethod);
     }
 
     @Override
     public void removeListener(LayoutClickListener listener) {
-        removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener);
     }
 
index 5ec80573abcb1c3f766e0a3249ff72cd8a9215a7..12f1f83968574dafb674d817b7ad97d2d48da7a1 100644 (file)
@@ -5,8 +5,6 @@ package com.vaadin.ui;
 
 import com.vaadin.shared.ui.JavaScriptComponentState;
 import com.vaadin.terminal.JavaScriptCallbackHelper;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ui.JavaScriptWidget;
 
 /**
  * Base class for Components with all client-side logic implemented using
index 0581d0a27921d09b336a2269e4b17ef6f2406239..1a3b9407e8654b99d427658893bafbad5ada2a04 100644 (file)
@@ -11,12 +11,12 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
 import com.vaadin.event.LayoutEvents.LayoutClickListener;
 import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
 import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
 import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData;
 import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
 
 @SuppressWarnings("serial")
 public abstract class AbstractOrderedLayout extends AbstractLayout implements
@@ -345,14 +345,14 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
 
     @Override
     public void addListener(LayoutClickListener listener) {
-        addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener,
                 LayoutClickListener.clickMethod);
     }
 
     @Override
     public void removeListener(LayoutClickListener listener) {
-        removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener);
     }
 
index 90dc38ff65213080585ae3b6007422539403aefb..3b51e6099b30f1e22be1b4ffcc82d2dabe00822f 100644 (file)
@@ -10,12 +10,12 @@ import java.util.Iterator;
 
 import com.vaadin.event.ComponentEventListener;
 import com.vaadin.event.MouseEvents.ClickEvent;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelRpc;
 import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState;
 import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState;
 import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
 import com.vaadin.tools.ReflectTools;
 
 /**
@@ -500,13 +500,12 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
     }
 
     public void addListener(SplitterClickListener listener) {
-        addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
-                SplitterClickEvent.class, listener,
-                SplitterClickListener.clickMethod);
+        addListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class,
+                listener, SplitterClickListener.clickMethod);
     }
 
     public void removeListener(SplitterClickListener listener) {
-        removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
+        removeListener(EventId.CLICK_EVENT_IDENTIFIER,
                 SplitterClickEvent.class, listener);
     }
 
index 2326c07d97a6f3614a67ee029f7466863f1c7a61..2ded12d18def579efa388fa78420addd7a1555fc 100644 (file)
@@ -16,10 +16,10 @@ import com.vaadin.event.FieldEvents.TextChangeEvent;
 import com.vaadin.event.FieldEvents.TextChangeListener;
 import com.vaadin.event.FieldEvents.TextChangeNotifier;
 import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
+import com.vaadin.shared.ui.textfield.TextFieldConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.textfield.VTextField;
 
 public abstract class AbstractTextField extends AbstractField<String> implements
         BlurNotifier, FocusNotifier, TextChangeNotifier, Vaadin6Component {
@@ -105,9 +105,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements
         }
 
         if (hasListeners(TextChangeEvent.class)) {
-            target.addAttribute(VTextField.ATTR_TEXTCHANGE_EVENTMODE,
+            target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
                     getTextChangeEventMode().toString());
-            target.addAttribute(VTextField.ATTR_TEXTCHANGE_TIMEOUT,
+            target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
                     getTextChangeTimeout());
             if (lastKnownTextContent != null) {
                 /*
@@ -118,7 +118,8 @@ public abstract class AbstractTextField extends AbstractField<String> implements
                  * the actual value, depending on its state.
                  */
                 target.addAttribute(
-                        VTextField.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS, true);
+                        TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS,
+                        true);
             }
         }
 
@@ -130,12 +131,13 @@ public abstract class AbstractTextField extends AbstractField<String> implements
 
         try {
 
-            if (variables.containsKey(VTextField.VAR_CURSOR)) {
-                Integer object = (Integer) variables.get(VTextField.VAR_CURSOR);
+            if (variables.containsKey(TextFieldConstants.VAR_CURSOR)) {
+                Integer object = (Integer) variables
+                        .get(TextFieldConstants.VAR_CURSOR);
                 lastKnownCursorPosition = object.intValue();
             }
 
-            if (variables.containsKey(VTextField.VAR_CUR_TEXT)) {
+            if (variables.containsKey(TextFieldConstants.VAR_CUR_TEXT)) {
                 /*
                  * NOTE, we might want to develop this further so that on a
                  * value change event the whole text content don't need to be
@@ -439,7 +441,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
          * some sort of diffs instead of always sending the whole text content.
          * Also on value change events we could use the mechanism.
          */
-        String object = (String) variables.get(VTextField.VAR_CUR_TEXT);
+        String object = (String) variables.get(TextFieldConstants.VAR_CUR_TEXT);
         lastKnownTextContent = object;
         textChangeEventPending = true;
     }
index 6286dad124fbaf21a63a6c65a52c2ce2dd244bb0..a4dcdc152dda96886380df8379c5c1924b87c649 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.ui;
 import java.util.Collection;
 
 import com.vaadin.data.Container;
+import com.vaadin.shared.ui.combobox.ComboBoxConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect;
 
 /**
  * A filtering dropdown single-select. Suitable for newItemsAllowed, but it's
@@ -75,12 +75,12 @@ public class ComboBox extends Select {
     @Override
     public void paintContent(PaintTarget target) throws PaintException {
         if (inputPrompt != null) {
-            target.addAttribute("prompt", inputPrompt);
+            target.addAttribute(ComboBoxConstants.ATTR_INPUTPROMPT, inputPrompt);
         }
         super.paintContent(target);
 
         if (!textInputAllowed) {
-            target.addAttribute(VFilterSelect.ATTR_NO_TEXT_INPUT, true);
+            target.addAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT, true);
         }
     }
 
index e3d1bf86dba4b3c1f831c1c354284ea2cddbc02f..0eeaa0d9e1d3a493dc501cf63a3577840299bcd8 100644 (file)
@@ -13,7 +13,6 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import com.vaadin.terminal.AbstractClientConnector;
-import com.vaadin.terminal.gwt.client.ServerConnector;
 import com.vaadin.terminal.gwt.server.ClientConnector;
 
 /**
index 356f0a3843c52f9db64dd923745c4d37679fbcc3..24f12e8403221f699ba51346d1cae89fc257358a 100644 (file)
@@ -10,10 +10,10 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
 import com.vaadin.event.LayoutEvents.LayoutClickListener;
 import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.csslayout.CssLayoutServerRpc;
 import com.vaadin.shared.ui.csslayout.CssLayoutState;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
 
 /**
  * CssLayout is a layout component that can be used in browser environment only.
@@ -270,14 +270,14 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
 
     @Override
     public void addListener(LayoutClickListener listener) {
-        addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener,
                 LayoutClickListener.clickMethod);
     }
 
     @Override
     public void removeListener(LayoutClickListener listener) {
-        removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener);
     }
 
index d0a22f3c29f6501f788cd3aebeb2f291e24e3541..ff597f86990c7db956ef0d33f11074d17d9b8e8c 100644 (file)
@@ -24,10 +24,10 @@ import com.vaadin.event.FieldEvents.BlurEvent;
 import com.vaadin.event.FieldEvents.BlurListener;
 import com.vaadin.event.FieldEvents.FocusEvent;
 import com.vaadin.event.FieldEvents.FocusListener;
+import com.vaadin.shared.ui.datefield.DateFieldConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.datefield.VDateField;
 
 /**
  * <p>
@@ -303,7 +303,8 @@ public class DateField extends AbstractField<Date> implements
             target.addAttribute("strict", true);
         }
 
-        target.addAttribute(VDateField.WEEK_NUMBERS, isShowISOWeekNumbers());
+        target.addAttribute(DateFieldConstants.ATTR_WEEK_NUMBERS,
+                isShowISOWeekNumbers());
         target.addAttribute("parsable", uiHasValidDateString);
         /*
          * TODO communicate back the invalid date string? E.g. returning back to
index 67229a45fe2a4d70f284a2257be83c4379491eac..b5bd3097b2193247950fbe1a7a38658f49665148 100644 (file)
@@ -20,11 +20,11 @@ import com.vaadin.event.dd.TargetDetailsImpl;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.dd.HorizontalDropLocation;
 import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.StreamVariable;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.draganddropwrapper.VDragAndDropWrapper;
 
 @SuppressWarnings("serial")
 public class DragAndDropWrapper extends CustomComponent implements DropTarget,
@@ -221,7 +221,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
 
     @Override
     public void paintContent(PaintTarget target) throws PaintException {
-        target.addAttribute(VDragAndDropWrapper.DRAG_START_MODE,
+        target.addAttribute(DragAndDropWrapperConstants.DRAG_START_MODE,
                 dragStartMode.ordinal());
         if (getDropHandler() != null) {
             getDropHandler().getAcceptCriterion().paint(target);
@@ -245,7 +245,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
                 }
             }
         }
-        target.addAttribute(VDragAndDropWrapper.HTML5_DATA_FLAVORS,
+        target.addAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS,
                 html5DataFlavors);
     }
 
index 6088c5aa6647e1bd50f39e9ec653aa63ecb96152..ffa47f60b8675ee268e893ae1c352491d291d328 100644 (file)
@@ -10,14 +10,14 @@ import java.util.Map;
 
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.embedded.EmbeddedConstants;
 import com.vaadin.shared.ui.embedded.EmbeddedServerRpc;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedConnector;
 
 /**
  * Component for embedding external objects.
@@ -158,7 +158,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
             target.addAttribute("archive", archive);
         }
         if (altText != null && !"".equals(altText)) {
-            target.addAttribute(EmbeddedConnector.ALTERNATE_TEXT, altText);
+            target.addAttribute(EmbeddedConstants.ALTERNATE_TEXT, altText);
         }
 
         // Params
@@ -507,8 +507,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
      *            The listener to add
      */
     public void addListener(ClickListener listener) {
-        addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
-                listener, ClickListener.clickMethod);
+        addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
+                ClickListener.clickMethod);
     }
 
     /**
@@ -519,8 +519,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
      *            The listener to remove
      */
     public void removeListener(ClickListener listener) {
-        removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
-                ClickEvent.class, listener);
+        removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+                listener);
     }
 
     @Override
index 2391a9cd3aa5c68f16fa10692c15e75e85926a7c..49d4c2693679a5234c4d41346efbef89a6ab1c09 100644 (file)
@@ -16,6 +16,7 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
 import com.vaadin.event.LayoutEvents.LayoutClickListener;
 import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
 import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.gridlayout.GridLayoutServerRpc;
 import com.vaadin.shared.ui.gridlayout.GridLayoutState;
@@ -23,7 +24,6 @@ import com.vaadin.terminal.LegacyPaint;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
 
 /**
  * A layout where the components are laid out on a grid using cell coordinates.
@@ -1401,14 +1401,14 @@ public class GridLayout extends AbstractLayout implements
 
     @Override
     public void addListener(LayoutClickListener listener) {
-        addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener,
                 LayoutClickListener.clickMethod);
     }
 
     @Override
     public void removeListener(LayoutClickListener listener) {
-        removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+        removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
                 LayoutClickEvent.class, listener);
     }
 
index db7e5f9dd9f4128e58deb70af1562a284a99a33f..9a217f0c69852e0efada9d84c94d46d3ed261b59 100644 (file)
@@ -13,12 +13,12 @@ import java.util.Iterator;
 import java.util.Map;
 
 import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
 import com.vaadin.terminal.ApplicationResource;
 import com.vaadin.terminal.DownloadStream;
 import com.vaadin.terminal.RequestHandler;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
 
 /**
  * LoginForm is a Vaadin component to handle common problem among Ajax
@@ -156,7 +156,7 @@ public class LoginForm extends CustomComponent {
                     + " if (keycode == 13) {document.forms[0].submit();}  } \n"
                     + "</script>"
                     + "</head><body onload='setTarget();' style='margin:0;padding:0; background:transparent;' class=\""
-                    + ApplicationConnection.GENERATED_BODY_CLASSNAME
+                    + ApplicationConstants.GENERATED_BODY_CLASSNAME
                     + "\">"
                     + "<div class='v-app v-app-loginpage' style=\"background:transparent;\">"
                     + "<iframe name='logintarget' style='width:0;height:0;"
index 5b5dc13e20ccd97ee688e74ee9ffb21a2e8c712a..abf71858aeb30c47b12b0aa15d2d2ade6dd6e907 100644 (file)
@@ -10,11 +10,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
+import com.vaadin.shared.ui.menubar.MenuBarConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar;
 
 /**
  * <p>
@@ -41,10 +41,11 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
     /** Paint (serialise) the component for the client. */
     @Override
     public void paintContent(PaintTarget target) throws PaintException {
-        target.addAttribute(VMenuBar.OPEN_ROOT_MENU_ON_HOWER, openRootOnHover);
+        target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER,
+                openRootOnHover);
 
         if (isHtmlContentAllowed()) {
-            target.addAttribute(VMenuBar.HTML_CONTENT_ALLOWED, true);
+            target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED, true);
         }
 
         target.startTag("options");
@@ -80,7 +81,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
         target.addAttribute("id", item.getId());
 
         if (item.getStyleName() != null) {
-            target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_STYLE,
+            target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE,
                     item.getStyleName());
         }
 
@@ -96,22 +97,24 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
 
             Resource icon = item.getIcon();
             if (icon != null) {
-                target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_ICON, icon);
+                target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon);
             }
 
             if (!item.isEnabled()) {
-                target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DISABLED, true);
+                target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DISABLED,
+                        true);
             }
 
             String description = item.getDescription();
             if (description != null && description.length() > 0) {
-                target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DESCRIPTION,
+                target.addAttribute(
+                        MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION,
                         description);
             }
             if (item.isCheckable()) {
                 // if the "checked" attribute is present (either true or false),
                 // the item is checkable
-                target.addAttribute(VMenuBar.ATTRIBUTE_CHECKED,
+                target.addAttribute(MenuBarConstants.ATTRIBUTE_CHECKED,
                         item.isChecked());
             }
             if (item.hasChildren()) {
index e3bcdd61b7980e476e19f7778745ffd96d507870..25a6e5132acfdc806b7f1c7674d512dba6ac0c9c 100644 (file)
@@ -15,9 +15,9 @@ import com.vaadin.event.FieldEvents.BlurEvent;
 import com.vaadin.event.FieldEvents.BlurListener;
 import com.vaadin.event.FieldEvents.FocusEvent;
 import com.vaadin.event.FieldEvents.FocusListener;
+import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroup;
 
 /**
  * Configures select to be used as an option group.
@@ -49,7 +49,7 @@ public class OptionGroup extends AbstractSelect implements
     public void paintContent(PaintTarget target) throws PaintException {
         target.addAttribute("type", "optiongroup");
         if (isHtmlContentAllowed()) {
-            target.addAttribute(VOptionGroup.HTML_CONTENT_ALLOWED, true);
+            target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED, true);
         }
         super.paintContent(target);
     }
@@ -59,7 +59,8 @@ public class OptionGroup extends AbstractSelect implements
             throws PaintException {
         super.paintItem(target, itemId);
         if (!isItemEnabled(itemId)) {
-            target.addAttribute(VOptionGroup.ATTRIBUTE_OPTION_DISABLED, true);
+            target.addAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED,
+                    true);
         }
     }
 
index 3c26b73f097dd02f53790a8fa8559ac3ede88caa..fab8d57c02647bf337ba32afac11894f4d0d8d9f 100644 (file)
@@ -13,6 +13,7 @@ import com.vaadin.event.Action.Handler;
 import com.vaadin.event.ActionManager;
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.panel.PanelServerRpc;
 import com.vaadin.shared.ui.panel.PanelState;
@@ -20,7 +21,6 @@ import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Scrollable;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
 import com.vaadin.ui.Component.Focusable;
 
 /**
@@ -425,8 +425,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
      *            The listener to add
      */
     public void addListener(ClickListener listener) {
-        addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
-                listener, ClickListener.clickMethod);
+        addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
+                ClickListener.clickMethod);
     }
 
     /**
@@ -437,8 +437,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
      *            The listener to remove
      */
     public void removeListener(ClickListener listener) {
-        removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
-                ClickEvent.class, listener);
+        removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+                listener);
     }
 
     /**
index bd4842632bc62a1d1820c29f78eb60d1df8f6a61..c5840a61de3250073c5cc625668862adbc82ac35 100644 (file)
@@ -20,7 +20,9 @@ import com.vaadin.event.Action.Handler;
 import com.vaadin.event.ActionManager;
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
 import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.root.RootConstants;
 import com.vaadin.shared.ui.root.RootServerRpc;
 import com.vaadin.shared.ui.root.RootState;
 import com.vaadin.terminal.Page;
@@ -32,7 +34,6 @@ import com.vaadin.terminal.Resource;
 import com.vaadin.terminal.Vaadin6Component;
 import com.vaadin.terminal.WrappedRequest;
 import com.vaadin.terminal.WrappedRequest.BrowserDetails;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
 import com.vaadin.ui.Window.CloseListener;
 
 /**
@@ -412,8 +413,6 @@ public abstract class Root extends AbstractComponentContainer implements
     private static final ThreadLocal<Root> currentRoot = new ThreadLocal<Root>();
 
     /** Identifies the click event */
-    private static final String CLICK_EVENT_ID = VRoot.CLICK_EVENT_ID;
-
     private ConnectorTracker connectorTracker = new ConnectorTracker(this);
 
     private Page page = new Page(this);
@@ -537,7 +536,7 @@ public abstract class Root extends AbstractComponentContainer implements
         }
 
         if (isResizeLazy()) {
-            target.addAttribute(VRoot.RESIZE_LAZY, true);
+            target.addAttribute(RootConstants.RESIZE_LAZY, true);
         }
     }
 
@@ -556,8 +555,9 @@ public abstract class Root extends AbstractComponentContainer implements
     @Override
     @SuppressWarnings("unchecked")
     public void changeVariables(Object source, Map<String, Object> variables) {
-        if (variables.containsKey(CLICK_EVENT_ID)) {
-            fireClick((Map<String, Object>) variables.get(CLICK_EVENT_ID));
+        if (variables.containsKey(EventId.CLICK_EVENT_IDENTIFIER)) {
+            fireClick((Map<String, Object>) variables
+                    .get(EventId.CLICK_EVENT_IDENTIFIER));
         }
 
         // Actions
@@ -565,8 +565,9 @@ public abstract class Root extends AbstractComponentContainer implements
             actionManager.handleActions(variables, this);
         }
 
-        if (variables.containsKey(VRoot.FRAGMENT_VARIABLE)) {
-            String fragment = (String) variables.get(VRoot.FRAGMENT_VARIABLE);
+        if (variables.containsKey(RootConstants.FRAGMENT_VARIABLE)) {
+            String fragment = (String) variables
+                    .get(RootConstants.FRAGMENT_VARIABLE);
             getPage().setFragment(fragment, true);
         }
 
@@ -1026,7 +1027,7 @@ public abstract class Root extends AbstractComponentContainer implements
      *            The listener to add
      */
     public void addListener(ClickListener listener) {
-        addListener(CLICK_EVENT_ID, ClickEvent.class, listener,
+        addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
                 ClickListener.clickMethod);
     }
 
@@ -1038,7 +1039,8 @@ public abstract class Root extends AbstractComponentContainer implements
      *            The listener to remove
      */
     public void removeListener(ClickListener listener) {
-        removeListener(CLICK_EVENT_ID, ClickEvent.class, listener);
+        removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+                listener);
     }
 
     @Override
index c52e9394c0c2614a5dfc09ba504f21f4cfa3cd8a..f6db9f9b91f493c67c3897796041d65461cc81cb 100644 (file)
@@ -18,6 +18,8 @@ import com.vaadin.event.FieldEvents.BlurNotifier;
 import com.vaadin.event.FieldEvents.FocusEvent;
 import com.vaadin.event.FieldEvents.FocusListener;
 import com.vaadin.event.FieldEvents.FocusNotifier;
+import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
+import com.vaadin.shared.ui.tabsheet.TabsheetConstants;
 import com.vaadin.terminal.ErrorMessage;
 import com.vaadin.terminal.KeyMapper;
 import com.vaadin.terminal.LegacyPaint;
@@ -25,8 +27,6 @@ import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.tabsheet.TabsheetBaseConnector;
-import com.vaadin.terminal.gwt.client.ui.tabsheet.VTabsheet;
 import com.vaadin.ui.Component.Focusable;
 import com.vaadin.ui.themes.Reindeer;
 import com.vaadin.ui.themes.Runo;
@@ -390,7 +390,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
             target.startTag("tab");
             if (!tab.isEnabled() && tab.isVisible()) {
                 target.addAttribute(
-                        TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED, true);
+                        TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED, true);
             }
 
             if (!tab.isVisible()) {
@@ -405,30 +405,30 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
             // VCaption.updateCaption(uidl)
             final Resource icon = tab.getIcon();
             if (icon != null) {
-                target.addAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON,
+                target.addAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON,
                         icon);
             }
             final String caption = tab.getCaption();
             if (caption != null && caption.length() > 0) {
                 target.addAttribute(
-                        TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION, caption);
+                        TabsheetBaseConstants.ATTRIBUTE_TAB_CAPTION, caption);
             }
             ErrorMessage tabError = tab.getComponentError();
             if (tabError != null) {
                 target.addAttribute(
-                        TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE,
+                        TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE,
                         tabError.getFormattedHtmlMessage());
             }
             final String description = tab.getDescription();
             if (description != null) {
                 target.addAttribute(
-                        TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION,
+                        TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION,
                         description);
             }
 
             final String styleName = tab.getStyleName();
             if (styleName != null && styleName.length() != 0) {
-                target.addAttribute(VTabsheet.TAB_STYLE_NAME, styleName);
+                target.addAttribute(TabsheetConstants.TAB_STYLE_NAME, styleName);
             }
 
             target.addAttribute("key", keyMapper.key(component));
index 39b7fb7473888be2bc8a0c15439439588a16473a..24cf608dd4eebeab11e15426f597f968b26f9624 100644 (file)
@@ -41,12 +41,12 @@ import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
 import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
 import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.table.TableConstants;
 import com.vaadin.terminal.KeyMapper;
 import com.vaadin.terminal.LegacyPaint;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.table.VScrollTable;
 
 /**
  * <p>
@@ -2874,9 +2874,9 @@ public class Table extends AbstractSelect implements Action.Container,
              */
             int pageBufferLastIndex = pageBufferFirstIndex
                     + pageBuffer[CELL_ITEMID].length - 1;
-            target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_FIRST,
+            target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST,
                     pageBufferFirstIndex);
-            target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_LAST,
+            target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_LAST,
                     pageBufferLastIndex);
         } else if (target.isFullRepaint() || isRowCacheInvalidated()) {
             paintRows(target, cells, actionSet);
@@ -2899,7 +2899,7 @@ public class Table extends AbstractSelect implements Action.Container,
 
         if (keyMapperReset) {
             keyMapperReset = false;
-            target.addAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET, true);
+            target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true);
         }
 
         if (dropHandler != null) {
@@ -4579,14 +4579,14 @@ public class Table extends AbstractSelect implements Action.Container,
 
     @Override
     public void addListener(ItemClickListener listener) {
-        addListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+        addListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
                 listener, ItemClickEvent.ITEM_CLICK_METHOD);
     }
 
     @Override
     public void removeListener(ItemClickListener listener) {
-        removeListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
-                listener);
+        removeListener(TableConstants.ITEM_CLICK_EVENT_ID,
+                ItemClickEvent.class, listener);
     }
 
     // Identical to AbstractCompoenentContainer.setEnabled();
@@ -4930,8 +4930,9 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The handler which should handle the header click events.
      */
     public void addListener(HeaderClickListener listener) {
-        addListener(VScrollTable.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class,
-                listener, HeaderClickEvent.HEADER_CLICK_METHOD);
+        addListener(TableConstants.HEADER_CLICK_EVENT_ID,
+                HeaderClickEvent.class, listener,
+                HeaderClickEvent.HEADER_CLICK_METHOD);
     }
 
     /**
@@ -4941,7 +4942,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to remove.
      */
     public void removeListener(HeaderClickListener listener) {
-        removeListener(VScrollTable.HEADER_CLICK_EVENT_ID,
+        removeListener(TableConstants.HEADER_CLICK_EVENT_ID,
                 HeaderClickEvent.class, listener);
     }
 
@@ -4957,8 +4958,9 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The handler which should handle the footer click events.
      */
     public void addListener(FooterClickListener listener) {
-        addListener(VScrollTable.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class,
-                listener, FooterClickEvent.FOOTER_CLICK_METHOD);
+        addListener(TableConstants.FOOTER_CLICK_EVENT_ID,
+                FooterClickEvent.class, listener,
+                FooterClickEvent.FOOTER_CLICK_METHOD);
     }
 
     /**
@@ -4968,7 +4970,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to remove.
      */
     public void removeListener(FooterClickListener listener) {
-        removeListener(VScrollTable.FOOTER_CLICK_EVENT_ID,
+        removeListener(TableConstants.FOOTER_CLICK_EVENT_ID,
                 FooterClickEvent.class, listener);
     }
 
@@ -5124,7 +5126,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to attach to the Table
      */
     public void addListener(ColumnResizeListener listener) {
-        addListener(VScrollTable.COLUMN_RESIZE_EVENT_ID,
+        addListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
                 ColumnResizeEvent.class, listener,
                 ColumnResizeEvent.COLUMN_RESIZE_METHOD);
     }
@@ -5136,7 +5138,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to remove
      */
     public void removeListener(ColumnResizeListener listener) {
-        removeListener(VScrollTable.COLUMN_RESIZE_EVENT_ID,
+        removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
                 ColumnResizeEvent.class, listener);
     }
 
@@ -5190,7 +5192,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to attach to the Table
      */
     public void addListener(ColumnReorderListener listener) {
-        addListener(VScrollTable.COLUMN_REORDER_EVENT_ID,
+        addListener(TableConstants.COLUMN_REORDER_EVENT_ID,
                 ColumnReorderEvent.class, listener, ColumnReorderEvent.METHOD);
     }
 
@@ -5201,7 +5203,7 @@ public class Table extends AbstractSelect implements Action.Container,
      *            The listener to remove
      */
     public void removeListener(ColumnReorderListener listener) {
-        removeListener(VScrollTable.COLUMN_REORDER_EVENT_ID,
+        removeListener(TableConstants.COLUMN_REORDER_EVENT_ID,
                 ColumnReorderEvent.class, listener);
     }
 
index c15975d87996076351eeb380bc7af53ba20f389b..f84146ffc3ec9299f118d1a36211b4a94dabb139 100644 (file)
@@ -39,12 +39,11 @@ import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
 import com.vaadin.event.dd.acceptcriteria.TargetDetailIs;
 import com.vaadin.shared.MouseEventDetails;
 import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.tree.TreeConstants;
 import com.vaadin.terminal.KeyMapper;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.tree.TreeConnector;
-import com.vaadin.terminal.gwt.client.ui.tree.VTree;
 import com.vaadin.tools.ReflectTools;
 
 /**
@@ -604,7 +603,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
                 if (itemStyleGenerator != null) {
                     String stylename = itemStyleGenerator.getStyle(itemId);
                     if (stylename != null) {
-                        target.addAttribute(TreeConnector.ATTRIBUTE_NODE_STYLE,
+                        target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE,
                                 stylename);
                     }
                 }
@@ -618,11 +617,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
                 }
 
                 // Adds the attributes
-                target.addAttribute(TreeConnector.ATTRIBUTE_NODE_CAPTION,
+                target.addAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION,
                         getItemCaption(itemId));
                 final Resource icon = getItemIcon(itemId);
                 if (icon != null) {
-                    target.addAttribute(TreeConnector.ATTRIBUTE_NODE_ICON,
+                    target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON,
                             getItemIcon(itemId));
                 }
                 final String key = itemIdMapper.key(itemId);
@@ -680,11 +679,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
                 final Action a = i.next();
                 target.startTag("action");
                 if (a.getCaption() != null) {
-                    target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_CAPTION,
+                    target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION,
                             a.getCaption());
                 }
                 if (a.getIcon() != null) {
-                    target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_ICON,
+                    target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON,
                             a.getIcon());
                 }
                 target.addAttribute("key", actionMapper.key(a));
@@ -1162,13 +1161,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
 
     @Override
     public void addListener(ItemClickListener listener) {
-        addListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener,
-                ItemClickEvent.ITEM_CLICK_METHOD);
+        addListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+                listener, ItemClickEvent.ITEM_CLICK_METHOD);
     }
 
     @Override
     public void removeListener(ItemClickListener listener) {
-        removeListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+        removeListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
                 listener);
     }
 
index 6132b652f718dddfafcfc985581b2183335ab00b..058a8640ce352128c6220b4f08c6807b54f09db2 100644 (file)
@@ -20,10 +20,10 @@ import com.vaadin.data.Container.ItemSetChangeEvent;
 import com.vaadin.data.util.ContainerHierarchicalWrapper;
 import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.data.util.HierarchicalContainerOrderedWrapper;
+import com.vaadin.shared.ui.treetable.TreeTableConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.treetable.TreeTableConnector;
 import com.vaadin.ui.Tree.CollapseEvent;
 import com.vaadin.ui.Tree.CollapseListener;
 import com.vaadin.ui.Tree.ExpandEvent;
@@ -472,7 +472,7 @@ public class TreeTable extends Table implements Hierarchical {
                 Object object = visibleColumns2[i];
                 if (hierarchyColumnId.equals(object)) {
                     target.addAttribute(
-                            TreeTableConnector.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
+                            TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
                             i);
                     break;
                 }
index 5539236f775ce3bb169813ba1c736acae8058d2a..c0dda4471067e1fd148b8f62af0a9c4ff755b3d1 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.ui;
 import java.util.Collection;
 
 import com.vaadin.data.Container;
+import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.twincolselect.VTwinColSelect;
 
 /**
  * Multiselect component with two lists: left side for available items and right
@@ -128,10 +128,12 @@ public class TwinColSelect extends AbstractSelect {
         String lc = getLeftColumnCaption();
         String rc = getRightColumnCaption();
         if (lc != null) {
-            target.addAttribute(VTwinColSelect.ATTRIBUTE_LEFT_CAPTION, lc);
+            target.addAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION,
+                    lc);
         }
         if (rc != null) {
-            target.addAttribute(VTwinColSelect.ATTRIBUTE_RIGHT_CAPTION, rc);
+            target.addAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION,
+                    rc);
         }
 
         super.paintContent(target);
index e413d35e6d25bae55681d9002c7f8c3744a77a9b..0d18f5d28e39921e32d89bf81998adc30c46adfa 100644 (file)
@@ -20,12 +20,12 @@ import com.vaadin.event.ShortcutAction.KeyCode;
 import com.vaadin.event.ShortcutAction.ModifierKey;
 import com.vaadin.event.ShortcutListener;
 import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.root.RootConstants;
 import com.vaadin.shared.ui.window.WindowServerRpc;
 import com.vaadin.shared.ui.window.WindowState;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
 
 /**
  * A component that represents a floating popup window that can be added to a
@@ -161,14 +161,14 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
             sizeHasChanged = true;
         }
         Integer browserHeightVar = (Integer) variables
-                .get(VRoot.BROWSER_HEIGHT_VAR);
+                .get(RootConstants.BROWSER_HEIGHT_VAR);
         if (browserHeightVar != null
                 && browserHeightVar.intValue() != browserWindowHeight) {
             browserWindowHeight = browserHeightVar.intValue();
             sizeHasChanged = true;
         }
         Integer browserWidthVar = (Integer) variables
-                .get(VRoot.BROWSER_WIDTH_VAR);
+                .get(RootConstants.BROWSER_WIDTH_VAR);
         if (browserWidthVar != null
                 && browserWidthVar.intValue() != browserWindowWidth) {
             browserWindowWidth = browserWidthVar.intValue();
diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java
new file mode 100644 (file)
index 0000000..ff87e6c
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared;
+
+public class ApplicationConstants {
+    // This indicates the whole page is generated by us (not embedded)
+    public static final String GENERATED_BODY_CLASSNAME = "v-generated-body";
+
+    public static final String APP_REQUEST_PATH = "APP/";
+
+    public static final String UIDL_REQUEST_PATH = "UIDL/";
+
+    public static final String CONNECTOR_RESOURCE_PREFIX = APP_REQUEST_PATH
+            + "CONNECTOR";
+
+    public static final String APP_PROTOCOL_PREFIX = "app://";
+    public static final String CONNECTOR_PROTOCOL_PREFIX = "connector://";
+    public static final String UIDL_SECURITY_TOKEN_ID = "Vaadin-Security-Key";
+    /**
+     * Name of the parameter used to transmit root ids back and forth
+     */
+    public static final String ROOT_ID_PARAMETER = "rootId";
+
+    public static final String PARAM_UNLOADBURST = "onunloadburst";
+
+    @Deprecated
+    public static final String UPDATE_VARIABLE_INTERFACE = "v";
+    @Deprecated
+    public static final String UPDATE_VARIABLE_METHOD = "v";
+
+    public static final String PORTLET_RESOUCE_URL_BASE = "portletAppURLBase";
+
+    public static final String V_RESOURCE_PATH = "v-resourcePath";
+
+}
index 616d37dcd06d337982b0bf84db5125a5de11a1a4..d5968988d62ce4fa8caca6ca432fb659387b55e8 100644 (file)
@@ -6,4 +6,7 @@ package com.vaadin.shared;
 public interface EventId {
     public static final String BLUR = "blur";
     public static final String FOCUS = "focus";
+    public static final String CLICK_EVENT_IDENTIFIER = "click";
+    public static final String LAYOUT_CLICK_EVENT_IDENTIFIER = "lClick";
+
 }
diff --git a/shared/src/com/vaadin/shared/JsonConstants.java b/shared/src/com/vaadin/shared/JsonConstants.java
new file mode 100644 (file)
index 0000000..afa831f
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared;
+
+public class JsonConstants {
+    public static final String VTYPE_CONNECTOR = "c";
+    public static final String VTYPE_BOOLEAN = "b";
+    public static final String VTYPE_DOUBLE = "d";
+    public static final String VTYPE_FLOAT = "f";
+    public static final String VTYPE_LONG = "l";
+    public static final String VTYPE_INTEGER = "i";
+    public static final String VTYPE_STRING = "s";
+    public static final String VTYPE_ARRAY = "a";
+    public static final String VTYPE_STRINGARRAY = "S";
+    public static final String VTYPE_MAP = "m";
+    public static final String VTYPE_LIST = "L";
+    public static final String VTYPE_SET = "q";
+    public static final String VTYPE_NULL = "n";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/combobox/ComboBoxConstants.java b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxConstants.java
new file mode 100644 (file)
index 0000000..fe33499
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.combobox;
+
+@Deprecated
+public class ComboBoxConstants {
+    @Deprecated
+    public static final String ATTR_INPUTPROMPT = "prompt";
+    @Deprecated
+    public static final String ATTR_NO_TEXT_INPUT = "noInput";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/datefield/DateFieldConstants.java b/shared/src/com/vaadin/shared/ui/datefield/DateFieldConstants.java
new file mode 100644 (file)
index 0000000..ffb9ffb
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.datefield;
+
+@Deprecated
+public class DateFieldConstants {
+
+    @Deprecated
+    public static final String ATTR_WEEK_NUMBERS = "wn";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java b/shared/src/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java
new file mode 100644 (file)
index 0000000..a7f2086
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.draganddropwrapper;
+
+@Deprecated
+public class DragAndDropWrapperConstants {
+
+    @Deprecated
+    public static final String HTML5_DATA_FLAVORS = "html5-data-flavors";
+    @Deprecated
+    public static final String DRAG_START_MODE = "dragStartMode";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/embedded/EmbeddedConstants.java b/shared/src/com/vaadin/shared/ui/embedded/EmbeddedConstants.java
new file mode 100644 (file)
index 0000000..5163395
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.embedded;
+
+@Deprecated
+public class EmbeddedConstants {
+    @Deprecated
+    public static final String ALTERNATE_TEXT = "alt";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/menubar/MenuBarConstants.java b/shared/src/com/vaadin/shared/ui/menubar/MenuBarConstants.java
new file mode 100644 (file)
index 0000000..be4e26f
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.menubar;
+
+@Deprecated
+public class MenuBarConstants {
+    @Deprecated
+    public static final String ATTRIBUTE_CHECKED = "checked";
+    @Deprecated
+    public static final String ATTRIBUTE_ITEM_DESCRIPTION = "description";
+    @Deprecated
+    public static final String ATTRIBUTE_ITEM_ICON = "icon";
+    @Deprecated
+    public static final String ATTRIBUTE_ITEM_DISABLED = "disabled";
+    @Deprecated
+    public static final String ATTRIBUTE_ITEM_STYLE = "style";
+    @Deprecated
+    public static final String HTML_CONTENT_ALLOWED = "usehtml";
+    @Deprecated
+    public static final String OPEN_ROOT_MENU_ON_HOWER = "ormoh";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java
new file mode 100644 (file)
index 0000000..76084ba
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.optiongroup;
+
+public class OptionGroupConstants {
+    public static final String HTML_CONTENT_ALLOWED = "usehtml";
+    public static final String ATTRIBUTE_OPTION_DISABLED = "disabled";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/root/RootConstants.java b/shared/src/com/vaadin/shared/ui/root/RootConstants.java
new file mode 100644 (file)
index 0000000..6efb04d
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.root;
+
+public class RootConstants {
+    /**
+     * Attribute name for the lazy resize setting .
+     */
+    @Deprecated
+    public static final String RESIZE_LAZY = "rL";
+    @Deprecated
+    public static final String BROWSER_HEIGHT_VAR = "browserHeight";
+
+    @Deprecated
+    public static final String BROWSER_WIDTH_VAR = "browserWidth";
+    @Deprecated
+    public static final String NOTIFICATION_HTML_CONTENT_NOT_ALLOWED = "useplain";
+
+    @Deprecated
+    public static final String FRAGMENT_VARIABLE = "fragment";
+
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_STYLE = "style";
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_CAPTION = "caption";
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_MESSAGE = "message";
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_ICON = "icon";
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_POSITION = "position";
+    @Deprecated
+    public static final String ATTRIBUTE_NOTIFICATION_DELAY = "delay";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/table/TableConstants.java b/shared/src/com/vaadin/shared/ui/table/TableConstants.java
new file mode 100644 (file)
index 0000000..0af6161
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.table;
+
+public class TableConstants {
+    public static final String ITEM_CLICK_EVENT_ID = "itemClick";
+    public static final String HEADER_CLICK_EVENT_ID = "handleHeaderClick";
+    public static final String FOOTER_CLICK_EVENT_ID = "handleFooterClick";
+    public static final String COLUMN_RESIZE_EVENT_ID = "columnResize";
+    public static final String COLUMN_REORDER_EVENT_ID = "columnReorder";
+
+    @Deprecated
+    public static final String ATTRIBUTE_PAGEBUFFER_FIRST = "pb-ft";
+    @Deprecated
+    public static final String ATTRIBUTE_PAGEBUFFER_LAST = "pb-l";
+    /**
+     * Tell the client that old keys are no longer valid because the server has
+     * cleared its key map.
+     */
+    @Deprecated
+    public static final String ATTRIBUTE_KEY_MAPPER_RESET = "clearKeyMap";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java
new file mode 100644 (file)
index 0000000..5e07ca6
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.tabsheet;
+
+@Deprecated
+public class TabsheetBaseConstants {
+    @Deprecated
+    public static final String ATTRIBUTE_TAB_DISABLED = "disabled";
+    @Deprecated
+    public static final String ATTRIBUTE_TAB_DESCRIPTION = "description";
+    @Deprecated
+    public static final String ATTRIBUTE_TAB_ERROR_MESSAGE = "error";
+    @Deprecated
+    public static final String ATTRIBUTE_TAB_CAPTION = "caption";
+    @Deprecated
+    public static final String ATTRIBUTE_TAB_ICON = "icon";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java
new file mode 100644 (file)
index 0000000..f92ad70
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.tabsheet;
+
+@Deprecated
+public class TabsheetConstants {
+    @Deprecated
+    public static final String TAB_STYLE_NAME = "tabstyle";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/textfield/TextFieldConstants.java b/shared/src/com/vaadin/shared/ui/textfield/TextFieldConstants.java
new file mode 100644 (file)
index 0000000..6a0856f
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.textfield;
+
+public class TextFieldConstants {
+    public static final String VAR_CUR_TEXT = "curText";
+    public static final String ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS = "nvc";
+    public static final String ATTR_TEXTCHANGE_TIMEOUT = "iet";
+    public static final String VAR_CURSOR = "c";
+    public static final String ATTR_TEXTCHANGE_EVENTMODE = "iem";
+    public static final String TEXTCHANGE_MODE_EAGER = "EAGER";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/tree/TreeConstants.java b/shared/src/com/vaadin/shared/ui/tree/TreeConstants.java
new file mode 100644 (file)
index 0000000..21b61e7
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.tree;
+
+@Deprecated
+public class TreeConstants {
+
+    @Deprecated
+    public static final String ATTRIBUTE_NODE_STYLE = "style";
+    @Deprecated
+    public static final String ATTRIBUTE_NODE_CAPTION = "caption";
+    @Deprecated
+    public static final String ATTRIBUTE_NODE_ICON = "icon";
+
+    @Deprecated
+    public static final String ATTRIBUTE_ACTION_CAPTION = "caption";
+    @Deprecated
+    public static final String ATTRIBUTE_ACTION_ICON = ATTRIBUTE_NODE_ICON;
+
+    public static final String ITEM_CLICK_EVENT_ID = "itemClick";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/treetable/TreeTableConstants.java b/shared/src/com/vaadin/shared/ui/treetable/TreeTableConstants.java
new file mode 100644 (file)
index 0000000..b43594b
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.treetable;
+
+@Deprecated
+public class TreeTableConstants {
+    @Deprecated
+    public static final String ATTRIBUTE_HIERARCHY_COLUMN_INDEX = "hci";
+
+}
diff --git a/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java
new file mode 100644 (file)
index 0000000..cba5b3a
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.twincolselect;
+
+@Deprecated
+public class TwinColSelectConstants {
+    @Deprecated
+    public static final String ATTRIBUTE_LEFT_CAPTION = "lc";
+    @Deprecated
+    public static final String ATTRIBUTE_RIGHT_CAPTION = "rc";
+
+}