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
}
public String getPortletResourceUrl() {
- return getJsoConfiguration(id)
- .getConfigString(PORTLET_RESOUCE_URL_BASE);
+ return getJsoConfiguration(id).getConfigString(
+ ApplicationConstants.PORTLET_RESOUCE_URL_BASE);
}
public String getRootPanelId() {
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;
* 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";
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;
/**
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);
} 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
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");
// 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);
}
/**
}
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());
}
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
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;
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;
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];
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;
*/
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.
*/
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;
}
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,
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;
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,
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;
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 {
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() {
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;
// 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
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 = "";
}
// 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;
@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;
}
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;
// 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;
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";
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;
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();
*/
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";
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;
public class EmbeddedConnector extends AbstractComponentConnector implements
Paintable {
- public static final String ALTERNATE_TEXT = "alt";
-
EmbeddedServerRpc rpc;
@Override
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) {
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 + "'");
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;
// 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
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;
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.
}
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();
}
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);
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);
while (!itr.hasNext() && !iteratorStack.empty()) {
boolean hasCheckableItem = false;
- for (CustomMenuItem menuItem : currentMenu.getItems()) {
+ for (VMenuBar.CustomMenuItem menuItem : currentMenu.getItems()) {
hasCheckableItem = hasCheckableItem
|| menuItem.isCheckable();
}
// 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();
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;
// 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;
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);
}
}
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 {
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.
*/
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 />");
}
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);
}
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;
@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);
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;
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;
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(),
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;
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
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);
}
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);
}
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;
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;
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.
*
boolean resizeLazy = false;
- /**
- * Attribute name for the lazy resize setting .
- */
- public static final String RESIZE_LAZY = "rL";
-
private HandlerRegistration historyHandlerRegistration;
private TouchScrollHandler touchScrollHandler;
// 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);
}
}
};
*/
public boolean isEmbedded() {
return !getElement().getOwnerDocument().getBody().getClassName()
- .contains(ApplicationConnection.GENERATED_BODY_CLASSNAME);
+ .contains(ApplicationConstants.GENERATED_BODY_CLASSNAME);
}
/**
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)
}
touchScrollHandler.addElement(getElement());
}
+
}
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;
// 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;
* 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;
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;
}
}
- /**
- * 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;
/**
}
}
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();
}
}
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;
*/
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",
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;
*/
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",
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;
}
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
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;
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;
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);
}
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) {
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;
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)) {
}
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);
}
// 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"));
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;
/**
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;
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
* 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);
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;
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.
*/
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;
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
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;
}
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;
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
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);
}
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);
} 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");
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) {
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;
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
*/
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);
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;
@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) {
}
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) {
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;
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;
}
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);
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;
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;
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;
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;
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");
}
if (fragment != null) {
- target.addAttribute(VRoot.FRAGMENT_VARIABLE, fragment);
+ target.addAttribute(RootConstants.FRAGMENT_VARIABLE, fragment);
}
}
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;
// key).
if (requestType == RequestType.UIDL
&& request.getParameterMap().containsKey(
- ApplicationConnection.PARAM_UNLOADBURST)
+ ApplicationConstants.PARAM_UNLOADBURST)
&& request.getContentLength() < 1
&& getExistingApplication(request, false) == null) {
redirectToApplication(request, response);
}
private boolean isOnUnloadRequest(HttpServletRequest request) {
- return request.getParameter(ApplicationConnection.PARAM_UNLOADBURST) != null;
+ return request.getParameter(ApplicationConstants.PARAM_UNLOADBURST) != null;
}
/**
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;
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;
* 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!
*/
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 "";
}
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;
}
}
- return ApplicationConnection.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
+ return ApplicationConstants.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
}
/**
// 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(
streamVariableToSeckey.put(value, seckey);
}
- return ApplicationConnection.APP_PROTOCOL_PREFIX
+ return ApplicationConstants.APP_PROTOCOL_PREFIX
+ ServletPortletHelper.UPLOAD_URL_PREFIX + key + "/" + seckey;
}
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);
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()
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
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
// 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;
}
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 {
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,
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) {
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;
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) {
}
// 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);
}
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);
}
if (encodedTransportType.equals(transportType)) {
return true;
}
- if (encodedTransportType.equals(JsonEncoder.VTYPE_NULL)) {
+ if (encodedTransportType.equals(JsonConstants.VTYPE_NULL)) {
return true;
}
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);
}
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;
/**
.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", "");
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;
/*
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);
}
}
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.
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;
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
@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);
}
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
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
@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);
}
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;
/**
}
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);
}
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 {
}
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) {
/*
* 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);
}
}
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
* 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;
}
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
@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);
}
}
import java.util.logging.Logger;
import com.vaadin.terminal.AbstractClientConnector;
-import com.vaadin.terminal.gwt.client.ServerConnector;
import com.vaadin.terminal.gwt.server.ClientConnector;
/**
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.
@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);
}
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>
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
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,
@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);
}
}
}
- target.addAttribute(VDragAndDropWrapper.HTML5_DATA_FLAVORS,
+ target.addAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS,
html5DataFlavors);
}
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.
target.addAttribute("archive", archive);
}
if (altText != null && !"".equals(altText)) {
- target.addAttribute(EmbeddedConnector.ALTERNATE_TEXT, altText);
+ target.addAttribute(EmbeddedConstants.ALTERNATE_TEXT, altText);
}
// Params
* 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);
}
/**
* 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
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;
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.
@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);
}
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
+ " 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;"
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>
/** 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");
target.addAttribute("id", item.getId());
if (item.getStyleName() != null) {
- target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_STYLE,
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE,
item.getStyleName());
}
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()) {
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.
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);
}
throws PaintException {
super.paintItem(target, itemId);
if (!isItemEnabled(itemId)) {
- target.addAttribute(VOptionGroup.ATTRIBUTE_OPTION_DISABLED, true);
+ target.addAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED,
+ true);
}
}
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;
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;
/**
* 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);
}
/**
* 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);
}
/**
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;
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;
/**
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);
}
if (isResizeLazy()) {
- target.addAttribute(VRoot.RESIZE_LAZY, true);
+ target.addAttribute(RootConstants.RESIZE_LAZY, true);
}
}
@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
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);
}
* 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);
}
* 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
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;
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;
target.startTag("tab");
if (!tab.isEnabled() && tab.isVisible()) {
target.addAttribute(
- TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED, true);
+ TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED, true);
}
if (!tab.isVisible()) {
// 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));
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>
*/
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);
if (keyMapperReset) {
keyMapperReset = false;
- target.addAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET, true);
+ target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true);
}
if (dropHandler != null) {
@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();
* 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);
}
/**
* The listener to remove.
*/
public void removeListener(HeaderClickListener listener) {
- removeListener(VScrollTable.HEADER_CLICK_EVENT_ID,
+ removeListener(TableConstants.HEADER_CLICK_EVENT_ID,
HeaderClickEvent.class, listener);
}
* 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);
}
/**
* The listener to remove.
*/
public void removeListener(FooterClickListener listener) {
- removeListener(VScrollTable.FOOTER_CLICK_EVENT_ID,
+ removeListener(TableConstants.FOOTER_CLICK_EVENT_ID,
FooterClickEvent.class, listener);
}
* 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);
}
* The listener to remove
*/
public void removeListener(ColumnResizeListener listener) {
- removeListener(VScrollTable.COLUMN_RESIZE_EVENT_ID,
+ removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
ColumnResizeEvent.class, listener);
}
* 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);
}
* The listener to remove
*/
public void removeListener(ColumnReorderListener listener) {
- removeListener(VScrollTable.COLUMN_REORDER_EVENT_ID,
+ removeListener(TableConstants.COLUMN_REORDER_EVENT_ID,
ColumnReorderEvent.class, listener);
}
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;
/**
if (itemStyleGenerator != null) {
String stylename = itemStyleGenerator.getStyle(itemId);
if (stylename != null) {
- target.addAttribute(TreeConnector.ATTRIBUTE_NODE_STYLE,
+ target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE,
stylename);
}
}
}
// 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);
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));
@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);
}
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;
Object object = visibleColumns2[i];
if (hierarchyColumnId.equals(object)) {
target.addAttribute(
- TreeTableConnector.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
+ TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
i);
break;
}
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
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);
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
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();
--- /dev/null
+/*
+@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";
+
+}
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";
+
}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.datefield;
+
+@Deprecated
+public class DateFieldConstants {
+
+ @Deprecated
+ public static final String ATTR_WEEK_NUMBERS = "wn";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.embedded;
+
+@Deprecated
+public class EmbeddedConstants {
+ @Deprecated
+ public static final String ALTERNATE_TEXT = "alt";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.tabsheet;
+
+@Deprecated
+public class TabsheetConstants {
+ @Deprecated
+ public static final String TAB_STYLE_NAME = "tabstyle";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@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";
+
+}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.shared.ui.treetable;
+
+@Deprecated
+public class TreeTableConstants {
+ @Deprecated
+ public static final String ATTRIBUTE_HIERARCHY_COLUMN_INDEX = "hci";
+
+}
--- /dev/null
+/*
+@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";
+
+}