From: Artur Signell Date: Tue, 28 Feb 2012 16:35:24 +0000 (+0200) Subject: Organized imports and formatted all java files X-Git-Tag: 7.0.0.alpha2~414 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6cf9afc850c075070c27189118afd57a7d2f54ac;p=vaadin-framework.git Organized imports and formatted all java files --- diff --git a/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java b/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java index 2584a4770b..b8efa5b1e4 100644 --- a/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java +++ b/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java @@ -120,8 +120,8 @@ public class BeanFieldGroup extends FieldGroup { super.configureField(field); // Add Bean validators if there are annotations if (isBeanValidationImplementationAvailable()) { - BeanValidator validator = new BeanValidator( - beanType, getPropertyId(field).toString()); + BeanValidator validator = new BeanValidator(beanType, + getPropertyId(field).toString()); field.addValidator(validator); if (field.getLocale() != null) { validator.setLocale(field.getLocale()); diff --git a/src/com/vaadin/data/validator/DoubleRangeValidator.java b/src/com/vaadin/data/validator/DoubleRangeValidator.java index 91fcf004af..05ae2f827e 100644 --- a/src/com/vaadin/data/validator/DoubleRangeValidator.java +++ b/src/com/vaadin/data/validator/DoubleRangeValidator.java @@ -29,7 +29,8 @@ public class DoubleRangeValidator extends RangeValidator { * @param maxValue * The maximum value to accept or null for no limit */ - public DoubleRangeValidator(String errorMessage, Double minValue, Double maxValue) { + public DoubleRangeValidator(String errorMessage, Double minValue, + Double maxValue) { super(errorMessage, Double.class, minValue, maxValue); } diff --git a/src/com/vaadin/data/validator/RegexpValidator.java b/src/com/vaadin/data/validator/RegexpValidator.java index dec0bf0be9..8143d54c97 100644 --- a/src/com/vaadin/data/validator/RegexpValidator.java +++ b/src/com/vaadin/data/validator/RegexpValidator.java @@ -62,8 +62,12 @@ public class RegexpValidator extends AbstractStringValidator { this.complete = complete; } - /* (non-Javadoc) - * @see com.vaadin.data.validator.AbstractValidator#isValidValue(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.vaadin.data.validator.AbstractValidator#isValidValue(java.lang.Object + * ) */ @Override protected boolean isValidValue(String value) { diff --git a/src/com/vaadin/external/json/JSONException.java b/src/com/vaadin/external/json/JSONException.java index d799021506..fecc38974e 100644 --- a/src/com/vaadin/external/json/JSONException.java +++ b/src/com/vaadin/external/json/JSONException.java @@ -2,16 +2,19 @@ package com.vaadin.external.json; /** * The JSONException is thrown by the JSON.org classes when things are amiss. + * * @author JSON.org * @version 2010-12-24 */ public class JSONException extends Exception { - private static final long serialVersionUID = 0; - private Throwable cause; + private static final long serialVersionUID = 0; + private Throwable cause; /** * Constructs a JSONException with an explanatory message. - * @param message Detail about the reason for the exception. + * + * @param message + * Detail about the reason for the exception. */ public JSONException(String message) { super(message); diff --git a/src/com/vaadin/external/json/JSONStringer.java b/src/com/vaadin/external/json/JSONStringer.java index 465f27aaab..e4ccc8e195 100644 --- a/src/com/vaadin/external/json/JSONStringer.java +++ b/src/com/vaadin/external/json/JSONStringer.java @@ -1,58 +1,62 @@ package com.vaadin.external.json; /* -Copyright (c) 2006 JSON.org + Copyright (c) 2006 JSON.org -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -The Software shall be used for Good, not Evil. + The Software shall be used for Good, not Evil. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + */ import java.io.StringWriter; /** - * JSONStringer provides a quick and convenient way of producing JSON text. - * The texts produced strictly conform to JSON syntax rules. No whitespace is - * added, so the results are ready for transmission or storage. Each instance of + * JSONStringer provides a quick and convenient way of producing JSON text. The + * texts produced strictly conform to JSON syntax rules. No whitespace is added, + * so the results are ready for transmission or storage. Each instance of * JSONStringer can produce one JSON text. *

* A JSONStringer instance provides a value method for appending - * values to the - * text, and a key - * method for adding keys before values in objects. There are array - * and endArray methods that make and bound array values, and - * object and endObject methods which make and bound - * object values. All of these methods return the JSONWriter instance, - * permitting cascade style. For example,

- * myString = new JSONStringer()
- *     .object()
- *         .key("JSON")
- *         .value("Hello, World!")
- *     .endObject()
- *     .toString();
which produces the string
- * {"JSON":"Hello, World!"}
+ * values to the text, and a key method for adding keys before + * values in objects. There are array and endArray + * methods that make and bound array values, and object and + * endObject methods which make and bound object values. All of + * these methods return the JSONWriter instance, permitting cascade style. For + * example, + * + *
+ * myString = new JSONStringer().object().key("JSON").value("Hello, World!")
+ *         .endObject().toString();
+ * 
+ * + * which produces the string + * + *
+ * {"JSON":"Hello, World!"}
+ * 
*

* The first method called must be array or object. * There are no methods for adding commas or colons. JSONStringer adds them for * you. Objects and arrays can be nested up to 20 levels deep. *

* This can sometimes be easier than using a JSONObject to build a string. + * * @author JSON.org * @version 2008-09-18 */ @@ -70,6 +74,7 @@ public class JSONStringer extends JSONWriter { * problem in the construction of the JSON text (such as the calls to * array were not properly balanced with calls to * endArray). + * * @return The JSON text. */ public String toString() { diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java index 330e4cf5de..50a59e4975 100644 --- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java +++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java @@ -64,11 +64,11 @@ public class BrowserInfo { browserDetails.setIEMode(documentMode); } } - + if (browserDetails.isChrome()) { - touchDevice = detectChromeTouchDevice(); + touchDevice = detectChromeTouchDevice(); } else { - touchDevice = detectTouchDevice(); + touchDevice = detectTouchDevice(); } } @@ -76,7 +76,7 @@ public class BrowserInfo { /*-{ try { document.createEvent("TouchEvent");return true;} catch(e){return false;}; }-*/; - + private native boolean detectChromeTouchDevice() /*-{ return ("ontouchstart" in window); diff --git a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java index f686b053ba..ae9f077912 100644 --- a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java +++ b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java @@ -96,8 +96,8 @@ public class ComponentLocator { // If we found a Paintable then we use that as reference. We should // find the Paintable for all but very special cases (like // overlays). - w = ((ComponentConnector) ConnectorMap.get(client).getConnector(pid)) - .getWidget(); + w = ((ComponentConnector) ConnectorMap.get(client) + .getConnector(pid)).getWidget(); /* * Still if the Paintable contains a widget that implements @@ -376,8 +376,8 @@ public class ComponentLocator { return ""; } else if (w instanceof VWindow) { VWindow win = (VWindow) w; - ArrayList subWindowList = client.getView() - .getWidget().getSubWindowList(); + ArrayList subWindowList = client.getView().getWidget() + .getSubWindowList(); int indexOfSubWindow = subWindowList.indexOf(win); return PARENTCHILD_SEPARATOR + "VWindow[" + indexOfSubWindow + "]"; } else if (w instanceof RootPanel) { @@ -440,8 +440,8 @@ public class ComponentLocator { w = client.getView().getWidget(); } else if (w == null) { // Must be static pid (PID_S*) - w = ((ComponentConnector) ConnectorMap.get(client).getConnector( - part)).getWidget(); + w = ((ComponentConnector) ConnectorMap.get(client) + .getConnector(part)).getWidget(); } else if (part.startsWith("domChild[")) { // The target widget has been found and the rest identifies the // element @@ -522,8 +522,8 @@ public class ComponentLocator { * compatibility */ if (widgetClassName.equals("VWindow")) { - iterator = client.getView().getWidget() - .getSubWindowList().iterator(); + iterator = client.getView().getWidget().getSubWindowList() + .iterator(); } else if (widgetClassName.equals("VContextMenu")) { return client.getContextMenu(); } else { diff --git a/src/com/vaadin/terminal/gwt/client/EventHelper.java b/src/com/vaadin/terminal/gwt/client/EventHelper.java index 41ca06bb5b..06b9042eb4 100644 --- a/src/com/vaadin/terminal/gwt/client/EventHelper.java +++ b/src/com/vaadin/terminal/gwt/client/EventHelper.java @@ -40,8 +40,8 @@ import com.google.gwt.event.shared.HandlerRegistration; */ public class EventHelper { - public static HandlerRegistration updateFocusHandler(ComponentConnector paintable, - ApplicationConnection client, + public static HandlerRegistration updateFocusHandler( + ComponentConnector paintable, ApplicationConnection client, HandlerRegistration handlerRegistration) { if (client.hasEventListeners(paintable, FOCUS)) { if (handlerRegistration == null) { @@ -57,8 +57,8 @@ public class EventHelper { return null; } - public static HandlerRegistration updateBlurHandler(ComponentConnector paintable, - ApplicationConnection client, + public static HandlerRegistration updateBlurHandler( + ComponentConnector paintable, ApplicationConnection client, HandlerRegistration handlerRegistration) { if (client.hasEventListeners(paintable, BLUR)) { if (handlerRegistration == null) { diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index 3c251ae997..5ed30eaff1 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -97,8 +97,7 @@ public class Util { List runningApplications = ApplicationConfiguration .getRunningApplications(); for (ApplicationConnection applicationConnection : runningApplications) { - ConnectorMap paintableMap = applicationConnection - .getConnectorMap(); + ConnectorMap paintableMap = applicationConnection.getConnectorMap(); ComponentConnector paintable = paintableMap.getConnector(widget); if (paintable == null) { continue; @@ -698,8 +697,8 @@ public class Util { * @param element * the element to start from */ - public static ComponentConnector findPaintable(ApplicationConnection client, - Element element) { + public static ComponentConnector findPaintable( + ApplicationConnection client, Element element) { Widget widget = Util.findWidget(element, null); ConnectorMap vPaintableMap = ConnectorMap.get(client); while (widget != null && !vPaintableMap.isConnector(widget)) { @@ -834,8 +833,9 @@ public class Util { // TODO paintables inside lists/maps get rendered as // components in the debug console String formattedValue = value instanceof Connector ? c - .getConnectorMap().getConnectorId((Connector) value) - : String.valueOf(value); + .getConnectorMap() + .getConnectorId((Connector) value) : String + .valueOf(value); formattedParams = parameters[0] + " : " + formattedValue; } if (null == formattedParams) { diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java index 2f2621c153..73ef574321 100644 --- a/src/com/vaadin/terminal/gwt/client/VCaption.java +++ b/src/com/vaadin/terminal/gwt/client/VCaption.java @@ -8,8 +8,8 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.HTML; -import com.vaadin.terminal.gwt.client.ui.Icon; import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; +import com.vaadin.terminal.gwt.client.ui.Icon; import com.vaadin.terminal.gwt.client.ui.TabsheetBaseConnector; public class VCaption extends HTML { @@ -78,7 +78,8 @@ public class VCaption extends HTML { owner = component; if (client != null && owner != null) { - setOwnerPid(getElement(), ConnectorMap.get(client).getConnectorId(owner)); + setOwnerPid(getElement(), + ConnectorMap.get(client).getConnectorId(owner)); } setStyleName(CLASSNAME); diff --git a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java index 22f0add2c5..eeab3cff19 100644 --- a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java +++ b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java @@ -90,14 +90,15 @@ public class VDebugConsole extends VOverlay implements Console { for (ApplicationConnection a : ApplicationConfiguration .getRunningApplications()) { - ComponentConnector paintable = Util.getPaintableForElement(a, - a.getView().getWidget(), eventTarget); + ComponentConnector paintable = Util.getPaintableForElement( + a, a.getView().getWidget(), eventTarget); if (paintable == null) { paintable = Util.getPaintableForElement(a, RootPanel.get(), eventTarget); } if (paintable != null) { - String pid = ConnectorMap.get(a).getConnectorId(paintable); + String pid = ConnectorMap.get(a).getConnectorId( + paintable); VUIDLBrowser.highlight(paintable); label.setText("Currently focused :" + paintable.getClass() + " ID:" + pid); @@ -119,8 +120,8 @@ public class VDebugConsole extends VOverlay implements Console { .getClientY()); for (ApplicationConnection a : ApplicationConfiguration .getRunningApplications()) { - ComponentConnector paintable = Util.getPaintableForElement(a, - a.getView().getWidget(), eventTarget); + ComponentConnector paintable = Util.getPaintableForElement( + a, a.getView().getWidget(), eventTarget); if (paintable == null) { paintable = Util.getPaintableForElement(a, RootPanel.get(), eventTarget); @@ -521,7 +522,8 @@ public class VDebugConsole extends VOverlay implements Console { } private void printClientSideDetectedIssues( - Set zeroHeightComponents, ApplicationConnection ac) { + Set zeroHeightComponents, + ApplicationConnection ac) { for (final ComponentConnector paintable : zeroHeightComponents) { final Widget layout = paintable.getParent().getWidget(); @@ -566,8 +568,7 @@ public class VDebugConsole extends VOverlay implements Console { emphasisInUi.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (paintable != null) { - Element element2 = paintable.getWidget() - .getElement(); + Element element2 = paintable.getWidget().getElement(); Widget.setStyleName(element2, "invalidlayout", emphasisInUi.getValue()); } diff --git a/src/com/vaadin/terminal/gwt/client/VTooltip.java b/src/com/vaadin/terminal/gwt/client/VTooltip.java index c0c61971e2..998e117176 100644 --- a/src/com/vaadin/terminal/gwt/client/VTooltip.java +++ b/src/com/vaadin/terminal/gwt/client/VTooltip.java @@ -207,7 +207,8 @@ public class VTooltip extends VOverlay { } - public void handleTooltipEvent(Event event, ComponentConnector owner, Object key) { + public void handleTooltipEvent(Event event, ComponentConnector owner, + Object key) { final int type = DOM.eventGetType(event); if ((VTooltip.TOOLTIP_EVENTS & type) == type) { if (type == Event.ONMOUSEOVER) { diff --git a/src/com/vaadin/terminal/gwt/client/communication/JsonDecoder.java b/src/com/vaadin/terminal/gwt/client/communication/JsonDecoder.java index b3106dddff..fdaaf43abd 100644 --- a/src/com/vaadin/terminal/gwt/client/communication/JsonDecoder.java +++ b/src/com/vaadin/terminal/gwt/client/communication/JsonDecoder.java @@ -42,8 +42,7 @@ public class JsonDecoder { * mapper between connector ID and {@link Connector} objects * @return converted value (does not contain JSON types) */ - public static Object convertValue(JSONArray jsonArray, - ConnectorMap idMapper) { + public static Object convertValue(JSONArray jsonArray, ConnectorMap idMapper) { String type = ((JSONString) jsonArray.get(0)).stringValue(); return convertValue(type, jsonArray.get(1), idMapper); } diff --git a/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java b/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java index 6f47283cf8..c08008e5c1 100644 --- a/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java +++ b/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java @@ -22,8 +22,8 @@ public interface ServerRpc extends Serializable { /** * Initialization support for client to server RPC interfaces. * - * This is in a separate interface instead of {@link ServerRpc} - * because otherwise also server side proxies would have to implement the + * This is in a separate interface instead of {@link ServerRpc} because + * otherwise also server side proxies would have to implement the * initialization method. * * @since 7.0 diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java index 04ecb4484a..4b7b5f6421 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbsoluteLayoutConnector.java @@ -15,14 +15,14 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.DirectionalManagedLayout; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.VAbsoluteLayout.AbsoluteWrapper; -public class AbsoluteLayoutConnector extends AbstractComponentContainerConnector - implements DirectionalManagedLayout { +public class AbsoluteLayoutConnector extends + AbstractComponentContainerConnector implements DirectionalManagedLayout { private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler( this, EventId.LAYOUT_CLICK) { @@ -73,8 +73,8 @@ public class AbsoluteLayoutConnector extends AbstractComponentContainerConnector } public void updateCaption(ComponentConnector component, UIDL uidl) { - AbsoluteWrapper parent2 = (AbsoluteWrapper) (component - .getWidget()).getParent(); + AbsoluteWrapper parent2 = (AbsoluteWrapper) (component.getWidget()) + .getParent(); parent2.updateCaption(uidl); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index 1242f1ca4f..12adb60fb1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -9,9 +9,9 @@ import java.util.Collection; import com.google.gwt.user.client.ui.HasOneWidget; import com.google.gwt.user.client.ui.HasWidgets; import com.google.gwt.user.client.ui.Widget; -import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentContainerConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; public abstract class AbstractComponentContainerConnector extends AbstractComponentConnector implements ComponentContainerConnector { diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractDateFieldConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractDateFieldConnector.java index 1a3ce139a1..c2652adbd4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractDateFieldConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractDateFieldConnector.java @@ -36,8 +36,7 @@ public class AbstractDateFieldConnector extends AbstractComponentConnector { getWidget().dts.setLocale(locale); getWidget().currentLocale = locale; } catch (final LocaleNotLoadedException e) { - getWidget().currentLocale = getWidget().dts - .getLocale(); + getWidget().currentLocale = getWidget().dts.getLocale(); VConsole.error("Tried to use an unloaded locale \"" + locale + "\". Using default locale (" + getWidget().currentLocale + ")."); @@ -91,8 +90,8 @@ public class AbstractDateFieldConnector extends AbstractComponentConnector { // Construct new date for this datefield (only if not null) if (year > -1) { getWidget().setCurrentDate( - new Date((long) getWidget().getTime(year, - month, day, hour, min, sec, 0))); + new Date((long) getWidget().getTime(year, month, day, hour, + min, sec, 0))); } else { getWidget().setCurrentDate(null); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java index 079cc4eb3b..aec7f5cd3c 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java @@ -18,8 +18,8 @@ import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.ValueMap; -import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; import com.vaadin.terminal.gwt.client.ui.layout.ComponentConnectorLayoutSlot; +import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; public abstract class AbstractOrderedLayoutConnector extends AbstractComponentContainerConnector implements DirectionalManagedLayout { diff --git a/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java index 179d5f7808..d0c663a6ce 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AccordionConnector.java @@ -8,8 +8,8 @@ import java.util.Iterator; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.ui.VAccordion.StackItem; public class AccordionConnector extends TabsheetBaseConnector implements @@ -28,28 +28,25 @@ public class AccordionConnector extends TabsheetBaseConnector implements getWidget().selectedUIDLItemIndex); UIDL selectedTabUIDL = getWidget().lazyUpdateMap .remove(selectedItem); - getWidget().open( - getWidget().selectedUIDLItemIndex); + getWidget().open(getWidget().selectedUIDLItemIndex); selectedItem.setContent(selectedTabUIDL); - } else if (isRealUpdate(uidl) - && getWidget().openTab != null) { + } else if (isRealUpdate(uidl) && getWidget().openTab != null) { getWidget().close(getWidget().openTab); } getWidget().iLayout(); // finally render possible hidden tabs if (getWidget().lazyUpdateMap.size() > 0) { - for (Iterator iterator = getWidget().lazyUpdateMap - .keySet().iterator(); iterator.hasNext();) { + for (Iterator iterator = getWidget().lazyUpdateMap.keySet() + .iterator(); iterator.hasNext();) { StackItem item = (StackItem) iterator.next(); item.setContent(getWidget().lazyUpdateMap.get(item)); } getWidget().lazyUpdateMap.clear(); } - getWidget().renderInformation - .updateSize(getWidget().getElement()); + getWidget().renderInformation.updateSize(getWidget().getElement()); } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java b/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java index 62cc3a12d3..a4d4e588d5 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java @@ -59,12 +59,10 @@ public class ButtonConnector extends AbstractComponentConnector { return; } - getWidget().focusHandlerRegistration = EventHelper - .updateFocusHandler(this, client, - getWidget().focusHandlerRegistration); - getWidget().blurHandlerRegistration = EventHelper - .updateBlurHandler(this, client, - getWidget().blurHandlerRegistration); + getWidget().focusHandlerRegistration = EventHelper.updateFocusHandler( + this, client, getWidget().focusHandlerRegistration); + getWidget().blurHandlerRegistration = EventHelper.updateBlurHandler( + this, client, getWidget().blurHandlerRegistration); // Save details getWidget().client = client; @@ -78,40 +76,33 @@ public class ButtonConnector extends AbstractComponentConnector { // handle error if (uidl.hasAttribute("error")) { if (getWidget().errorIndicatorElement == null) { - getWidget().errorIndicatorElement = DOM - .createSpan(); + getWidget().errorIndicatorElement = DOM.createSpan(); getWidget().errorIndicatorElement .setClassName("v-errorindicator"); } - getWidget().wrapper.insertBefore( - getWidget().errorIndicatorElement, + getWidget().wrapper.insertBefore(getWidget().errorIndicatorElement, getWidget().captionElement); } else if (getWidget().errorIndicatorElement != null) { - getWidget().wrapper - .removeChild(getWidget().errorIndicatorElement); + getWidget().wrapper.removeChild(getWidget().errorIndicatorElement); getWidget().errorIndicatorElement = null; } if (uidl.hasAttribute(ATTRIBUTE_ICON)) { if (getWidget().icon == null) { getWidget().icon = new Icon(client); - getWidget().wrapper.insertBefore( - getWidget().icon.getElement(), + getWidget().wrapper.insertBefore(getWidget().icon.getElement(), getWidget().captionElement); } - getWidget().icon.setUri(uidl - .getStringAttribute(ATTRIBUTE_ICON)); + getWidget().icon.setUri(uidl.getStringAttribute(ATTRIBUTE_ICON)); } else { if (getWidget().icon != null) { - getWidget().wrapper - .removeChild(getWidget().icon.getElement()); + getWidget().wrapper.removeChild(getWidget().icon.getElement()); getWidget().icon = null; } } - getWidget().clickShortcut = getState() - .getClickShortcutKeyCode(); + getWidget().clickShortcut = getState().getClickShortcutKeyCode(); } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/CheckBoxConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CheckBoxConnector.java index f33cc35a46..f198fdc00f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/CheckBoxConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/CheckBoxConnector.java @@ -31,34 +31,27 @@ public class CheckBoxConnector extends AbstractComponentConnector { return; } - getWidget().focusHandlerRegistration = EventHelper - .updateFocusHandler(this, client, - getWidget().focusHandlerRegistration); - getWidget().blurHandlerRegistration = EventHelper - .updateBlurHandler(this, client, - getWidget().blurHandlerRegistration); + getWidget().focusHandlerRegistration = EventHelper.updateFocusHandler( + this, client, getWidget().focusHandlerRegistration); + getWidget().blurHandlerRegistration = EventHelper.updateBlurHandler( + this, client, getWidget().blurHandlerRegistration); if (uidl.hasAttribute("error")) { if (getWidget().errorIndicatorElement == null) { - getWidget().errorIndicatorElement = DOM - .createSpan(); - getWidget().errorIndicatorElement - .setInnerHTML(" "); - DOM.setElementProperty( - getWidget().errorIndicatorElement, + getWidget().errorIndicatorElement = DOM.createSpan(); + getWidget().errorIndicatorElement.setInnerHTML(" "); + DOM.setElementProperty(getWidget().errorIndicatorElement, "className", "v-errorindicator"); DOM.appendChild(getWidget().getElement(), getWidget().errorIndicatorElement); DOM.sinkEvents(getWidget().errorIndicatorElement, VTooltip.TOOLTIP_EVENTS | Event.ONCLICK); } else { - DOM.setStyleAttribute( - getWidget().errorIndicatorElement, + DOM.setStyleAttribute(getWidget().errorIndicatorElement, "display", ""); } } else if (getWidget().errorIndicatorElement != null) { - DOM.setStyleAttribute( - getWidget().errorIndicatorElement, "display", + DOM.setStyleAttribute(getWidget().errorIndicatorElement, "display", "none"); } @@ -71,12 +64,10 @@ public class CheckBoxConnector extends AbstractComponentConnector { getWidget().icon = new Icon(client); DOM.insertChild(getWidget().getElement(), getWidget().icon.getElement(), 1); - getWidget().icon - .sinkEvents(VTooltip.TOOLTIP_EVENTS); + getWidget().icon.sinkEvents(VTooltip.TOOLTIP_EVENTS); getWidget().icon.sinkEvents(Event.ONCLICK); } - getWidget().icon.setUri(uidl - .getStringAttribute(ATTRIBUTE_ICON)); + getWidget().icon.setUri(uidl.getStringAttribute(ATTRIBUTE_ICON)); } else if (getWidget().icon != null) { // detach icon DOM.removeChild(getWidget().getElement(), @@ -86,9 +77,8 @@ public class CheckBoxConnector extends AbstractComponentConnector { // Set text getWidget().setText(getState().getCaption()); - getWidget() - .setValue( - uidl.getBooleanVariable(getWidget().VARIABLE_STATE)); + getWidget().setValue( + uidl.getBooleanVariable(getWidget().VARIABLE_STATE)); getWidget().immediate = getState().isImmediate(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java b/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java index c941b3c38a..c263ec03e6 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java @@ -18,9 +18,9 @@ import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.Element; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; +import com.vaadin.terminal.gwt.client.MouseEventDetails; public abstract class ClickEventHandler implements DoubleClickHandler, ContextMenuHandler, MouseUpHandler { @@ -82,8 +82,8 @@ public abstract class ClickEventHandler implements DoubleClickHandler, protected void fireClick(NativeEvent event) { ApplicationConnection client = getApplicationConnection(); - String pid = ConnectorMap.get(getApplicationConnection()).getConnectorId( - paintable); + String pid = ConnectorMap.get(getApplicationConnection()) + .getConnectorId(paintable); MouseEventDetails mouseDetails = new MouseEventDetails(event, getRelativeToElement()); diff --git a/src/com/vaadin/terminal/gwt/client/ui/ComboBoxConnector.java b/src/com/vaadin/terminal/gwt/client/ui/ComboBoxConnector.java index 7de3c3ac3a..0781ddf3f9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ComboBoxConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ComboBoxConnector.java @@ -49,29 +49,24 @@ public class ComboBoxConnector extends AbstractComponentConnector implements // not a FocusWidget -> needs own tabindex handling if (uidl.hasAttribute("tabindex")) { - getWidget().tb.setTabIndex(uidl - .getIntAttribute("tabindex")); + getWidget().tb.setTabIndex(uidl.getIntAttribute("tabindex")); } if (uidl.hasAttribute("filteringmode")) { - getWidget().filteringmode = uidl - .getIntAttribute("filteringmode"); + getWidget().filteringmode = uidl.getIntAttribute("filteringmode"); } getWidget().immediate = getState().isImmediate(); - getWidget().nullSelectionAllowed = uidl - .hasAttribute("nullselect"); + getWidget().nullSelectionAllowed = uidl.hasAttribute("nullselect"); - getWidget().nullSelectItem = uidl - .hasAttribute("nullselectitem") + getWidget().nullSelectItem = uidl.hasAttribute("nullselectitem") && uidl.getBooleanAttribute("nullselectitem"); getWidget().currentPage = uidl.getIntVariable("page"); if (uidl.hasAttribute("pagelength")) { - getWidget().pageLength = uidl - .getIntAttribute("pagelength"); + getWidget().pageLength = uidl.getIntAttribute("pagelength"); } if (uidl.hasAttribute(VFilterSelect.ATTR_INPUTPROMPT)) { @@ -82,11 +77,9 @@ public class ComboBoxConnector extends AbstractComponentConnector implements getWidget().inputPrompt = ""; } - getWidget().suggestionPopup.updateStyleNames(uidl, - getState()); + getWidget().suggestionPopup.updateStyleNames(uidl, getState()); - getWidget().allowNewItem = uidl - .hasAttribute("allownewitem"); + getWidget().allowNewItem = uidl.hasAttribute("allownewitem"); getWidget().lastNewItemString = null; getWidget().currentSuggestions.clear(); @@ -109,8 +102,7 @@ public class ComboBoxConnector extends AbstractComponentConnector implements final UIDL options = uidl.getChildUIDL(0); if (uidl.hasAttribute("totalMatches")) { - getWidget().totalMatches = uidl - .getIntAttribute("totalMatches"); + getWidget().totalMatches = uidl.getIntAttribute("totalMatches"); } else { getWidget().totalMatches = 0; } @@ -141,8 +133,7 @@ public class ComboBoxConnector extends AbstractComponentConnector implements } } getWidget().currentSuggestion = suggestion; - getWidget().setSelectedItemIcon( - suggestion.getIconUri()); + getWidget().setSelectedItemIcon(suggestion.getIconUri()); } // Collect captions so we can calculate minimum width for textarea @@ -180,19 +171,16 @@ public class ComboBoxConnector extends AbstractComponentConnector implements && getWidget().lastFilter.toLowerCase().equals( uidl.getStringVariable("filter"))) { getWidget().suggestionPopup.showSuggestions( - getWidget().currentSuggestions, - getWidget().currentPage, + getWidget().currentSuggestions, getWidget().currentPage, getWidget().totalMatches); getWidget().waitingForFilteringResponse = false; if (!getWidget().popupOpenerClicked && getWidget().selectPopupItemWhenResponseIsReceived != VFilterSelect.Select.NONE) { // we're paging w/ arrows if (getWidget().selectPopupItemWhenResponseIsReceived == VFilterSelect.Select.LAST) { - getWidget().suggestionPopup.menu - .selectLastItem(); + getWidget().suggestionPopup.menu.selectLastItem(); } else { - getWidget().suggestionPopup.menu - .selectFirstItem(); + getWidget().suggestionPopup.menu.selectFirstItem(); } // This is used for paging so we update the keyboard selection @@ -203,8 +191,7 @@ public class ComboBoxConnector extends AbstractComponentConnector implements .setKeyboardSelectedItem(activeMenuItem); // Update text field to contain the correct text - getWidget() - .setTextboxText(activeMenuItem.getText()); + getWidget().setTextboxText(activeMenuItem.getText()); getWidget().tb.setSelectionRange( getWidget().lastFilter.length(), activeMenuItem.getText().length() @@ -219,8 +206,7 @@ public class ComboBoxConnector extends AbstractComponentConnector implements } // Calculate minumum textarea width - getWidget().suggestionPopupMinWidth = getWidget() - .minWidth(captions); + getWidget().suggestionPopupMinWidth = getWidget().minWidth(captions); getWidget().popupOpenerClicked = false; diff --git a/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java index 0cbe58b4fd..4c244722af 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/CssLayoutConnector.java @@ -10,9 +10,9 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class CssLayoutConnector extends AbstractComponentContainerConnector { diff --git a/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java index 3b84c700e3..68593ab281 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/CustomComponentConnector.java @@ -6,9 +6,9 @@ package com.vaadin.terminal.gwt.client.ui; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; +import com.vaadin.terminal.gwt.client.UIDL; public class CustomComponentConnector extends AbstractComponentContainerConnector { diff --git a/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java index 1f1422415f..2f2021ecd6 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java @@ -11,8 +11,8 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.UIDL; public class CustomLayoutConnector extends AbstractComponentContainerConnector implements SimpleManagedLayout { @@ -91,7 +91,6 @@ public class CustomLayoutConnector extends AbstractComponentContainerConnector } public void layout() { - getWidget().iLayoutJS( - DOM.getFirstChild(getWidget().getElement())); + getWidget().iLayoutJS(DOM.getFirstChild(getWidget().getElement())); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/EmbeddedConnector.java b/src/com/vaadin/terminal/gwt/client/ui/EmbeddedConnector.java index df7eb2528c..912f11f0aa 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/EmbeddedConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/EmbeddedConnector.java @@ -45,12 +45,10 @@ public class EmbeddedConnector extends AbstractComponentConnector { if (uidl.hasAttribute("type")) { getWidget().type = uidl.getStringAttribute("type"); if (getWidget().type.equals("image")) { - getWidget().addStyleName( - VEmbedded.CLASSNAME + "-image"); + getWidget().addStyleName(VEmbedded.CLASSNAME + "-image"); Element el = null; boolean created = false; - NodeList nodes = getWidget().getElement() - .getChildNodes(); + NodeList nodes = getWidget().getElement().getChildNodes(); if (nodes != null && nodes.getLength() == 1) { Node n = nodes.getItem(0); if (n.getNodeType() == Node.ELEMENT_NODE) { @@ -72,8 +70,8 @@ public class EmbeddedConnector extends AbstractComponentConnector { style.setProperty("width", getState().getWidth()); style.setProperty("height", getState().getHeight()); - DOM.setElementProperty(el, "src", getWidget() - .getSrc(uidl, client)); + DOM.setElementProperty(el, "src", + getWidget().getSrc(uidl, client)); if (created) { // insert in dom late @@ -87,36 +85,31 @@ public class EmbeddedConnector extends AbstractComponentConnector { getWidget().sinkEvents(VTooltip.TOOLTIP_EVENTS); } else if (getWidget().type.equals("browser")) { - getWidget().addStyleName( - VEmbedded.CLASSNAME + "-browser"); + getWidget().addStyleName(VEmbedded.CLASSNAME + "-browser"); if (getWidget().browserElement == null) { getWidget().setHTML( ""); - getWidget().browserElement = DOM - .getFirstChild(getWidget().getElement()); + getWidget().browserElement = DOM.getFirstChild(getWidget() + .getElement()); } - DOM.setElementAttribute(getWidget().browserElement, - "src", getWidget().getSrc(uidl, client)); + DOM.setElementAttribute(getWidget().browserElement, "src", + getWidget().getSrc(uidl, client)); clearBrowserElement = false; } else { - VConsole.log("Unknown Embedded type '" - + getWidget().type + "'"); + VConsole.log("Unknown Embedded type '" + getWidget().type + "'"); } } else if (uidl.hasAttribute("mimetype")) { final String mime = uidl.getStringAttribute("mimetype"); if (mime.equals("application/x-shockwave-flash")) { // Handle embedding of Flash - getWidget().addStyleName( - VEmbedded.CLASSNAME + "-flash"); - getWidget().setHTML( - getWidget().createFlashEmbed(uidl)); + getWidget().addStyleName(VEmbedded.CLASSNAME + "-flash"); + getWidget().setHTML(getWidget().createFlashEmbed(uidl)); } else if (mime.equals("image/svg+xml")) { - getWidget().addStyleName( - VEmbedded.CLASSNAME + "-svg"); + getWidget().addStyleName(VEmbedded.CLASSNAME + "-svg"); String data; Map parameters = VEmbedded.getParameters(uidl); if (parameters.get("data") == null) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java b/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java index 0665ec4401..2e34781228 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/FormConnector.java @@ -8,12 +8,12 @@ import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; +import com.vaadin.terminal.gwt.client.UIDL; -public class FormConnector extends AbstractComponentContainerConnector implements - SimpleManagedLayout { +public class FormConnector extends AbstractComponentContainerConnector + implements SimpleManagedLayout { @Override public void init() { @@ -38,8 +38,7 @@ public class FormConnector extends AbstractComponentContainerConnector implement boolean legendEmpty = true; if (getState().getCaption() != null) { - getWidget().caption.setInnerText(getState() - .getCaption()); + getWidget().caption.setInnerText(getState().getCaption()); legendEmpty = false; } else { getWidget().caption.setInnerText(""); @@ -47,16 +46,13 @@ public class FormConnector extends AbstractComponentContainerConnector implement if (uidl.hasAttribute(ATTRIBUTE_ICON)) { if (getWidget().icon == null) { getWidget().icon = new Icon(client); - getWidget().legend - .insertFirst(getWidget().icon.getElement()); + getWidget().legend.insertFirst(getWidget().icon.getElement()); } - getWidget().icon.setUri(uidl - .getStringAttribute(ATTRIBUTE_ICON)); + getWidget().icon.setUri(uidl.getStringAttribute(ATTRIBUTE_ICON)); legendEmpty = false; } else { if (getWidget().icon != null) { - getWidget().legend - .removeChild(getWidget().icon.getElement()); + getWidget().legend.removeChild(getWidget().icon.getElement()); } } if (legendEmpty) { @@ -74,18 +70,15 @@ public class FormConnector extends AbstractComponentContainerConnector implement } if (getState().hasDescription()) { - getWidget().desc.setInnerHTML(getState() - .getDescription()); + getWidget().desc.setInnerHTML(getState().getDescription()); if (getWidget().desc.getParentElement() == null) { - getWidget().fieldSet.insertAfter( - getWidget().desc, + getWidget().fieldSet.insertAfter(getWidget().desc, getWidget().legend); } } else { getWidget().desc.setInnerHTML(""); if (getWidget().desc.getParentElement() != null) { - getWidget().fieldSet - .removeChild(getWidget().desc); + getWidget().fieldSet.removeChild(getWidget().desc); } } @@ -124,16 +117,14 @@ public class FormConnector extends AbstractComponentContainerConnector implement if (getWidget().lo == null) { // Layout not rendered before getWidget().lo = newLayoutWidget; - getWidget().add(newLayoutWidget, - getWidget().fieldContainer); + getWidget().add(newLayoutWidget, getWidget().fieldContainer); } else if (getWidget().lo != newLayoutWidget) { // Layout has changed client.unregisterPaintable(ConnectorMap.get(getConnection()) .getConnector(getWidget().lo)); getWidget().remove(getWidget().lo); getWidget().lo = newLayoutWidget; - getWidget().add(newLayoutWidget, - getWidget().fieldContainer); + getWidget().add(newLayoutWidget, getWidget().fieldContainer); } newLayout.updateFromUIDL(layoutUidl, client); @@ -149,11 +140,9 @@ public class FormConnector extends AbstractComponentContainerConnector implement getWidget().shortcutHandler = new ShortcutActionHandler( getId(), client); getWidget().keyDownRegistration = getWidget() - .addDomHandler(getWidget(), - KeyDownEvent.getType()); + .addDomHandler(getWidget(), KeyDownEvent.getType()); } - getWidget().shortcutHandler - .updateActionMap(childUidl); + getWidget().shortcutHandler.updateActionMap(childUidl); } } else if (getWidget().shortcutHandler != null) { getWidget().keyDownRegistration.removeHandler(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java index df658aa2c0..598c8023de 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/FormLayoutConnector.java @@ -6,8 +6,8 @@ package com.vaadin.terminal.gwt.client.ui; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.UIDL; public class FormLayoutConnector extends AbstractComponentContainerConnector { @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java index f3b4ef4d64..d551552d24 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/GridLayoutConnector.java @@ -13,12 +13,12 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.DirectionalManagedLayout; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.VGridLayout.Cell; import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; @@ -127,8 +127,7 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector public void updateCaption(ComponentConnector paintable, UIDL uidl) { VGridLayout layout = getWidget(); if (VCaption.isNeeded(uidl, paintable.getState())) { - Cell cell = layout.widgetToCell.get(paintable - .getWidget()); + Cell cell = layout.widgetToCell.get(paintable.getWidget()); VLayoutSlot layoutSlot = cell.slot; VCaption caption = layoutSlot.getCaption(); if (caption == null) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/InlineDateFieldConnector.java b/src/com/vaadin/terminal/gwt/client/ui/InlineDateFieldConnector.java index 9e8dd14100..1c6773a7da 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/InlineDateFieldConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/InlineDateFieldConnector.java @@ -19,18 +19,15 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector { @SuppressWarnings("deprecation") public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { super.updateFromUIDL(uidl, client); - getWidget().calendarPanel - .setShowISOWeekNumbers(getWidget() - .isShowISOWeekNumbers()); - getWidget().calendarPanel - .setDateTimeService(getWidget() - .getDateTimeService()); - getWidget().calendarPanel - .setResolution(getWidget().getCurrentResolution()); + getWidget().calendarPanel.setShowISOWeekNumbers(getWidget() + .isShowISOWeekNumbers()); + getWidget().calendarPanel.setDateTimeService(getWidget() + .getDateTimeService()); + getWidget().calendarPanel.setResolution(getWidget() + .getCurrentResolution()); Date currentDate = getWidget().getCurrentDate(); if (currentDate != null) { - getWidget().calendarPanel.setDate(new Date(currentDate - .getTime())); + getWidget().calendarPanel.setDate(new Date(currentDate.getTime())); } else { getWidget().calendarPanel.setDate(null); } @@ -44,8 +41,8 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector { // date currently null, use the value from // calendarPanel // (~ client time at the init of the widget) - d = (Date) getWidget().calendarPanel - .getDate().clone(); + d = (Date) getWidget().calendarPanel.getDate() + .clone(); } d.setHours(hour); d.setMinutes(min); @@ -73,8 +70,7 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector { */ date2.setYear(date.getYear()); date2.setMonth(date.getMonth()); - getWidget().calendarPanel - .setDate(date2); + getWidget().calendarPanel.setDate(date2); /* * Then update the value from panel to server */ diff --git a/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java index 8dcdcc766b..cfcbb51042 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java +++ b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java @@ -9,9 +9,9 @@ import java.util.Map; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.user.client.Element; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; +import com.vaadin.terminal.gwt.client.MouseEventDetails; public abstract class LayoutClickEventHandler extends ClickEventHandler { @@ -25,8 +25,8 @@ public abstract class LayoutClickEventHandler extends ClickEventHandler { @Override protected void fireClick(NativeEvent event) { ApplicationConnection client = getApplicationConnection(); - String pid = ConnectorMap.get(getApplicationConnection()).getConnectorId( - paintable); + String pid = ConnectorMap.get(getApplicationConnection()) + .getConnectorId(paintable); MouseEventDetails mouseDetails = new MouseEventDetails(event, getRelativeToElement()); diff --git a/src/com/vaadin/terminal/gwt/client/ui/LinkConnector.java b/src/com/vaadin/terminal/gwt/client/ui/LinkConnector.java index 1cd70371bb..9d23053a5b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/LinkConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/LinkConnector.java @@ -34,14 +34,12 @@ public class LinkConnector extends AbstractComponentConnector { if (uidl.hasAttribute("name")) { getWidget().target = uidl.getStringAttribute("name"); - getWidget().anchor.setAttribute("target", - getWidget().target); + getWidget().anchor.setAttribute("target", getWidget().target); } if (uidl.hasAttribute("src")) { getWidget().src = client.translateVaadinUri(uidl .getStringAttribute("src")); - getWidget().anchor.setAttribute("href", - getWidget().src); + getWidget().anchor.setAttribute("href", getWidget().src); } if (uidl.hasAttribute("border")) { @@ -54,41 +52,35 @@ public class LinkConnector extends AbstractComponentConnector { getWidget().borderStyle = VLink.BORDER_STYLE_DEFAULT; } - getWidget().targetHeight = uidl - .hasAttribute("targetHeight") ? uidl + getWidget().targetHeight = uidl.hasAttribute("targetHeight") ? uidl .getIntAttribute("targetHeight") : -1; getWidget().targetWidth = uidl.hasAttribute("targetWidth") ? uidl .getIntAttribute("targetWidth") : -1; // Set link caption - getWidget().captionElement.setInnerText(getState() - .getCaption()); + getWidget().captionElement.setInnerText(getState().getCaption()); // handle error if (uidl.hasAttribute("error")) { if (getWidget().errorIndicatorElement == null) { getWidget().errorIndicatorElement = DOM.createDiv(); - DOM.setElementProperty( - getWidget().errorIndicatorElement, + DOM.setElementProperty(getWidget().errorIndicatorElement, "className", "v-errorindicator"); } DOM.insertChild(getWidget().getElement(), getWidget().errorIndicatorElement, 0); } else if (getWidget().errorIndicatorElement != null) { - DOM.setStyleAttribute( - getWidget().errorIndicatorElement, "display", + DOM.setStyleAttribute(getWidget().errorIndicatorElement, "display", "none"); } if (uidl.hasAttribute(ATTRIBUTE_ICON)) { if (getWidget().icon == null) { getWidget().icon = new Icon(client); - getWidget().anchor.insertBefore( - getWidget().icon.getElement(), + getWidget().anchor.insertBefore(getWidget().icon.getElement(), getWidget().captionElement); } - getWidget().icon.setUri(uidl - .getStringAttribute(ATTRIBUTE_ICON)); + getWidget().icon.setUri(uidl.getStringAttribute(ATTRIBUTE_ICON)); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/MenuBarConnector.java b/src/com/vaadin/terminal/gwt/client/ui/MenuBarConnector.java index 873f995962..3000445a88 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/MenuBarConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/MenuBarConnector.java @@ -73,10 +73,8 @@ public class MenuBarConnector extends AbstractComponentConnector implements getWidget().moreItem.setHTML(itemHTML.toString()); getWidget().moreItem.setCommand(VMenuBar.emptyCommand); - getWidget().collapsedRootItems = new VMenuBar(true, - getWidget()); - getWidget().moreItem - .setSubMenu(getWidget().collapsedRootItems); + getWidget().collapsedRootItems = new VMenuBar(true, getWidget()); + getWidget().moreItem.setSubMenu(getWidget().collapsedRootItems); getWidget().moreItem.addStyleName(VMenuBar.CLASSNAME + "-more-menuitem"); } @@ -106,8 +104,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements // item's id-number cmd = new Command() { public void execute() { - getWidget().hostReference - .onMenuClick(itemId); + getWidget().hostReference.onMenuClick(itemId); } }; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java index 27f0f5adb0..8673ffd93e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java @@ -11,9 +11,9 @@ import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class PanelConnector extends AbstractComponentContainerConnector implements SimpleManagedLayout, PostLayoutListener { @@ -57,12 +57,10 @@ public class PanelConnector extends AbstractComponentContainerConnector // Affects size calculations // Restore default stylenames - getWidget().contentNode.setClassName(VPanel.CLASSNAME - + "-content"); - getWidget().bottomDecoration - .setClassName(VPanel.CLASSNAME + "-deco"); - getWidget().captionNode.setClassName(VPanel.CLASSNAME - + "-caption"); + getWidget().contentNode.setClassName(VPanel.CLASSNAME + "-content"); + getWidget().bottomDecoration.setClassName(VPanel.CLASSNAME + + "-deco"); + getWidget().captionNode.setClassName(VPanel.CLASSNAME + "-caption"); boolean hasCaption = false; if (getState().getCaption() != null && !"".equals(getState().getCaption())) { @@ -70,8 +68,8 @@ public class PanelConnector extends AbstractComponentContainerConnector hasCaption = true; } else { getWidget().setCaption(""); - getWidget().captionNode - .setClassName(VPanel.CLASSNAME + "-nocaption"); + getWidget().captionNode.setClassName(VPanel.CLASSNAME + + "-nocaption"); } // Add proper stylenames for all elements. This way we can prevent @@ -118,8 +116,7 @@ public class PanelConnector extends AbstractComponentContainerConnector if (getWidget().layout != null) { client.unregisterPaintable(getWidget().layout); } - getWidget() - .setWidget(newLayout.getWidget()); + getWidget().setWidget(newLayout.getWidget()); getWidget().layout = newLayout; } getWidget().layout.updateFromUIDL(layoutUidl, client); @@ -134,8 +131,7 @@ public class PanelConnector extends AbstractComponentContainerConnector getWidget().shortcutHandler = new ShortcutActionHandler( getId(), client); } - getWidget().shortcutHandler - .updateActionMap(childUidl); + getWidget().shortcutHandler.updateActionMap(childUidl); } } } @@ -156,8 +152,8 @@ public class PanelConnector extends AbstractComponentContainerConnector // And apply tab index if (uidl.hasVariable("tabindex")) { - getWidget().contentNode.setTabIndex(uidl - .getIntVariable("tabindex")); + getWidget().contentNode + .setTabIndex(uidl.getIntVariable("tabindex")); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java b/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java index 9211f50722..328aa0aa6d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/PopupViewConnector.java @@ -6,10 +6,10 @@ package com.vaadin.terminal.gwt.client.ui; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.VCaptionWrapper; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class PopupViewConnector extends AbstractComponentContainerConnector { @@ -67,9 +67,8 @@ public class PopupViewConnector extends AbstractComponentContainerConnector { } getWidget().popup.setStyleName(styleBuf.toString()); } else { - getWidget().popup - .setStyleName(getWidget().popup - .getStylePrimaryName()); + getWidget().popup.setStyleName(getWidget().popup + .getStylePrimaryName()); } getWidget().showPopup(getWidget().popup); @@ -82,15 +81,12 @@ public class PopupViewConnector extends AbstractComponentContainerConnector { public void updateCaption(ComponentConnector component, UIDL uidl) { if (VCaption.isNeeded(uidl, component.getState())) { if (getWidget().popup.captionWrapper != null) { - getWidget().popup.captionWrapper - .updateCaption(uidl); + getWidget().popup.captionWrapper.updateCaption(uidl); } else { getWidget().popup.captionWrapper = new VCaptionWrapper( component, getConnection()); - getWidget().popup - .setWidget(getWidget().popup.captionWrapper); - getWidget().popup.captionWrapper - .updateCaption(uidl); + getWidget().popup.setWidget(getWidget().popup.captionWrapper); + getWidget().popup.captionWrapper.updateCaption(uidl); } } else { if (getWidget().popup.captionWrapper != null) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/ProgressIndicatorConnector.java b/src/com/vaadin/terminal/gwt/client/ui/ProgressIndicatorConnector.java index 1d48bf6017..eda691e357 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ProgressIndicatorConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ProgressIndicatorConnector.java @@ -25,8 +25,7 @@ public class ProgressIndicatorConnector extends AbstractComponentConnector { // Save details getWidget().client = client; - getWidget().indeterminate = uidl - .getBooleanAttribute("indeterminate"); + getWidget().indeterminate = uidl.getBooleanAttribute("indeterminate"); if (getWidget().indeterminate) { String basename = VProgressIndicator.CLASSNAME + "-indeterminate"; @@ -41,17 +40,15 @@ public class ProgressIndicatorConnector extends AbstractComponentConnector { final float f = Float.parseFloat(uidl .getStringAttribute("state")); final int size = Math.round(100 * f); - DOM.setStyleAttribute(getWidget().indicator, - "width", size + "%"); + DOM.setStyleAttribute(getWidget().indicator, "width", size + + "%"); } catch (final Exception e) { } } if (!getState().isDisabled()) { - getWidget().interval = uidl - .getIntAttribute("pollinginterval"); - getWidget().poller - .scheduleRepeating(getWidget().interval); + getWidget().interval = uidl.getIntAttribute("pollinginterval"); + getWidget().poller.scheduleRepeating(getWidget().interval); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java b/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java index d2473cae21..37e9ab4a69 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java @@ -17,9 +17,9 @@ import com.google.gwt.user.client.ui.KeyboardListener; import com.google.gwt.user.client.ui.KeyboardListenerCollection; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea; /** @@ -49,9 +49,9 @@ public class ShortcutActionHandler { } /** - * A focusable {@link ComponentConnector} implementing this interface will be - * notified before shortcut actions are handled if it will be the target of - * the action (most commonly means it is the focused component during the + * A focusable {@link ComponentConnector} implementing this interface will + * be notified before shortcut actions are handled if it will be the target + * of the action (most commonly means it is the focused component during the * keyboard combination is triggered by the user). */ public interface BeforeShortcutActionListener extends ComponentConnector { diff --git a/src/com/vaadin/terminal/gwt/client/ui/SimpleManagedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/SimpleManagedLayout.java index e8ab688db0..9ccb29a750 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/SimpleManagedLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/SimpleManagedLayout.java @@ -3,7 +3,6 @@ */ package com.vaadin.terminal.gwt.client.ui; - public interface SimpleManagedLayout extends ManagedLayout { public void layout(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/SliderConnector.java b/src/com/vaadin/terminal/gwt/client/ui/SliderConnector.java index d1fac2ecbe..b854aae818 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/SliderConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/SliderConnector.java @@ -34,18 +34,15 @@ public class SliderConnector extends AbstractComponentConnector { String style = getState().getStyle(); if (getWidget().vertical) { - getWidget().addStyleName( - VSlider.CLASSNAME + "-vertical"); + getWidget().addStyleName(VSlider.CLASSNAME + "-vertical"); } else { - getWidget().removeStyleName( - VSlider.CLASSNAME + "-vertical"); + getWidget().removeStyleName(VSlider.CLASSNAME + "-vertical"); } getWidget().min = uidl.getDoubleAttribute("min"); getWidget().max = uidl.getDoubleAttribute("max"); getWidget().resolution = uidl.getIntAttribute("resolution"); - getWidget().value = new Double( - uidl.getDoubleVariable("value")); + getWidget().value = new Double(uidl.getDoubleVariable("value")); getWidget().setFeedbackValue(getWidget().value); @@ -56,14 +53,12 @@ public class SliderConnector extends AbstractComponentConnector { Scheduler.get().scheduleDeferred(new Command() { public void execute() { getWidget().buildHandle(); - getWidget().setValue( - getWidget().value, false); + getWidget().setValue(getWidget().value, false); } }); } else { getWidget().buildHandle(); - getWidget().setValue(getWidget().value, - false); + getWidget().setValue(getWidget().value, false); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java index df762ef24e..1a5b535da3 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/TableConnector.java @@ -10,10 +10,10 @@ import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.DirectionalManagedLayout; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class TableConnector extends AbstractComponentContainerConnector implements DirectionalManagedLayout { @@ -44,12 +44,10 @@ public class TableConnector extends AbstractComponentContainerConnector * the space available. */ if (uidl.hasAttribute("colfooters")) { - getWidget().showColFooters = uidl - .getBooleanAttribute("colfooters"); + getWidget().showColFooters = uidl.getBooleanAttribute("colfooters"); } - getWidget().tFoot - .setVisible(getWidget().showColFooters); + getWidget().tFoot.setVisible(getWidget().showColFooters); super.updateFromUIDL(uidl, client); if (!isRealUpdate(uidl)) { @@ -84,8 +82,7 @@ public class TableConnector extends AbstractComponentContainerConnector getWidget().updateSelectionProperties(uidl, getState()); if (uidl.hasAttribute("alb")) { - getWidget().bodyActionKeys = uidl - .getStringArrayAttribute("alb"); + getWidget().bodyActionKeys = uidl.getStringArrayAttribute("alb"); } else { // Need to clear the actions if the action handlers have been // removed @@ -94,8 +91,7 @@ public class TableConnector extends AbstractComponentContainerConnector getWidget().setCacheRateFromUIDL(uidl); - getWidget().recalcWidths = uidl - .hasAttribute("recalcWidths"); + getWidget().recalcWidths = uidl.hasAttribute("recalcWidths"); if (getWidget().recalcWidths) { getWidget().tHead.clear(); getWidget().tFoot.clear(); @@ -105,10 +101,8 @@ public class TableConnector extends AbstractComponentContainerConnector getWidget().updateFirstVisibleAndScrollIfNeeded(uidl); - getWidget().showRowHeaders = uidl - .getBooleanAttribute("rowheaders"); - getWidget().showColHeaders = uidl - .getBooleanAttribute("colheaders"); + getWidget().showRowHeaders = uidl.getBooleanAttribute("rowheaders"); + getWidget().showColHeaders = uidl.getBooleanAttribute("colheaders"); getWidget().updateSortingProperties(uidl); @@ -152,10 +146,8 @@ public class TableConnector extends AbstractComponentContainerConnector uidl.getIntAttribute("firstrow"), uidl.getIntAttribute("rows")); if (getWidget().headerChangedDuringUpdate) { - getWidget().triggerLazyColumnAdjustment( - true); - } else if (!getWidget() - .isScrollPositionVisible() + getWidget().triggerLazyColumnAdjustment(true); + } else if (!getWidget().isScrollPositionVisible() || totalRowsChanged || getWidget().lastRenderedHeight != getWidget().scrollBody .getOffsetHeight()) { @@ -180,12 +172,11 @@ public class TableConnector extends AbstractComponentContainerConnector } if (!getWidget().isSelectable()) { - getWidget().scrollBody - .addStyleName(VScrollTable.CLASSNAME + "-body-noselection"); + getWidget().scrollBody.addStyleName(VScrollTable.CLASSNAME + + "-body-noselection"); } else { - getWidget().scrollBody - .removeStyleName(VScrollTable.CLASSNAME - + "-body-noselection"); + getWidget().scrollBody.removeStyleName(VScrollTable.CLASSNAME + + "-body-noselection"); } getWidget().hideScrollPositionAnnotation(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/TextFieldConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TextFieldConnector.java index ae2b9253c1..598bc05e19 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/TextFieldConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/TextFieldConnector.java @@ -38,8 +38,8 @@ public class TextFieldConnector extends AbstractComponentConnector implements getWidget().immediate = getState().isImmediate(); - getWidget().listenTextChangeEvents = client - .hasEventListeners(this, "ie"); + getWidget().listenTextChangeEvents = client.hasEventListeners(this, + "ie"); if (getWidget().listenTextChangeEvents) { getWidget().textChangeEventMode = uidl .getStringAttribute(VTextField.ATTR_TEXTCHANGE_EVENTMODE); @@ -56,8 +56,7 @@ public class TextFieldConnector extends AbstractComponentConnector implements } } getWidget().sinkEvents(VTextField.TEXTCHANGE_EVENTS); - getWidget().attachCutEventListener( - getWidget().getElement()); + getWidget().attachCutEventListener(getWidget().getElement()); } if (uidl.hasAttribute("cols")) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/TextualDateConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TextualDateConnector.java index bb833dcaf5..40fb72a88b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/TextualDateConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/TextualDateConnector.java @@ -22,8 +22,7 @@ public class TextualDateConnector extends AbstractDateFieldConnector { getWidget().formatStr = null; } if (uidl.hasAttribute("format")) { - getWidget().formatStr = uidl - .getStringAttribute("format"); + getWidget().formatStr = uidl.getStringAttribute("format"); } getWidget().inputPrompt = uidl @@ -34,8 +33,7 @@ public class TextualDateConnector extends AbstractDateFieldConnector { getWidget().buildDate(); // not a FocusWidget -> needs own tabindex handling if (uidl.hasAttribute("tabindex")) { - getWidget().text.setTabIndex(uidl - .getIntAttribute("tabindex")); + getWidget().text.setTabIndex(uidl.getIntAttribute("tabindex")); } if (getWidget().readonly) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/TreeConnector.java b/src/com/vaadin/terminal/gwt/client/ui/TreeConnector.java index 1b88c63b74..9b16e76a49 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/TreeConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/TreeConnector.java @@ -53,8 +53,7 @@ public class TreeConnector extends AbstractComponentConnector { .getBooleanAttribute("nullselect"); if (uidl.hasAttribute("alb")) { - getWidget().bodyActionKeys = uidl - .getStringArrayAttribute("alb"); + getWidget().bodyActionKeys = uidl.getStringArrayAttribute("alb"); } getWidget().body.clear(); @@ -91,21 +90,19 @@ public class TreeConnector extends AbstractComponentConnector { .getIntAttribute("multiselectmode"); } - getWidget().selectedIds = uidl - .getStringArrayVariableAsSet("selected"); + getWidget().selectedIds = uidl.getStringArrayVariableAsSet("selected"); // Update lastSelection and focusedNode to point to *actual* nodes again // after the old ones have been cleared from the body. This fixes focus // and keyboard navigation issues as described in #7057 and other // tickets. if (getWidget().lastSelection != null) { - getWidget().lastSelection = getWidget() - .getNodeByKey(getWidget().lastSelection.key); + getWidget().lastSelection = getWidget().getNodeByKey( + getWidget().lastSelection.key); } if (getWidget().focusedNode != null) { getWidget().setFocusedNode( - getWidget().getNodeByKey( - getWidget().focusedNode.key)); + getWidget().getNodeByKey(getWidget().focusedNode.key)); } if (getWidget().lastSelection == null @@ -113,8 +110,7 @@ public class TreeConnector extends AbstractComponentConnector { && !getWidget().selectedIds.isEmpty()) { getWidget().setFocusedNode( getWidget().getNodeByKey( - getWidget().selectedIds.iterator() - .next())); + getWidget().selectedIds.iterator().next())); getWidget().focusedNode.setFocused(false); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java index ae8ab78252..3af42e9572 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/UnknownComponentConnector.java @@ -36,8 +36,7 @@ public class UnknownComponentConnector extends AbstractComponentConnector { getWidget().uidlTree.removeFromParent(); } - getWidget().uidlTree = new VUIDLBrowser(uidl, - client.getConfiguration()); + getWidget().uidlTree = new VUIDLBrowser(uidl, client.getConfiguration()); getWidget().uidlTree.open(true); getWidget().uidlTree.setText("Unrendered UIDL"); getWidget().panel.add(getWidget().uidlTree); diff --git a/src/com/vaadin/terminal/gwt/client/ui/UploadConnector.java b/src/com/vaadin/terminal/gwt/client/ui/UploadConnector.java index 1a98c84c91..db94387525 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/UploadConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/UploadConnector.java @@ -39,8 +39,7 @@ public class UploadConnector extends AbstractComponentConnector { } else { getWidget().submitButton.setVisible(false); } - getWidget().fu.setName(getWidget().paintableId - + "_file"); + getWidget().fu.setName(getWidget().paintableId + "_file"); if (getState().isDisabled() || getState().isReadOnly()) { getWidget().disableUpload(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java index b8774ea999..48c6109f44 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java @@ -15,11 +15,11 @@ import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +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.Util; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class VAbsoluteLayout extends ComplexPanel { @@ -143,8 +143,7 @@ public class VAbsoluteLayout extends ComplexPanel { // child may need relative size adjustment if wrapper details // have changed this could be optimized (check if wrapper size // has changed) - client.handleComponentRelativeSize(paintable - .getWidget()); + client.handleComponentRelativeSize(paintable.getWidget()); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java index 13886cd621..e0c1510ae9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java @@ -15,12 +15,12 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.RenderInformation; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class VAccordion extends VTabsheetBase { @@ -411,7 +411,8 @@ public class VAccordion extends VTabsheetBase { } public void setContent(UIDL contentUidl) { - final ComponentConnector newPntbl = client.getPaintable(contentUidl); + final ComponentConnector newPntbl = client + .getPaintable(contentUidl); Widget newWidget = newPntbl.getWidget(); if (getChildWidget() == null) { add(newWidget, content); @@ -425,8 +426,7 @@ public class VAccordion extends VTabsheetBase { * The size of a cached, relative sized component must be * updated to report correct size. */ - client.handleComponentRelativeSize(newPntbl - .getWidget()); + client.handleComponentRelativeSize(newPntbl.getWidget()); } if (isOpen() && isDynamicHeight()) { setHeightFromWidget(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java b/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java index e46a74346b..692e13bd94 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VContextMenu.java @@ -44,8 +44,8 @@ public class VContextMenu extends VOverlay implements SubPartAware { private int top; - private VLazyExecutor delayedImageLoadExecutioner = new VLazyExecutor( - 100, new ScheduledCommand() { + private VLazyExecutor delayedImageLoadExecutioner = new VLazyExecutor(100, + new ScheduledCommand() { public void execute() { imagesLoaded(); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java index f2693b8f25..9c9b2a7266 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java @@ -17,13 +17,13 @@ import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.StyleConstants; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ValueMap; public class VCssLayout extends SimplePanel { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java index 5db07a1a54..36d5fe9812 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java @@ -16,12 +16,12 @@ import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +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.Util; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.VCaptionWrapper; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; /** * Custom Layout implements complex layout defined with HTML template. diff --git a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java index 813ef88636..779df5812b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java @@ -23,14 +23,14 @@ import com.google.gwt.user.client.ui.Widget; import com.google.gwt.xhr.client.ReadyStateChangeHandler; import com.google.gwt.xhr.client.XMLHttpRequest; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.Connector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.RenderInformation; import com.vaadin.terminal.gwt.client.RenderInformation.Size; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.Connector; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ValueMap; import com.vaadin.terminal.gwt.client.ui.dd.DDUtil; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java index 3233614076..537d76f2ec 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java @@ -14,11 +14,11 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.HTML; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +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.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; public class VEmbedded extends HTML { public static String CLASSNAME = "v-embedded"; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java index 466e2fa10e..303b29fe8f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java @@ -46,14 +46,14 @@ import com.google.gwt.user.client.ui.SuggestOracle.Suggestion; import com.google.gwt.user.client.ui.TextBox; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; /** diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java index be625713ef..713a0ae55f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java @@ -20,12 +20,12 @@ import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.StyleConstants; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; /** @@ -179,13 +179,11 @@ public class VFormLayout extends SimplePanel { } public void updateCaption(ComponentConnector paintable, UIDL uidl) { - final Caption c = widgetToCaption.get(paintable - .getWidget()); + final Caption c = widgetToCaption.get(paintable.getWidget()); if (c != null) { c.updateCaption(uidl, paintable.getState()); } - final ErrorFlag e = widgetToError.get(paintable - .getWidget()); + final ErrorFlag e = widgetToError.get(paintable.getWidget()); if (e != null) { e.updateFromUIDL(uidl, paintable); } @@ -234,7 +232,8 @@ public class VFormLayout extends SimplePanel { * return null * @param client */ - public Caption(ComponentConnector component, ApplicationConnection client) { + public Caption(ComponentConnector component, + ApplicationConnection client) { super(); this.client = client; owner = component; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java index dbffcc1f0b..01e1b7c8da 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java @@ -17,14 +17,14 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; import com.vaadin.terminal.gwt.client.ui.layout.ComponentConnectorLayoutSlot; +import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; public class VGridLayout extends ComplexPanel { @@ -554,7 +554,8 @@ public class VGridLayout extends ComplexPanel { ComponentConnector paintable = client.getPaintable(childUidl); if (slot == null || slot.getPaintable() != paintable) { - slot = new ComponentConnectorLayoutSlot(CLASSNAME, paintable); + slot = new ComponentConnectorLayoutSlot(CLASSNAME, + paintable); Element slotWrapper = slot.getWrapperElement(); getElement().appendChild(slotWrapper); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java index d4a1670911..181abb449d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java @@ -13,9 +13,9 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.SimplePanel; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner, diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java index ef5584861d..93ffc5baf5 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java @@ -24,13 +24,13 @@ 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.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.Container; import com.vaadin.terminal.gwt.client.RenderInformation.Size; import com.vaadin.terminal.gwt.client.RenderSpace; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaptionWrapper; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 3eff5b3829..fe4919d8ec 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -59,15 +59,15 @@ import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.TooltipInfo; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.VScrollTable.VScrollTableBody.VScrollTableRow; import com.vaadin.terminal.gwt.client.ui.dd.DDUtil; @@ -1112,8 +1112,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, void purgeUnregistryBag() { for (Iterator iterator = lazyUnregistryBag.iterator(); iterator .hasNext();) { - ConnectorMap.get(client) - .unregisterChildConnectors(iterator.next()); + ConnectorMap.get(client).unregisterChildConnectors(iterator.next()); } lazyUnregistryBag.clear(); } @@ -2266,8 +2265,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, handleCaptionEvent(event); boolean stopPropagation = true; if (event.getTypeInt() == Event.ONCONTEXTMENU - && !client.hasEventListeners( - VScrollTable.this, HEADER_CLICK_EVENT_ID)) { + && !client.hasEventListeners(VScrollTable.this, + HEADER_CLICK_EVENT_ID)) { // Prevent showing the browser's context menu only when // there is a header click listener. stopPropagation = false; @@ -4128,8 +4127,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, final VScrollTableRow toBeRemoved = (VScrollTableRow) renderedRows .get(index); // Unregister row tooltip - client.registerTooltip(VScrollTable.this, - toBeRemoved.getElement(), null); + client.registerTooltip(VScrollTable.this, toBeRemoved.getElement(), + null); for (int i = 0; i < toBeRemoved.getElement().getChildCount(); i++) { // Unregister cell tooltips Element td = toBeRemoved.getElement().getChild(i).cast(); @@ -4391,12 +4390,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, String rowDescription = uidl.getStringAttribute("rowdescr"); if (rowDescription != null && !rowDescription.equals("")) { TooltipInfo info = new TooltipInfo(rowDescription); - client.registerTooltip(VScrollTable.this, rowElement, - info); + client.registerTooltip(VScrollTable.this, rowElement, info); } else { // Remove possibly previously set tooltip - client.registerTooltip(VScrollTable.this, rowElement, - null); + client.registerTooltip(VScrollTable.this, rowElement, null); } tHead.getColumnAlignments(); @@ -4477,8 +4474,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, final ComponentConnector cellContent = client .getPaintable((UIDL) cell); - addCell(uidl, cellContent.getWidget(), - aligns[col++], style, sorted); + addCell(uidl, cellContent.getWidget(), aligns[col++], + style, sorted); paintComponent(cellContent, (UIDL) cell); } } @@ -4761,21 +4758,19 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (ConnectorMap.get(client).getWidgetTooltipInfo( VScrollTable.this, target) != null) { // Cell has description, use it - client.handleTooltipEvent(event, - VScrollTable.this, target); + client.handleTooltipEvent(event, VScrollTable.this, + target); } else { // Cell might have row description, use row // description - client.handleTooltipEvent(event, - VScrollTable.this, + client.handleTooltipEvent(event, VScrollTable.this, target.getParentElement()); } } } else { // Table row (tr) - client.handleTooltipEvent(event, VScrollTable.this, - target); + client.handleTooltipEvent(event, VScrollTable.this, target); } } @@ -4791,8 +4786,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, showContextMenu(event); if (enabled && (actionKeys != null || client - .hasEventListeners( - VScrollTable.this, + .hasEventListeners(VScrollTable.this, ITEM_CLICK_EVENT_ID))) { /* * Prevent browser context menu only if there are diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java index d213a3826f..09cdcaf324 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java @@ -13,7 +13,6 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ContainerResizedListener; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java index 3b3f581a51..5e4b76f828 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java @@ -22,13 +22,13 @@ import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.TooltipInfo; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.label.VLabel; public class VTabsheet extends VTabsheetBase { @@ -205,8 +205,7 @@ public class VTabsheet extends VTabsheetBase { if (uidl.hasAttribute(AbstractComponentConnector.ATTRIBUTE_ERROR)) { tooltipInfo.setErrorUidl(uidl.getErrors()); } - client.registerTooltip(getTabsheet(), getElement(), - tooltipInfo); + client.registerTooltip(getTabsheet(), getElement(), tooltipInfo); } else { client.registerTooltip(getTabsheet(), getElement(), null); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java index f1002165bf..910400e779 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetBase.java @@ -12,8 +12,8 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.UIDL; abstract class VTabsheetBase extends ComplexPanel { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java index dac9665675..01e5103c2e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java @@ -55,8 +55,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler, setPrompting(false); } if (getClient() != null - && getClient().hasEventListeners( - VTextualDate.this, EventId.FOCUS)) { + && getClient().hasEventListeners(VTextualDate.this, + EventId.FOCUS)) { getClient() .updateVariable(getId(), EventId.FOCUS, "", true); } @@ -73,8 +73,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler, text.setText(readonly ? "" : inputPrompt); } if (getClient() != null - && getClient().hasEventListeners( - VTextualDate.this, EventId.BLUR)) { + && getClient().hasEventListeners(VTextualDate.this, + EventId.BLUR)) { getClient().updateVariable(getId(), EventId.BLUR, "", true); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java index 7e2720c8cc..6641fe838e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java @@ -39,11 +39,11 @@ import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; +import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ConnectorMap; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.dd.DDUtil; import com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler; @@ -648,8 +648,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler, final boolean inCaption = target == nodeCaptionSpan || (icon != null && target == icon.getElement()); if (inCaption - && client.hasEventListeners(VTree.this, - ITEM_CLICK_EVENT_ID) + && client + .hasEventListeners(VTree.this, ITEM_CLICK_EVENT_ID) && (type == Event.ONDBLCLICK || type == Event.ONMOUSEUP)) { fireClick(event); diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index b9ece35179..014a016410 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -23,11 +23,11 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.SimplePanel; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; /** @@ -227,8 +227,7 @@ public class VView extends SimplePanel implements ResizeHandler, public void execute() { final ComponentConnector paintable = (ComponentConnector) uidl .getPaintableAttribute("scrollTo", connection); - paintable.getWidget().getElement() - .scrollIntoView(); + paintable.getWidget().getElement().scrollIntoView(); } }); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 48bcd4452b..4b6c7e54f4 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -28,11 +28,11 @@ import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.Console; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.Focusable; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; /** @@ -747,8 +747,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, // Update child widget dimensions if (client != null) { client.handleComponentRelativeSize(layout.getWidget()); - client.runDescendentsLayout((HasWidgets) layout - .getWidget()); + client.runDescendentsLayout((HasWidgets) layout.getWidget()); } Util.runWebkitOverflowAutoFix(contentPanel.getElement()); diff --git a/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java b/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java index 4af4c0fc77..6751d62db0 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java @@ -13,9 +13,9 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Frame; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener; public class WindowConnector extends AbstractComponentContainerConnector @@ -46,8 +46,8 @@ public class WindowConnector extends AbstractComponentContainerConnector // Workaround needed for Testing Tools (GWT generates window DOM // slightly different in different browsers). - DOM.setElementProperty(getWidget().closeBox, "id", - getWidget().id + "_window_close"); + DOM.setElementProperty(getWidget().closeBox, "id", getWidget().id + + "_window_close"); if (uidl.hasAttribute("invisible")) { getWidget().hide(); @@ -56,23 +56,19 @@ public class WindowConnector extends AbstractComponentContainerConnector if (isRealUpdate(uidl)) { if (uidl.getBooleanAttribute("modal") != getWidget().vaadinModality) { - getWidget().setVaadinModality( - !getWidget().vaadinModality); + getWidget().setVaadinModality(!getWidget().vaadinModality); } if (!getWidget().isAttached()) { getWidget().setVisible(false); // hide until - // possible centering + // possible centering getWidget().show(); } if (uidl.getBooleanAttribute("resizable") != getWidget().resizable) { - getWidget().setResizable( - !getWidget().resizable); + getWidget().setResizable(!getWidget().resizable); } - getWidget().resizeLazy = uidl - .hasAttribute(VView.RESIZE_LAZY); + getWidget().resizeLazy = uidl.hasAttribute(VView.RESIZE_LAZY); - getWidget().setDraggable( - !uidl.hasAttribute("fixedposition")); + getWidget().setDraggable(!uidl.hasAttribute("fixedposition")); // Caption must be set before required header size is measured. If // the caption attribute is missing the caption should be cleared. @@ -136,19 +132,15 @@ public class WindowConnector extends AbstractComponentContainerConnector if (getWidget().layout != lo) { // remove old client.unregisterPaintable(getWidget().layout); - getWidget().contentPanel - .remove(getWidget().layout - .getWidget()); + getWidget().contentPanel.remove(getWidget().layout.getWidget()); // add new if (!showingUrl) { - getWidget().contentPanel.setWidget(lo - .getWidget()); + getWidget().contentPanel.setWidget(lo.getWidget()); } getWidget().layout = lo; } } else if (!showingUrl) { - getWidget().contentPanel.setWidget(lo - .getWidget()); + getWidget().contentPanel.setWidget(lo.getWidget()); getWidget().layout = lo; } @@ -160,8 +152,7 @@ public class WindowConnector extends AbstractComponentContainerConnector getWidget().layoutRelativeHeight = uidl .hasAttribute("layoutRelativeHeight"); - if (getWidget().dynamicWidth - && getWidget().layoutRelativeWidth) { + if (getWidget().dynamicWidth && getWidget().layoutRelativeWidth) { /* * Relative layout width, fix window width before rendering (width * according to caption) @@ -170,8 +161,7 @@ public class WindowConnector extends AbstractComponentContainerConnector } getWidget().layout.updateFromUIDL(childUidl, client); - if (!getWidget().dynamicHeight - && getWidget().layoutRelativeWidth) { + if (!getWidget().dynamicHeight && getWidget().layoutRelativeWidth) { /* * Relative layout width, and fixed height. Must update the size to * be able to take scrollbars into account (layout gets narrower @@ -184,13 +174,11 @@ public class WindowConnector extends AbstractComponentContainerConnector * No explicit width is set and the layout does not have relative width * so fix the size according to the layout. */ - if (getWidget().dynamicWidth - && !getWidget().layoutRelativeWidth) { + if (getWidget().dynamicWidth && !getWidget().layoutRelativeWidth) { getWidget().setNaturalWidth(); } - if (getWidget().dynamicHeight - && getWidget().layoutRelativeHeight) { + if (getWidget().dynamicHeight && getWidget().layoutRelativeHeight) { // Prevent resizing until height has been fixed getWidget().resizable = false; } @@ -205,8 +193,7 @@ public class WindowConnector extends AbstractComponentContainerConnector getWidget().shortcutHandler = new ShortcutActionHandler( getId(), client); } - getWidget().shortcutHandler - .updateActionMap(childUidl); + getWidget().shortcutHandler.updateActionMap(childUidl); } } @@ -238,14 +225,12 @@ public class WindowConnector extends AbstractComponentContainerConnector getWidget().setWidth(Window.getClientWidth() + "px"); sizeReduced = true; } - if (getWidget().getOffsetHeight() > Window - .getClientHeight()) { + if (getWidget().getOffsetHeight() > Window.getClientHeight()) { getWidget().setHeight(Window.getClientHeight() + "px"); sizeReduced = true; } - if (getWidget().dynamicHeight - && getWidget().layoutRelativeHeight) { + if (getWidget().dynamicHeight && getWidget().layoutRelativeHeight) { /* * Window height is undefined, layout is 100% high so the layout * should define the initial window height but on resize the layout @@ -267,8 +252,7 @@ public class WindowConnector extends AbstractComponentContainerConnector client.runDescendentsLayout(getWidget()); } - Util.runWebkitOverflowAutoFix(getWidget().contentPanel - .getElement()); + Util.runWebkitOverflowAutoFix(getWidget().contentPanel.getElement()); client.getView().getWidget().scrollIntoView(uidl); diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java index 8ee1a721d1..f76f04b501 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java +++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java @@ -23,10 +23,10 @@ import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ValueMap; /** @@ -544,8 +544,7 @@ public class VDragAndDropManager { } private void removeActiveDragSourceStyleName(ComponentConnector dragSource) { - dragSource.getWidget().removeStyleName( - ACTIVE_DRAG_SOURCE_STYLENAME); + dragSource.getWidget().removeStyleName(ACTIVE_DRAG_SOURCE_STYLENAME); } private void clearDragElement() { diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragSourceIs.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragSourceIs.java index 22b8054c77..aabbf58b24 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragSourceIs.java +++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragSourceIs.java @@ -3,9 +3,9 @@ */ package com.vaadin.terminal.gwt.client.ui.dd; +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.ComponentConnector; /** * TODO Javadoc! @@ -17,7 +17,8 @@ final public class VDragSourceIs extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { try { - ComponentConnector component = drag.getTransferable().getDragSource(); + ComponentConnector component = drag.getTransferable() + .getDragSource(); int c = configuration.getIntAttribute("c"); for (int i = 0; i < c; i++) { String requiredPid = configuration diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VIsOverId.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VIsOverId.java index 3a52daf63d..7938016f50 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/dd/VIsOverId.java +++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VIsOverId.java @@ -6,9 +6,9 @@ */ package com.vaadin.terminal.gwt.client.ui.dd; +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.ComponentConnector; final public class VIsOverId extends VAcceptCriterion { diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VItemIdIs.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VItemIdIs.java index adf1859013..de9988c4ac 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/dd/VItemIdIs.java +++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VItemIdIs.java @@ -6,9 +6,9 @@ */ package com.vaadin.terminal.gwt.client.ui.dd; +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.ComponentConnector; final public class VItemIdIs extends VAcceptCriterion { @@ -21,8 +21,8 @@ final public class VItemIdIs extends VAcceptCriterion { VDropHandler currentDropHandler = VDragAndDropManager.get() .getCurrentDropHandler(); String pid2 = ConnectorMap.get( - currentDropHandler.getApplicationConnection()).getConnectorId( - dragSource); + currentDropHandler.getApplicationConnection()) + .getConnectorId(dragSource); if (pid2.equals(pid)) { Object searchedId = drag.getTransferable().getData("itemId"); String[] stringArrayAttribute = configuration diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VSourceIsTarget.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VSourceIsTarget.java index 0882d1431d..0fc5f6c7e2 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/dd/VSourceIsTarget.java +++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VSourceIsTarget.java @@ -14,8 +14,8 @@ final public class VSourceIsTarget extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { ComponentConnector dragSource = drag.getTransferable().getDragSource(); - ComponentConnector paintable = VDragAndDropManager.get().getCurrentDropHandler() - .getPaintable(); + ComponentConnector paintable = VDragAndDropManager.get() + .getCurrentDropHandler().getPaintable(); return paintable == dragSource; } diff --git a/src/com/vaadin/terminal/gwt/client/ui/label/VLabel.java b/src/com/vaadin/terminal/gwt/client/ui/label/VLabel.java index bc2e27db0b..f47b8437b7 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/label/VLabel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/label/VLabel.java @@ -16,7 +16,7 @@ public class VLabel extends HTML { public static final String CLASSNAME = "v-label"; private static final String CLASSNAME_UNDEFINED_WIDTH = "v-label-undef-w"; - + private ApplicationConnection connection; public VLabel() { diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/ComponentConnectorLayoutSlot.java b/src/com/vaadin/terminal/gwt/client/ui/layout/ComponentConnectorLayoutSlot.java index 33210b69f8..5df2eb7488 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/layout/ComponentConnectorLayoutSlot.java +++ b/src/com/vaadin/terminal/gwt/client/ui/layout/ComponentConnectorLayoutSlot.java @@ -3,9 +3,9 @@ */ package com.vaadin.terminal.gwt.client.ui.layout; +import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.VCaption; -import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ui.ManagedLayout; public class ComponentConnectorLayoutSlot extends VLayoutSlot { @@ -13,7 +13,8 @@ public class ComponentConnectorLayoutSlot extends VLayoutSlot { final ComponentConnector paintable; private LayoutManager layoutManager; - public ComponentConnectorLayoutSlot(String baseClassName, ComponentConnector paintable) { + public ComponentConnectorLayoutSlot(String baseClassName, + ComponentConnector paintable) { super(baseClassName, paintable.getWidget()); this.paintable = paintable; layoutManager = paintable.getLayoutManager(); @@ -55,14 +56,12 @@ public class ComponentConnectorLayoutSlot extends VLayoutSlot { @Override public int getWidgetHeight() { - return layoutManager.getOuterHeight(paintable.getWidget() - .getElement()); + return layoutManager.getOuterHeight(paintable.getWidget().getElement()); } @Override public int getWidgetWidth() { - return layoutManager.getOuterWidth(paintable.getWidget() - .getElement()); + return layoutManager.getOuterWidth(paintable.getWidget().getElement()); } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextArea.java b/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextArea.java index 56f3ca42f9..eb062a3799 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextArea.java +++ b/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextArea.java @@ -26,8 +26,8 @@ import com.google.gwt.user.client.ui.RichTextArea; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; -import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.ConnectorMap; +import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.ui.Field; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java index 9ce2dfd6be..c52b6fad6a 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java @@ -78,8 +78,8 @@ import com.vaadin.ui.Root; * A server side component sends its state to the client in a paint request (see * {@link Paintable} and {@link PaintTarget} on the server side). The client * widget receives these paint requests as calls to - * {@link com.vaadin.terminal.gwt.client.ComponentConnector#updateFromUIDL()}. The - * client component communicates back to the server by sending a list of + * {@link com.vaadin.terminal.gwt.client.ComponentConnector#updateFromUIDL()}. + * The client component communicates back to the server by sending a list of * variable changes (see {@link ApplicationConnection#updateVariable()} and * {@link VariableOwner#changeVariables(Object, Map)}). * diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java index 5c5ae10b1a..bec4e415ee 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java @@ -18,17 +18,17 @@ import com.google.gwt.core.ext.typeinfo.TypeOracle; import com.google.gwt.user.rebind.ClassSourceFileComposerFactory; import com.google.gwt.user.rebind.SourceWriter; import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.communication.MethodInvocation; import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.ServerRpc.InitializableClientToServerRpc; -import com.vaadin.terminal.gwt.client.communication.MethodInvocation; /** * GWT generator that creates client side proxy classes for making RPC calls * from the client to the server. * - * GWT.create() calls for interfaces extending {@link ServerRpc} are - * affected, and a proxy implementation is created. Note that the init(...) - * method of the proxy must be called before the proxy is used. + * GWT.create() calls for interfaces extending {@link ServerRpc} are affected, + * and a proxy implementation is created. Note that the init(...) method of the + * proxy must be called before the proxy is used. * * @since 7.0 */ diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java index d06c4ce28e..109c202909 100644 --- a/src/com/vaadin/ui/AbstractField.java +++ b/src/com/vaadin/ui/AbstractField.java @@ -179,8 +179,8 @@ public abstract class AbstractField extends AbstractComponent implements // Hide the error indicator if needed if (shouldHideErrors()) { - target.addAttribute(AbstractComponentConnector.ATTRIBUTE_HIDEERRORS, - true); + target.addAttribute( + AbstractComponentConnector.ATTRIBUTE_HIDEERRORS, true); } } diff --git a/src/com/vaadin/ui/AbstractOrderedLayout.java b/src/com/vaadin/ui/AbstractOrderedLayout.java index fc3ef5056d..8bba9fc46d 100644 --- a/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -54,7 +54,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements @Override public void addComponent(Component c) { // Add to components before calling super.addComponent - // so that it is available to AttachListeners + // so that it is available to AttachListeners components.add(c); try { super.addComponent(c); @@ -75,7 +75,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements public void addComponentAsFirst(Component c) { // If c is already in this, we must remove it before proceeding // see ticket #7668 - if(c.getParent() == this) { + if (c.getParent() == this) { removeComponent(c); } components.addFirst(c); @@ -100,9 +100,9 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements public void addComponent(Component c, int index) { // If c is already in this, we must remove it before proceeding // see ticket #7668 - if(c.getParent() == this) { + if (c.getParent() == this) { // When c is removed, all components after it are shifted down - if(index > getComponentIndex(c)) { + if (index > getComponentIndex(c)) { index--; } removeComponent(c); diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index f069954869..47f132aa77 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -35,7 +35,6 @@ import com.vaadin.terminal.Resource; import com.vaadin.terminal.gwt.client.ui.dd.VIsOverId; import com.vaadin.terminal.gwt.client.ui.dd.VItemIdIs; import com.vaadin.terminal.gwt.client.ui.dd.VerticalDropLocation; -import com.vaadin.ui.AbstractSelect.ItemCaptionMode; /** *

diff --git a/src/com/vaadin/ui/Component.java b/src/com/vaadin/ui/Component.java index 1289b57bd9..7de94f6696 100644 --- a/src/com/vaadin/ui/Component.java +++ b/src/com/vaadin/ui/Component.java @@ -648,8 +648,8 @@ public interface Component extends Paintable, VariableOwner, Sizeable, * Notifies the component that it is detached from the application. * *

- * The {@link #getApplication()} and {@link #getRoot()} methods might - * return null after this method is called. + * The {@link #getApplication()} and {@link #getRoot()} methods might return + * null after this method is called. *

* *

diff --git a/src/com/vaadin/ui/Field.java b/src/com/vaadin/ui/Field.java index 6cc11daf08..3a66db47b0 100644 --- a/src/com/vaadin/ui/Field.java +++ b/src/com/vaadin/ui/Field.java @@ -10,6 +10,7 @@ import com.vaadin.ui.Component.Focusable; /** * TODO document + * * @author Vaadin Ltd. * * @param T