diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-13 19:13:24 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-13 19:18:50 +0300 |
commit | acf099b41fe1f983d416e598b5b49eaea9f35c66 (patch) | |
tree | da664e675e639a074b6d8abde3af4d7a7b52055a /server/src/com/vaadin/ui | |
parent | e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (diff) | |
download | vaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.tar.gz vaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.zip |
Eliminated dependencies from server to client (#9279)
Diffstat (limited to 'server/src/com/vaadin/ui')
23 files changed, 122 insertions, 114 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index 1c84ca2865..687f7452c5 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -13,11 +13,11 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent; import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.event.LayoutEvents.LayoutClickNotifier; import com.vaadin.shared.Connector; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutServerRpc; import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState; import com.vaadin.terminal.Sizeable; -import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; /** * AbsoluteLayout is a layout implementation that mimics html absolute @@ -618,14 +618,14 @@ public class AbsoluteLayout extends AbstractLayout implements @Override public void addListener(LayoutClickListener listener) { - addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener, LayoutClickListener.clickMethod); } @Override public void removeListener(LayoutClickListener listener) { - removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java index 5ec80573ab..12f1f83968 100644 --- a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java +++ b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java @@ -5,8 +5,6 @@ package com.vaadin.ui; import com.vaadin.shared.ui.JavaScriptComponentState; import com.vaadin.terminal.JavaScriptCallbackHelper; -import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.ui.JavaScriptWidget; /** * Base class for Components with all client-side logic implemented using diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index 0581d0a279..1a3b9407e8 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -11,12 +11,12 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent; import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.event.LayoutEvents.LayoutClickNotifier; import com.vaadin.shared.Connector; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc; import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState; import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData; import com.vaadin.terminal.Sizeable; -import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; @SuppressWarnings("serial") public abstract class AbstractOrderedLayout extends AbstractLayout implements @@ -345,14 +345,14 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements @Override public void addListener(LayoutClickListener listener) { - addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener, LayoutClickListener.clickMethod); } @Override public void removeListener(LayoutClickListener listener) { - removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index 90dc38ff65..3b51e6099b 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -10,12 +10,12 @@ import java.util.Iterator; import com.vaadin.event.ComponentEventListener; import com.vaadin.event.MouseEvents.ClickEvent; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelRpc; import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState; import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState; import com.vaadin.terminal.Sizeable; -import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.tools.ReflectTools; /** @@ -500,13 +500,12 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { } public void addListener(SplitterClickListener listener) { - addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, - SplitterClickEvent.class, listener, - SplitterClickListener.clickMethod); + addListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class, + listener, SplitterClickListener.clickMethod); } public void removeListener(SplitterClickListener listener) { - removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, + removeListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java index 2326c07d97..2ded12d18d 100644 --- a/server/src/com/vaadin/ui/AbstractTextField.java +++ b/server/src/com/vaadin/ui/AbstractTextField.java @@ -16,10 +16,10 @@ import com.vaadin.event.FieldEvents.TextChangeEvent; import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.event.FieldEvents.TextChangeNotifier; import com.vaadin.shared.ui.textfield.AbstractTextFieldState; +import com.vaadin.shared.ui.textfield.TextFieldConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.textfield.VTextField; public abstract class AbstractTextField extends AbstractField<String> implements BlurNotifier, FocusNotifier, TextChangeNotifier, Vaadin6Component { @@ -105,9 +105,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements } if (hasListeners(TextChangeEvent.class)) { - target.addAttribute(VTextField.ATTR_TEXTCHANGE_EVENTMODE, + target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE, getTextChangeEventMode().toString()); - target.addAttribute(VTextField.ATTR_TEXTCHANGE_TIMEOUT, + target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT, getTextChangeTimeout()); if (lastKnownTextContent != null) { /* @@ -118,7 +118,8 @@ public abstract class AbstractTextField extends AbstractField<String> implements * the actual value, depending on its state. */ target.addAttribute( - VTextField.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS, true); + TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS, + true); } } @@ -130,12 +131,13 @@ public abstract class AbstractTextField extends AbstractField<String> implements try { - if (variables.containsKey(VTextField.VAR_CURSOR)) { - Integer object = (Integer) variables.get(VTextField.VAR_CURSOR); + if (variables.containsKey(TextFieldConstants.VAR_CURSOR)) { + Integer object = (Integer) variables + .get(TextFieldConstants.VAR_CURSOR); lastKnownCursorPosition = object.intValue(); } - if (variables.containsKey(VTextField.VAR_CUR_TEXT)) { + if (variables.containsKey(TextFieldConstants.VAR_CUR_TEXT)) { /* * NOTE, we might want to develop this further so that on a * value change event the whole text content don't need to be @@ -439,7 +441,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements * some sort of diffs instead of always sending the whole text content. * Also on value change events we could use the mechanism. */ - String object = (String) variables.get(VTextField.VAR_CUR_TEXT); + String object = (String) variables.get(TextFieldConstants.VAR_CUR_TEXT); lastKnownTextContent = object; textChangeEventPending = true; } diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java index 6286dad124..a4dcdc152d 100644 --- a/server/src/com/vaadin/ui/ComboBox.java +++ b/server/src/com/vaadin/ui/ComboBox.java @@ -7,9 +7,9 @@ package com.vaadin.ui; import java.util.Collection; import com.vaadin.data.Container; +import com.vaadin.shared.ui.combobox.ComboBoxConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect; /** * A filtering dropdown single-select. Suitable for newItemsAllowed, but it's @@ -75,12 +75,12 @@ public class ComboBox extends Select { @Override public void paintContent(PaintTarget target) throws PaintException { if (inputPrompt != null) { - target.addAttribute("prompt", inputPrompt); + target.addAttribute(ComboBoxConstants.ATTR_INPUTPROMPT, inputPrompt); } super.paintContent(target); if (!textInputAllowed) { - target.addAttribute(VFilterSelect.ATTR_NO_TEXT_INPUT, true); + target.addAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT, true); } } diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index e3d1bf86db..0eeaa0d9e1 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -13,7 +13,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import com.vaadin.terminal.AbstractClientConnector; -import com.vaadin.terminal.gwt.client.ServerConnector; import com.vaadin.terminal.gwt.server.ClientConnector; /** diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java index 356f0a3843..24f12e8403 100644 --- a/server/src/com/vaadin/ui/CssLayout.java +++ b/server/src/com/vaadin/ui/CssLayout.java @@ -10,10 +10,10 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent; import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.event.LayoutEvents.LayoutClickNotifier; import com.vaadin.shared.Connector; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.csslayout.CssLayoutServerRpc; import com.vaadin.shared.ui.csslayout.CssLayoutState; -import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; /** * CssLayout is a layout component that can be used in browser environment only. @@ -270,14 +270,14 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier { @Override public void addListener(LayoutClickListener listener) { - addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener, LayoutClickListener.clickMethod); } @Override public void removeListener(LayoutClickListener listener) { - removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java index d0a22f3c29..ff597f8699 100644 --- a/server/src/com/vaadin/ui/DateField.java +++ b/server/src/com/vaadin/ui/DateField.java @@ -24,10 +24,10 @@ import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; +import com.vaadin.shared.ui.datefield.DateFieldConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.datefield.VDateField; /** * <p> @@ -303,7 +303,8 @@ public class DateField extends AbstractField<Date> implements target.addAttribute("strict", true); } - target.addAttribute(VDateField.WEEK_NUMBERS, isShowISOWeekNumbers()); + target.addAttribute(DateFieldConstants.ATTR_WEEK_NUMBERS, + isShowISOWeekNumbers()); target.addAttribute("parsable", uiHasValidDateString); /* * TODO communicate back the invalid date string? E.g. returning back to diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 67229a45fe..b5bd3097b2 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -20,11 +20,11 @@ import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.HorizontalDropLocation; import com.vaadin.shared.ui.dd.VerticalDropLocation; +import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.StreamVariable; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.draganddropwrapper.VDragAndDropWrapper; @SuppressWarnings("serial") public class DragAndDropWrapper extends CustomComponent implements DropTarget, @@ -221,7 +221,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, @Override public void paintContent(PaintTarget target) throws PaintException { - target.addAttribute(VDragAndDropWrapper.DRAG_START_MODE, + target.addAttribute(DragAndDropWrapperConstants.DRAG_START_MODE, dragStartMode.ordinal()); if (getDropHandler() != null) { getDropHandler().getAcceptCriterion().paint(target); @@ -245,7 +245,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, } } } - target.addAttribute(VDragAndDropWrapper.HTML5_DATA_FLAVORS, + target.addAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS, html5DataFlavors); } diff --git a/server/src/com/vaadin/ui/Embedded.java b/server/src/com/vaadin/ui/Embedded.java index 6088c5aa66..ffa47f60b8 100644 --- a/server/src/com/vaadin/ui/Embedded.java +++ b/server/src/com/vaadin/ui/Embedded.java @@ -10,14 +10,14 @@ import java.util.Map; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.event.MouseEvents.ClickListener; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; +import com.vaadin.shared.ui.embedded.EmbeddedConstants; import com.vaadin.shared.ui.embedded.EmbeddedServerRpc; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; -import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedConnector; /** * Component for embedding external objects. @@ -158,7 +158,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component { target.addAttribute("archive", archive); } if (altText != null && !"".equals(altText)) { - target.addAttribute(EmbeddedConnector.ALTERNATE_TEXT, altText); + target.addAttribute(EmbeddedConstants.ALTERNATE_TEXT, altText); } // Params @@ -507,8 +507,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component { * The listener to add */ public void addListener(ClickListener listener) { - addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class, - listener, ClickListener.clickMethod); + addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener, + ClickListener.clickMethod); } /** @@ -519,8 +519,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component { * The listener to remove */ public void removeListener(ClickListener listener) { - removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, - ClickEvent.class, listener); + removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, + listener); } @Override diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java index 2391a9cd3a..49d4c26936 100644 --- a/server/src/com/vaadin/ui/GridLayout.java +++ b/server/src/com/vaadin/ui/GridLayout.java @@ -16,6 +16,7 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent; import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.event.LayoutEvents.LayoutClickNotifier; import com.vaadin.shared.Connector; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.gridlayout.GridLayoutServerRpc; import com.vaadin.shared.ui.gridlayout.GridLayoutState; @@ -23,7 +24,6 @@ import com.vaadin.terminal.LegacyPaint; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; /** * A layout where the components are laid out on a grid using cell coordinates. @@ -1401,14 +1401,14 @@ public class GridLayout extends AbstractLayout implements @Override public void addListener(LayoutClickListener listener) { - addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener, LayoutClickListener.clickMethod); } @Override public void removeListener(LayoutClickListener listener) { - removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER, + removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER, LayoutClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/LoginForm.java b/server/src/com/vaadin/ui/LoginForm.java index db7e5f9dd9..9a217f0c69 100644 --- a/server/src/com/vaadin/ui/LoginForm.java +++ b/server/src/com/vaadin/ui/LoginForm.java @@ -13,12 +13,12 @@ import java.util.Iterator; import java.util.Map; import com.vaadin.Application; +import com.vaadin.shared.ApplicationConstants; import com.vaadin.terminal.ApplicationResource; import com.vaadin.terminal.DownloadStream; import com.vaadin.terminal.RequestHandler; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.WrappedResponse; -import com.vaadin.terminal.gwt.client.ApplicationConnection; /** * LoginForm is a Vaadin component to handle common problem among Ajax @@ -156,7 +156,7 @@ public class LoginForm extends CustomComponent { + " if (keycode == 13) {document.forms[0].submit();} } \n" + "</script>" + "</head><body onload='setTarget();' style='margin:0;padding:0; background:transparent;' class=\"" - + ApplicationConnection.GENERATED_BODY_CLASSNAME + + ApplicationConstants.GENERATED_BODY_CLASSNAME + "\">" + "<div class='v-app v-app-loginpage' style=\"background:transparent;\">" + "<iframe name='logintarget' style='width:0;height:0;" diff --git a/server/src/com/vaadin/ui/MenuBar.java b/server/src/com/vaadin/ui/MenuBar.java index 5b5dc13e20..abf71858ae 100644 --- a/server/src/com/vaadin/ui/MenuBar.java +++ b/server/src/com/vaadin/ui/MenuBar.java @@ -10,11 +10,11 @@ import java.util.List; import java.util.Map; import java.util.Stack; +import com.vaadin.shared.ui.menubar.MenuBarConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar; /** * <p> @@ -41,10 +41,11 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { /** Paint (serialise) the component for the client. */ @Override public void paintContent(PaintTarget target) throws PaintException { - target.addAttribute(VMenuBar.OPEN_ROOT_MENU_ON_HOWER, openRootOnHover); + target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER, + openRootOnHover); if (isHtmlContentAllowed()) { - target.addAttribute(VMenuBar.HTML_CONTENT_ALLOWED, true); + target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED, true); } target.startTag("options"); @@ -80,7 +81,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { target.addAttribute("id", item.getId()); if (item.getStyleName() != null) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_STYLE, + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE, item.getStyleName()); } @@ -96,22 +97,24 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component { Resource icon = item.getIcon(); if (icon != null) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_ICON, icon); + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon); } if (!item.isEnabled()) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DISABLED, true); + target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DISABLED, + true); } String description = item.getDescription(); if (description != null && description.length() > 0) { - target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DESCRIPTION, + target.addAttribute( + MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION, description); } if (item.isCheckable()) { // if the "checked" attribute is present (either true or false), // the item is checkable - target.addAttribute(VMenuBar.ATTRIBUTE_CHECKED, + target.addAttribute(MenuBarConstants.ATTRIBUTE_CHECKED, item.isChecked()); } if (item.hasChildren()) { diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java index e3bcdd61b7..25a6e5132a 100644 --- a/server/src/com/vaadin/ui/OptionGroup.java +++ b/server/src/com/vaadin/ui/OptionGroup.java @@ -15,9 +15,9 @@ import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; +import com.vaadin.shared.ui.optiongroup.OptionGroupConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroup; /** * Configures select to be used as an option group. @@ -49,7 +49,7 @@ public class OptionGroup extends AbstractSelect implements public void paintContent(PaintTarget target) throws PaintException { target.addAttribute("type", "optiongroup"); if (isHtmlContentAllowed()) { - target.addAttribute(VOptionGroup.HTML_CONTENT_ALLOWED, true); + target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED, true); } super.paintContent(target); } @@ -59,7 +59,8 @@ public class OptionGroup extends AbstractSelect implements throws PaintException { super.paintItem(target, itemId); if (!isItemEnabled(itemId)) { - target.addAttribute(VOptionGroup.ATTRIBUTE_OPTION_DISABLED, true); + target.addAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED, + true); } } diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java index 3c26b73f09..fab8d57c02 100644 --- a/server/src/com/vaadin/ui/Panel.java +++ b/server/src/com/vaadin/ui/Panel.java @@ -13,6 +13,7 @@ import com.vaadin.event.Action.Handler; import com.vaadin.event.ActionManager; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.event.MouseEvents.ClickListener; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.panel.PanelServerRpc; import com.vaadin.shared.ui.panel.PanelState; @@ -20,7 +21,6 @@ import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Scrollable; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.ui.Component.Focusable; /** @@ -425,8 +425,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable, * The listener to add */ public void addListener(ClickListener listener) { - addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class, - listener, ClickListener.clickMethod); + addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener, + ClickListener.clickMethod); } /** @@ -437,8 +437,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable, * The listener to remove */ public void removeListener(ClickListener listener) { - removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, - ClickEvent.class, listener); + removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, + listener); } /** diff --git a/server/src/com/vaadin/ui/Root.java b/server/src/com/vaadin/ui/Root.java index bd4842632b..c5840a61de 100644 --- a/server/src/com/vaadin/ui/Root.java +++ b/server/src/com/vaadin/ui/Root.java @@ -20,7 +20,9 @@ import com.vaadin.event.Action.Handler; import com.vaadin.event.ActionManager; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.event.MouseEvents.ClickListener; +import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; +import com.vaadin.shared.ui.root.RootConstants; import com.vaadin.shared.ui.root.RootServerRpc; import com.vaadin.shared.ui.root.RootState; import com.vaadin.terminal.Page; @@ -32,7 +34,6 @@ import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.WrappedRequest.BrowserDetails; -import com.vaadin.terminal.gwt.client.ui.root.VRoot; import com.vaadin.ui.Window.CloseListener; /** @@ -412,8 +413,6 @@ public abstract class Root extends AbstractComponentContainer implements private static final ThreadLocal<Root> currentRoot = new ThreadLocal<Root>(); /** Identifies the click event */ - private static final String CLICK_EVENT_ID = VRoot.CLICK_EVENT_ID; - private ConnectorTracker connectorTracker = new ConnectorTracker(this); private Page page = new Page(this); @@ -537,7 +536,7 @@ public abstract class Root extends AbstractComponentContainer implements } if (isResizeLazy()) { - target.addAttribute(VRoot.RESIZE_LAZY, true); + target.addAttribute(RootConstants.RESIZE_LAZY, true); } } @@ -556,8 +555,9 @@ public abstract class Root extends AbstractComponentContainer implements @Override @SuppressWarnings("unchecked") public void changeVariables(Object source, Map<String, Object> variables) { - if (variables.containsKey(CLICK_EVENT_ID)) { - fireClick((Map<String, Object>) variables.get(CLICK_EVENT_ID)); + if (variables.containsKey(EventId.CLICK_EVENT_IDENTIFIER)) { + fireClick((Map<String, Object>) variables + .get(EventId.CLICK_EVENT_IDENTIFIER)); } // Actions @@ -565,8 +565,9 @@ public abstract class Root extends AbstractComponentContainer implements actionManager.handleActions(variables, this); } - if (variables.containsKey(VRoot.FRAGMENT_VARIABLE)) { - String fragment = (String) variables.get(VRoot.FRAGMENT_VARIABLE); + if (variables.containsKey(RootConstants.FRAGMENT_VARIABLE)) { + String fragment = (String) variables + .get(RootConstants.FRAGMENT_VARIABLE); getPage().setFragment(fragment, true); } @@ -1026,7 +1027,7 @@ public abstract class Root extends AbstractComponentContainer implements * The listener to add */ public void addListener(ClickListener listener) { - addListener(CLICK_EVENT_ID, ClickEvent.class, listener, + addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener, ClickListener.clickMethod); } @@ -1038,7 +1039,8 @@ public abstract class Root extends AbstractComponentContainer implements * The listener to remove */ public void removeListener(ClickListener listener) { - removeListener(CLICK_EVENT_ID, ClickEvent.class, listener); + removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, + listener); } @Override diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index c52e9394c0..f6db9f9b91 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -18,6 +18,8 @@ import com.vaadin.event.FieldEvents.BlurNotifier; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; import com.vaadin.event.FieldEvents.FocusNotifier; +import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants; +import com.vaadin.shared.ui.tabsheet.TabsheetConstants; import com.vaadin.terminal.ErrorMessage; import com.vaadin.terminal.KeyMapper; import com.vaadin.terminal.LegacyPaint; @@ -25,8 +27,6 @@ import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.tabsheet.TabsheetBaseConnector; -import com.vaadin.terminal.gwt.client.ui.tabsheet.VTabsheet; import com.vaadin.ui.Component.Focusable; import com.vaadin.ui.themes.Reindeer; import com.vaadin.ui.themes.Runo; @@ -390,7 +390,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, target.startTag("tab"); if (!tab.isEnabled() && tab.isVisible()) { target.addAttribute( - TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED, true); + TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED, true); } if (!tab.isVisible()) { @@ -405,30 +405,30 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, // VCaption.updateCaption(uidl) final Resource icon = tab.getIcon(); if (icon != null) { - target.addAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON, + target.addAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON, icon); } final String caption = tab.getCaption(); if (caption != null && caption.length() > 0) { target.addAttribute( - TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION, caption); + TabsheetBaseConstants.ATTRIBUTE_TAB_CAPTION, caption); } ErrorMessage tabError = tab.getComponentError(); if (tabError != null) { target.addAttribute( - TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE, + TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE, tabError.getFormattedHtmlMessage()); } final String description = tab.getDescription(); if (description != null) { target.addAttribute( - TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION, + TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION, description); } final String styleName = tab.getStyleName(); if (styleName != null && styleName.length() != 0) { - target.addAttribute(VTabsheet.TAB_STYLE_NAME, styleName); + target.addAttribute(TabsheetConstants.TAB_STYLE_NAME, styleName); } target.addAttribute("key", keyMapper.key(component)); diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 39b7fb7473..24cf608dd4 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -41,12 +41,12 @@ import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.DropTarget; import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion; import com.vaadin.shared.MouseEventDetails; +import com.vaadin.shared.ui.table.TableConstants; import com.vaadin.terminal.KeyMapper; import com.vaadin.terminal.LegacyPaint; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; -import com.vaadin.terminal.gwt.client.ui.table.VScrollTable; /** * <p> @@ -2874,9 +2874,9 @@ public class Table extends AbstractSelect implements Action.Container, */ int pageBufferLastIndex = pageBufferFirstIndex + pageBuffer[CELL_ITEMID].length - 1; - target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_FIRST, + target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST, pageBufferFirstIndex); - target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_LAST, + target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_LAST, pageBufferLastIndex); } else if (target.isFullRepaint() || isRowCacheInvalidated()) { paintRows(target, cells, actionSet); @@ -2899,7 +2899,7 @@ public class Table extends AbstractSelect implements Action.Container, if (keyMapperReset) { keyMapperReset = false; - target.addAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET, true); + target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true); } if (dropHandler != null) { @@ -4579,14 +4579,14 @@ public class Table extends AbstractSelect implements Action.Container, @Override public void addListener(ItemClickListener listener) { - addListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, + addListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener, ItemClickEvent.ITEM_CLICK_METHOD); } @Override public void removeListener(ItemClickListener listener) { - removeListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, - listener); + removeListener(TableConstants.ITEM_CLICK_EVENT_ID, + ItemClickEvent.class, listener); } // Identical to AbstractCompoenentContainer.setEnabled(); @@ -4930,8 +4930,9 @@ public class Table extends AbstractSelect implements Action.Container, * The handler which should handle the header click events. */ public void addListener(HeaderClickListener listener) { - addListener(VScrollTable.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class, - listener, HeaderClickEvent.HEADER_CLICK_METHOD); + addListener(TableConstants.HEADER_CLICK_EVENT_ID, + HeaderClickEvent.class, listener, + HeaderClickEvent.HEADER_CLICK_METHOD); } /** @@ -4941,7 +4942,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to remove. */ public void removeListener(HeaderClickListener listener) { - removeListener(VScrollTable.HEADER_CLICK_EVENT_ID, + removeListener(TableConstants.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class, listener); } @@ -4957,8 +4958,9 @@ public class Table extends AbstractSelect implements Action.Container, * The handler which should handle the footer click events. */ public void addListener(FooterClickListener listener) { - addListener(VScrollTable.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class, - listener, FooterClickEvent.FOOTER_CLICK_METHOD); + addListener(TableConstants.FOOTER_CLICK_EVENT_ID, + FooterClickEvent.class, listener, + FooterClickEvent.FOOTER_CLICK_METHOD); } /** @@ -4968,7 +4970,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to remove. */ public void removeListener(FooterClickListener listener) { - removeListener(VScrollTable.FOOTER_CLICK_EVENT_ID, + removeListener(TableConstants.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class, listener); } @@ -5124,7 +5126,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to attach to the Table */ public void addListener(ColumnResizeListener listener) { - addListener(VScrollTable.COLUMN_RESIZE_EVENT_ID, + addListener(TableConstants.COLUMN_RESIZE_EVENT_ID, ColumnResizeEvent.class, listener, ColumnResizeEvent.COLUMN_RESIZE_METHOD); } @@ -5136,7 +5138,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to remove */ public void removeListener(ColumnResizeListener listener) { - removeListener(VScrollTable.COLUMN_RESIZE_EVENT_ID, + removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID, ColumnResizeEvent.class, listener); } @@ -5190,7 +5192,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to attach to the Table */ public void addListener(ColumnReorderListener listener) { - addListener(VScrollTable.COLUMN_REORDER_EVENT_ID, + addListener(TableConstants.COLUMN_REORDER_EVENT_ID, ColumnReorderEvent.class, listener, ColumnReorderEvent.METHOD); } @@ -5201,7 +5203,7 @@ public class Table extends AbstractSelect implements Action.Container, * The listener to remove */ public void removeListener(ColumnReorderListener listener) { - removeListener(VScrollTable.COLUMN_REORDER_EVENT_ID, + removeListener(TableConstants.COLUMN_REORDER_EVENT_ID, ColumnReorderEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java index c15975d879..f84146ffc3 100644 --- a/server/src/com/vaadin/ui/Tree.java +++ b/server/src/com/vaadin/ui/Tree.java @@ -39,12 +39,11 @@ import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion; import com.vaadin.event.dd.acceptcriteria.TargetDetailIs; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.VerticalDropLocation; +import com.vaadin.shared.ui.tree.TreeConstants; import com.vaadin.terminal.KeyMapper; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; -import com.vaadin.terminal.gwt.client.ui.tree.TreeConnector; -import com.vaadin.terminal.gwt.client.ui.tree.VTree; import com.vaadin.tools.ReflectTools; /** @@ -604,7 +603,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (itemStyleGenerator != null) { String stylename = itemStyleGenerator.getStyle(itemId); if (stylename != null) { - target.addAttribute(TreeConnector.ATTRIBUTE_NODE_STYLE, + target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE, stylename); } } @@ -618,11 +617,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } // Adds the attributes - target.addAttribute(TreeConnector.ATTRIBUTE_NODE_CAPTION, + target.addAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION, getItemCaption(itemId)); final Resource icon = getItemIcon(itemId); if (icon != null) { - target.addAttribute(TreeConnector.ATTRIBUTE_NODE_ICON, + target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON, getItemIcon(itemId)); } final String key = itemIdMapper.key(itemId); @@ -680,11 +679,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, final Action a = i.next(); target.startTag("action"); if (a.getCaption() != null) { - target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_CAPTION, + target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION, a.getCaption()); } if (a.getIcon() != null) { - target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_ICON, + target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON, a.getIcon()); } target.addAttribute("key", actionMapper.key(a)); @@ -1162,13 +1161,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, @Override public void addListener(ItemClickListener listener) { - addListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener, - ItemClickEvent.ITEM_CLICK_METHOD); + addListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, + listener, ItemClickEvent.ITEM_CLICK_METHOD); } @Override public void removeListener(ItemClickListener listener) { - removeListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, + removeListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener); } diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java index 6132b652f7..058a8640ce 100644 --- a/server/src/com/vaadin/ui/TreeTable.java +++ b/server/src/com/vaadin/ui/TreeTable.java @@ -20,10 +20,10 @@ import com.vaadin.data.Container.ItemSetChangeEvent; import com.vaadin.data.util.ContainerHierarchicalWrapper; import com.vaadin.data.util.HierarchicalContainer; import com.vaadin.data.util.HierarchicalContainerOrderedWrapper; +import com.vaadin.shared.ui.treetable.TreeTableConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; -import com.vaadin.terminal.gwt.client.ui.treetable.TreeTableConnector; import com.vaadin.ui.Tree.CollapseEvent; import com.vaadin.ui.Tree.CollapseListener; import com.vaadin.ui.Tree.ExpandEvent; @@ -472,7 +472,7 @@ public class TreeTable extends Table implements Hierarchical { Object object = visibleColumns2[i]; if (hierarchyColumnId.equals(object)) { target.addAttribute( - TreeTableConnector.ATTRIBUTE_HIERARCHY_COLUMN_INDEX, + TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX, i); break; } diff --git a/server/src/com/vaadin/ui/TwinColSelect.java b/server/src/com/vaadin/ui/TwinColSelect.java index 5539236f77..c0dda44710 100644 --- a/server/src/com/vaadin/ui/TwinColSelect.java +++ b/server/src/com/vaadin/ui/TwinColSelect.java @@ -7,9 +7,9 @@ package com.vaadin.ui; import java.util.Collection; import com.vaadin.data.Container; +import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.twincolselect.VTwinColSelect; /** * Multiselect component with two lists: left side for available items and right @@ -128,10 +128,12 @@ public class TwinColSelect extends AbstractSelect { String lc = getLeftColumnCaption(); String rc = getRightColumnCaption(); if (lc != null) { - target.addAttribute(VTwinColSelect.ATTRIBUTE_LEFT_CAPTION, lc); + target.addAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION, + lc); } if (rc != null) { - target.addAttribute(VTwinColSelect.ATTRIBUTE_RIGHT_CAPTION, rc); + target.addAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION, + rc); } super.paintContent(target); diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index e413d35e6d..0d18f5d28e 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -20,12 +20,12 @@ import com.vaadin.event.ShortcutAction.KeyCode; import com.vaadin.event.ShortcutAction.ModifierKey; import com.vaadin.event.ShortcutListener; import com.vaadin.shared.MouseEventDetails; +import com.vaadin.shared.ui.root.RootConstants; import com.vaadin.shared.ui.window.WindowServerRpc; import com.vaadin.shared.ui.window.WindowState; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; -import com.vaadin.terminal.gwt.client.ui.root.VRoot; /** * A component that represents a floating popup window that can be added to a @@ -161,14 +161,14 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, sizeHasChanged = true; } Integer browserHeightVar = (Integer) variables - .get(VRoot.BROWSER_HEIGHT_VAR); + .get(RootConstants.BROWSER_HEIGHT_VAR); if (browserHeightVar != null && browserHeightVar.intValue() != browserWindowHeight) { browserWindowHeight = browserHeightVar.intValue(); sizeHasChanged = true; } Integer browserWidthVar = (Integer) variables - .get(VRoot.BROWSER_WIDTH_VAR); + .get(RootConstants.BROWSER_WIDTH_VAR); if (browserWidthVar != null && browserWidthVar.intValue() != browserWindowWidth) { browserWindowWidth = browserWidthVar.intValue(); |