diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-21 14:25:46 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-21 15:25:46 +0300 |
commit | 11ddb11cbc72b0ee233e503058d4e104030e4aa3 (patch) | |
tree | a3cef3be53ee41bba3d8ab8b64b0e10b2483a5fa /client/src | |
parent | e118f4d860adeaca1690ef095906ae6be84f3cb5 (diff) | |
download | vaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.tar.gz vaadin-framework-11ddb11cbc72b0ee233e503058d4e104030e4aa3.zip |
Update modifier order to follow Java Specification suggestions (#10050)
Also includes some other minor cleanup.
Diffstat (limited to 'client/src')
44 files changed, 78 insertions, 80 deletions
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java index 0ee4a4f708..41ce18e8ee 100644 --- a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java +++ b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java @@ -495,7 +495,7 @@ public class ApplicationConfiguration implements EntryPoint { * the id of the application to get configuration data for * @return a native javascript object containing the configuration data */ - private native static JsoConfiguration getJsoConfiguration(String appId) + private static native JsoConfiguration getJsoConfiguration(String appId) /*-{ return $wnd.vaadin.getApp(appId); }-*/; @@ -838,7 +838,7 @@ public class ApplicationConfiguration implements EntryPoint { * @param widgetsetName * the name of this widgetset */ - public native static void registerCallback(String widgetsetName) + public static native void registerCallback(String widgetsetName) /*-{ var callbackHandler = $entry(@com.vaadin.client.ApplicationConfiguration::startApplication(Ljava/lang/String;)); $wnd.vaadin.registerWidgetset(widgetsetName, callbackHandler); @@ -872,7 +872,7 @@ public class ApplicationConfiguration implements EntryPoint { return !isDebugAvailable(); } - private native static boolean isDebugAvailable() + private static native boolean isDebugAvailable() /*-{ if($wnd.vaadin.debug) { return true; diff --git a/client/src/main/java/com/vaadin/client/ApplicationConnection.java b/client/src/main/java/com/vaadin/client/ApplicationConnection.java index 5a67d41a54..58d5259f1b 100644 --- a/client/src/main/java/com/vaadin/client/ApplicationConnection.java +++ b/client/src/main/java/com/vaadin/client/ApplicationConnection.java @@ -195,7 +195,7 @@ public class ApplicationConnection implements HasHandlers { } } - public static abstract class ApplicationConnectionEvent + public abstract static class ApplicationConnectionEvent extends GwtEvent<CommunicationHandler> { private ApplicationConnection connection; diff --git a/client/src/main/java/com/vaadin/client/BrowserInfo.java b/client/src/main/java/com/vaadin/client/BrowserInfo.java index 6e0b858990..0197c4f3f8 100644 --- a/client/src/main/java/com/vaadin/client/BrowserInfo.java +++ b/client/src/main/java/com/vaadin/client/BrowserInfo.java @@ -351,7 +351,7 @@ public class BrowserInfo { return browserDetails.isOpera() && getBrowserMajorVersion() == 11; } - public native static String getBrowserString() + public static native String getBrowserString() /*-{ return $wnd.navigator.userAgent; }-*/; diff --git a/client/src/main/java/com/vaadin/client/ConnectorMap.java b/client/src/main/java/com/vaadin/client/ConnectorMap.java index f79aa0250f..fbd5b40e3f 100644 --- a/client/src/main/java/com/vaadin/client/ConnectorMap.java +++ b/client/src/main/java/com/vaadin/client/ConnectorMap.java @@ -139,7 +139,7 @@ public class ConnectorMap { * element of the connector whose id is desired * @return the id of the element's connector, if it's a connector */ - native static final String getConnectorId(Element el) + static final native String getConnectorId(Element el) /*-{ return el.tkPid; }-*/; diff --git a/client/src/main/java/com/vaadin/client/MeasuredSize.java b/client/src/main/java/com/vaadin/client/MeasuredSize.java index 0f02b46e5c..2029fd9e4d 100644 --- a/client/src/main/java/com/vaadin/client/MeasuredSize.java +++ b/client/src/main/java/com/vaadin/client/MeasuredSize.java @@ -21,7 +21,7 @@ import com.google.gwt.core.client.JsArrayString; import com.google.gwt.dom.client.Element; public class MeasuredSize { - private final static boolean debugSizeChanges = false; + private static final boolean debugSizeChanges = false; public static class MeasureResult { private final boolean widthChanged; diff --git a/client/src/main/java/com/vaadin/client/Profiler.java b/client/src/main/java/com/vaadin/client/Profiler.java index 3986bdddbb..bc07836b89 100644 --- a/client/src/main/java/com/vaadin/client/Profiler.java +++ b/client/src/main/java/com/vaadin/client/Profiler.java @@ -384,7 +384,7 @@ public class Profiler { return RELATIVE_TIME_SUPPLIER.getRelativeTime(); } - private static native final void logGwtEvent(String name, String type) + private static final native void logGwtEvent(String name, String type) /*-{ $wnd.__gwtStatsEvent({ evtGroup: @com.vaadin.client.Profiler::evtGroup, diff --git a/client/src/main/java/com/vaadin/client/SuperDevMode.java b/client/src/main/java/com/vaadin/client/SuperDevMode.java index e8eab082d1..fa565c4ce8 100644 --- a/client/src/main/java/com/vaadin/client/SuperDevMode.java +++ b/client/src/main/java/com/vaadin/client/SuperDevMode.java @@ -122,7 +122,7 @@ public class SuperDevMode { + ".nocache.js"; } - private native static String getRecompileParameters(String moduleName) + private static native String getRecompileParameters(String moduleName) /*-{ var prop_map = $wnd.__gwt_activeModules[moduleName].bindings(); @@ -217,7 +217,7 @@ public class SuperDevMode { return isSuperDevModeEnabledInModule(moduleName); } - protected native static boolean isSuperDevModeEnabledInModule( + protected static native boolean isSuperDevModeEnabledInModule( String moduleName) /*-{ if (!$wnd.__gwt_activeModules) diff --git a/client/src/main/java/com/vaadin/client/UIDL.java b/client/src/main/java/com/vaadin/client/UIDL.java index 165f0c6b05..05a2e5f5ef 100644 --- a/client/src/main/java/com/vaadin/client/UIDL.java +++ b/client/src/main/java/com/vaadin/client/UIDL.java @@ -476,7 +476,7 @@ public final class UIDL extends JavaScriptObject { * @deprecated should not be used anymore */ @Deprecated - public final static class XML extends JavaScriptObject { + public static final class XML extends JavaScriptObject { protected XML() { } diff --git a/client/src/main/java/com/vaadin/client/Util.java b/client/src/main/java/com/vaadin/client/Util.java index 553911b7b8..b849d0c0b3 100644 --- a/client/src/main/java/com/vaadin/client/Util.java +++ b/client/src/main/java/com/vaadin/client/Util.java @@ -1149,7 +1149,7 @@ public class Util { * a JavaScript object to be converted to a string * @return JSON in string representation */ - private native static String stringify(JavaScriptObject json) + private static native String stringify(JavaScriptObject json) /*-{ return JSON.stringify(json); }-*/; @@ -1162,7 +1162,7 @@ public class Util { * @param jsonAsString * @return a JavaScript object constructed from the parse */ - public native static <T extends JavaScriptObject> T parse( + public static native <T extends JavaScriptObject> T parse( String jsonAsString) /*-{ return JSON.parse(jsonAsString); diff --git a/client/src/main/java/com/vaadin/client/VCaption.java b/client/src/main/java/com/vaadin/client/VCaption.java index 8da36becfa..1bff175d7e 100644 --- a/client/src/main/java/com/vaadin/client/VCaption.java +++ b/client/src/main/java/com/vaadin/client/VCaption.java @@ -692,12 +692,12 @@ public class VCaption extends HTML { return getOwnerPid(e); } - private native static void setOwnerPid(Element el, String pid) + private static native void setOwnerPid(Element el, String pid) /*-{ el.vOwnerPid = pid; }-*/; - public native static String getOwnerPid(Element el) + public static native String getOwnerPid(Element el) /*-{ return el.vOwnerPid; }-*/; diff --git a/client/src/main/java/com/vaadin/client/WidgetUtil.java b/client/src/main/java/com/vaadin/client/WidgetUtil.java index d24a1d53a5..7fc027d55d 100644 --- a/client/src/main/java/com/vaadin/client/WidgetUtil.java +++ b/client/src/main/java/com/vaadin/client/WidgetUtil.java @@ -1167,7 +1167,7 @@ public class WidgetUtil { * * @return The active element or null if no active element could be found. */ - public native static Element getFocusedElement() + public static native Element getFocusedElement() /*-{ if ($wnd.document.activeElement) { return $wnd.document.activeElement; @@ -1315,7 +1315,7 @@ public class WidgetUtil { * * @since 7.3 */ - public native static void setSelectionRange(Element elem, int pos, + public static native void setSelectionRange(Element elem, int pos, int length, String direction) /*-{ try { @@ -1335,7 +1335,7 @@ public class WidgetUtil { * <code>true</code> if selection is enabled; <code>false</code> * if not */ - public native static void setTextSelectionEnabled(Element e, boolean enable) + public static native void setTextSelectionEnabled(Element e, boolean enable) /*-{ if (!enable) { e.ondrag = function () { return false; }; @@ -1353,7 +1353,7 @@ public class WidgetUtil { * * @since 7.6 */ - public native static void clearTextSelection() + public static native void clearTextSelection() /*-{ if ($wnd.getSelection) { $wnd.getSelection().removeAllRanges(); diff --git a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java index 511a37b7e6..ee0aab7b2e 100644 --- a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java @@ -417,9 +417,8 @@ public class AtmospherePushConnection implements PushConnection { getConnectionStateHandler().pushReconnectPending(this); } - public static abstract class AbstractJSO extends JavaScriptObject { + public abstract static class AbstractJSO extends JavaScriptObject { protected AbstractJSO() { - } protected final native String getStringValue(String key) diff --git a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java index 6e13eb07eb..90e822649b 100644 --- a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java +++ b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java @@ -1613,7 +1613,7 @@ public class MessageHandler { } } - private static native final int calculateBootstrapTime() + private static final native int calculateBootstrapTime() /*-{ if ($wnd.performance && $wnd.performance.timing) { return (new Date).getTime() - $wnd.performance.timing.responseStart; diff --git a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java index 0012138ad9..80e5a32c8b 100644 --- a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java +++ b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java @@ -234,7 +234,7 @@ public class StateChangeEvent * the JavaScript object to check * @return true if the property is defined */ - private static native final boolean isInJson(String property, + private static final native boolean isInJson(String property, JavaScriptObject target) /*-{ var segments = property.split('.'); diff --git a/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java b/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java index dca4ad7b3a..76360eb40d 100644 --- a/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java +++ b/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java @@ -206,7 +206,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { * Path is of type "targetWidgetPath#componentPart" or * "targetWidgetPath". */ - String parts[] = path.split(LegacyLocatorStrategy.SUBPART_SEPARATOR, 2); + String[] parts = path.split(LegacyLocatorStrategy.SUBPART_SEPARATOR, 2); String widgetPath = parts[0]; // Note that this only works if baseElement can be mapped to a @@ -328,7 +328,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { * if the element could not be found. */ private Element getElementByDOMPath(Element baseElement, String path) { - String parts[] = path.split(PARENTCHILD_SEPARATOR); + String[] parts = path.split(PARENTCHILD_SEPARATOR); Element element = baseElement; for (int i = 0, l = parts.length; i < l; ++i) { @@ -501,7 +501,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { @SuppressWarnings("unchecked") private Widget getWidgetFromPath(String path, Widget baseWidget) { Widget w = baseWidget; - String parts[] = path.split(PARENTCHILD_SEPARATOR); + String[] parts = path.split(PARENTCHILD_SEPARATOR); for (int i = 0; i < parts.length; i++) { String part = parts[i]; diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java index 7ac6c518ad..b9d14dc91c 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/ColumnConnector.java @@ -37,7 +37,7 @@ import elemental.json.JsonValue; @Connect(com.vaadin.ui.Grid.Column.class) public class ColumnConnector extends AbstractExtensionConnector { - public static abstract class CustomColumn + public abstract static class CustomColumn extends Column<Object, JsonObject> { private final String connectorId; diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java index c03d3b2936..ce1acef641 100644 --- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java +++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java @@ -882,7 +882,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { * @return a non-null object that uniquely and consistently represents the * row object */ - abstract public Object getRowKey(T row); + public abstract Object getRowKey(T row); @Override public int size() { diff --git a/client/src/main/java/com/vaadin/client/data/CacheStrategy.java b/client/src/main/java/com/vaadin/client/data/CacheStrategy.java index acfadcbcf7..15aaf531e6 100644 --- a/client/src/main/java/com/vaadin/client/data/CacheStrategy.java +++ b/client/src/main/java/com/vaadin/client/data/CacheStrategy.java @@ -33,7 +33,7 @@ public interface CacheStrategy { * This simple approach rules out more advanced heuristics that would take * the current scrolling direction or past scrolling behavior into account. */ - public static abstract class AbstractBasicSymmetricalCacheStrategy + public abstract static class AbstractBasicSymmetricalCacheStrategy implements CacheStrategy { @Override diff --git a/client/src/main/java/com/vaadin/client/event/PointerEvent.java b/client/src/main/java/com/vaadin/client/event/PointerEvent.java index 2007ad6624..49e2382a0e 100644 --- a/client/src/main/java/com/vaadin/client/event/PointerEvent.java +++ b/client/src/main/java/com/vaadin/client/event/PointerEvent.java @@ -126,37 +126,37 @@ public abstract class PointerEvent<H extends EventHandler> return isPrimary(getNativeEvent()); } - private static native final int getPointerId(NativeEvent e) + private static final native int getPointerId(NativeEvent e) /*-{ return e.pointerId; }-*/; - private static native final int getWidth(NativeEvent e) + private static final native int getWidth(NativeEvent e) /*-{ return e.width; }-*/; - private static native final int getHeight(NativeEvent e) + private static final native int getHeight(NativeEvent e) /*-{ return e.height; }-*/; - private static native final double getPressure(NativeEvent e) + private static final native double getPressure(NativeEvent e) /*-{ return e.pressure; }-*/; - private static native final double getTiltX(NativeEvent e) + private static final native double getTiltX(NativeEvent e) /*-{ return e.tiltX; }-*/; - private static native final double getTiltY(NativeEvent e) + private static final native double getTiltY(NativeEvent e) /*-{ return e.tiltY; }-*/; - private static native final String getPointerType(NativeEvent e) + private static final native String getPointerType(NativeEvent e) /*-{ var pointerType = e.pointerType; if (typeof pointerType === "number") { @@ -165,7 +165,7 @@ public abstract class PointerEvent<H extends EventHandler> return pointerType || ""; }-*/; - private static native final boolean isPrimary(NativeEvent e) + private static final native boolean isPrimary(NativeEvent e) /*-{ return e.isPrimary; }-*/; diff --git a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java index 34a2df4f18..45f36561f4 100644 --- a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java +++ b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java @@ -160,7 +160,7 @@ public abstract class ClickableRenderer<T, W extends Widget> return cellReference; } - private native static Escalator getEscalator(Grid<?> grid) + private static native Escalator getEscalator(Grid<?> grid) /*-{ return grid.@com.vaadin.client.widgets.Grid::escalator; }-*/; diff --git a/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java b/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java index 03f6525c1c..9bedf65b70 100644 --- a/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java +++ b/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java @@ -71,12 +71,12 @@ public class HierarchyRenderer extends ClickableRenderer<Object, Widget> { return (TableCellElement) element; } - private native static RowReference<Object> getRowReference( + private static native RowReference<Object> getRowReference( RendererCellReference cell) /*-{ return cell.@com.vaadin.client.widget.grid.CellReference::getRowReference()(); }-*/; - private native static FlyweightCell getFlyweightCell( + private static native FlyweightCell getFlyweightCell( RendererCellReference cell) /*-{ return cell.@com.vaadin.client.widget.grid.RendererCellReference::cell; }-*/; diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java index 6d6f396147..f0a23b5f43 100644 --- a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java +++ b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java @@ -2010,7 +2010,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>> private void setLabel() { if (getDateField() instanceof VAbstractPopupCalendar) { - ((VAbstractPopupCalendar) getDateField()).setFocusedDate(this); + ((VAbstractPopupCalendar<?, ?>) getDateField()).setFocusedDate(this); } } } diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java index 5f75869ba4..b12adecc62 100644 --- a/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java +++ b/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java @@ -606,14 +606,14 @@ public abstract class VAbstractSplitPanel extends ComplexPanel { * * @since 7.5.1 */ - abstract protected void startResize(); + protected abstract void startResize(); /** * Called when stopping drag resize * * @since 7.5.1 */ - abstract protected void stopResize(); + protected abstract void stopResize(); /** * Gets the first container diff --git a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java index 0595d65069..d12a233e73 100644 --- a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java +++ b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java @@ -170,11 +170,11 @@ public class VDragAndDropWrapper extends VCustomComponent return false; } - protected final static int NONE = 0; - protected final static int COMPONENT = 1; - protected final static int WRAPPER = 2; - protected final static int HTML5 = 3; - protected final static int COMPONENT_OTHER = 4; + protected static final int NONE = 0; + protected static final int COMPONENT = 1; + protected static final int WRAPPER = 2; + protected static final int HTML5 = 3; + protected static final int COMPONENT_OTHER = 4; /** For internal use only. May be removed or replaced in the future. */ public int dragStartMode; diff --git a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java index 18d7d76d74..a8a43a2d8d 100644 --- a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java +++ b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java @@ -45,7 +45,7 @@ import com.vaadin.shared.ui.MarginInfo; */ public class VFormLayout extends SimplePanel { - private final static String CLASSNAME = "v-formlayout"; + private static final String CLASSNAME = "v-formlayout"; /** For internal use only. May be removed or replaced in the future. */ public VFormLayoutTable table; diff --git a/client/src/main/java/com/vaadin/client/ui/VPopupView.java b/client/src/main/java/com/vaadin/client/ui/VPopupView.java index 296cde28bc..43da119c5a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VPopupView.java +++ b/client/src/main/java/com/vaadin/client/ui/VPopupView.java @@ -416,7 +416,7 @@ public class VPopupView extends HTML } return handler; } - }// class CustomPopup + } public HandlerRegistration addVisibilityChangeHandler( final VisibilityChangeHandler visibilityChangeHandler) { @@ -442,4 +442,4 @@ public class VPopupView extends HTML return popupShowInProgress; } -}// class VPopupView +} diff --git a/client/src/main/java/com/vaadin/client/ui/VUI.java b/client/src/main/java/com/vaadin/client/ui/VUI.java index 8a159a1f1e..a372b746b0 100644 --- a/client/src/main/java/com/vaadin/client/ui/VUI.java +++ b/client/src/main/java/com/vaadin/client/ui/VUI.java @@ -343,7 +343,7 @@ public class VUI extends SimplePanel implements ResizeHandler, connection.flushActiveConnector(); } - private native static void loadAppIdListFromDOM(List<String> list) + private static native void loadAppIdListFromDOM(List<String> list) /*-{ var j; for(j in $wnd.vaadin.vaadinConfigurations) { diff --git a/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java index 8b90fffeb6..89bd7923cd 100644 --- a/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java @@ -93,7 +93,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector { // as it is added directly to the child component? String[] cssRules = css.split(";"); for (String cssRule : cssRules) { - String parts[] = cssRule.split(":", 2); + String[] parts = cssRule.split(":", 2); if (parts.length == 2) { style.setProperty(makeCamelCase(parts[0].trim()), parts[1].trim()); diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java index 883b5e5164..c88a3079fb 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java @@ -113,7 +113,7 @@ public abstract class VAbstractDropHandler implements VDropHandler { * * @param drag */ - abstract protected void dragAccepted(VDragEvent drag); + protected abstract void dragAccepted(VDragEvent drag); protected void validate(final VAcceptCallback cb, final VDragEvent event) { Command checkCriteria = new Command() { diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java index f7c7574476..aa904bf52f 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java @@ -31,7 +31,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; */ @Deprecated @AcceptCriterion(AcceptAll.class) -final public class VAcceptAll extends VAcceptCriterion { +public final class VAcceptAll extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java index 1aebfa2e27..47deb06632 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java @@ -28,7 +28,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; */ @Deprecated @AcceptCriterion(And.class) -final public class VAnd extends VAcceptCriterion implements VAcceptCallback { +public final class VAnd extends VAcceptCriterion implements VAcceptCallback { private boolean b1; static VAcceptCriterion getCriteria(VDragEvent drag, UIDL configuration, diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java index 98565713b2..22c2570598 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java @@ -28,7 +28,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; */ @Deprecated @AcceptCriterion(ContainsDataFlavor.class) -final public class VContainsDataFlavor extends VAcceptCriterion { +public final class VContainsDataFlavor extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java index 5c1c9b75a0..e5b4790cda 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java @@ -31,7 +31,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; */ @Deprecated @AcceptCriterion(SourceIs.class) -final public class VDragSourceIs extends VAcceptCriterion { +public final class VDragSourceIs extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java index 5dcf0ce630..0698b95861 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java @@ -31,12 +31,12 @@ public class VHtml5File extends JavaScriptObject { protected VHtml5File() { } - public native final String getName() + public final native String getName() /*-{ return this.name; }-*/; - public native final String getType() + public final native String getType() /*-{ return this.type; }-*/; @@ -47,7 +47,7 @@ public class VHtml5File extends JavaScriptObject { * and then cast back to a long value. * www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#important */ - public native final double getSize() + public final native double getSize() /*-{ return this.size ? this.size : 0; }-*/; diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java index e310fd479d..e9e646bf96 100644 --- a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java +++ b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java @@ -25,7 +25,7 @@ import com.vaadin.ui.dnd.DropTargetExtension; * and extending classes */ @Deprecated -final public class VOverTreeNode extends VAcceptCriterion { +public final class VOverTreeNode extends VAcceptCriterion { @Override protected boolean accept(VDragEvent drag, UIDL configuration) { diff --git a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java index 79df33e9a7..72d0784c3e 100644 --- a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java @@ -167,11 +167,10 @@ public class MenuBarConnector extends AbstractComponentConnector itr = iteratorStack.pop(); currentMenu = menuStack.pop(); } - } // while + } getLayoutManager().setNeedsHorizontalLayout(this); - - }// updateFromUIDL + } @Override public VMenuBar getWidget() { diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java index b5aaa5d894..41bc1b5952 100644 --- a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java +++ b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java @@ -205,7 +205,7 @@ public abstract class ScrollbarBundle implements DeferredWorker { * * @see VerticalScrollbarBundle#getElement() */ - public final static class VerticalScrollbarBundle extends ScrollbarBundle { + public static final class VerticalScrollbarBundle extends ScrollbarBundle { @Override public void setStylePrimaryName(String primaryStyleName) { @@ -275,7 +275,7 @@ public abstract class ScrollbarBundle implements DeferredWorker { * * @see HorizontalScrollbarBundle#getElement() */ - public final static class HorizontalScrollbarBundle + public static final class HorizontalScrollbarBundle extends ScrollbarBundle { @Override diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedEvent.java b/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedEvent.java index 846b0ce723..5ede9bb90e 100644 --- a/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedEvent.java +++ b/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedEvent.java @@ -29,7 +29,7 @@ public class RowHeightChangedEvent extends GwtEvent<RowHeightChangedHandler> { /** * Handler type. */ - public final static Type<RowHeightChangedHandler> TYPE = new Type<>(); + public static final Type<RowHeightChangedHandler> TYPE = new Type<>(); public static final Type<RowHeightChangedHandler> getType() { return TYPE; diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java index 0063c20b28..56c1207439 100644 --- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java +++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java @@ -34,7 +34,7 @@ public class ColumnReorderEvent<T> extends GwtEvent<ColumnReorderHandler<T>> { /** * Handler type. */ - private final static Type<ColumnReorderHandler<?>> TYPE = new Type<>(); + private static final Type<ColumnReorderHandler<?>> TYPE = new Type<>(); public static final Type<ColumnReorderHandler<?>> getType() { return TYPE; diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java index abd369b175..3c049ea709 100644 --- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java +++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java @@ -32,7 +32,7 @@ public class ColumnResizeEvent<T> extends GwtEvent<ColumnResizeHandler<T>> { /** * Handler type. */ - private final static Type<ColumnResizeHandler<?>> TYPE = new Type<>(); + private static final Type<ColumnResizeHandler<?>> TYPE = new Type<>(); private Column<?, T> column; diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java index 5c7b88cc91..7e01e91e8d 100644 --- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java +++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java @@ -31,7 +31,7 @@ import com.vaadin.client.widgets.Grid.Column; public class ColumnVisibilityChangeEvent<T> extends GwtEvent<ColumnVisibilityChangeHandler<T>> { - private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<>(); + private static final Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<>(); public static final Type<ColumnVisibilityChangeHandler<?>> getType() { return TYPE; diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java index 178f3a4222..092253bbc5 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java +++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java @@ -324,7 +324,7 @@ public class Escalator extends Widget * {@link com.google.gwt.dom.client.NativeEvent NativeEvent} isn't * properly populated with the correct values. */ - private final static class CustomTouchEvent + private static final class CustomTouchEvent extends JavaScriptObject { protected CustomTouchEvent() { } @@ -1496,7 +1496,7 @@ public class Escalator extends Widget return elem; } - abstract protected void recalculateSectionHeight(); + protected abstract void recalculateSectionHeight(); /** * Returns the height of all rows in the row container. @@ -1746,7 +1746,7 @@ public class Escalator extends Widget * @return <code>true</code> iff this the given element, or any of its * descendants, can be frozen */ - abstract protected boolean rowCanBeFrozen(TableRowElement tr); + protected abstract boolean rowCanBeFrozen(TableRowElement tr); /** * Iterates through all the cells in a column and returns the width of diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index 578f260a1e..537d864836 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -2292,7 +2292,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, } } - public static abstract class AbstractGridKeyEvent<HANDLER extends AbstractGridKeyEventHandler> + public abstract static class AbstractGridKeyEvent<HANDLER extends AbstractGridKeyEventHandler> extends KeyEvent<HANDLER> { /** @@ -2358,7 +2358,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, protected abstract void doDispatch(HANDLER handler, Section section); } - public static abstract class AbstractGridMouseEvent<HANDLER extends AbstractGridMouseEventHandler> + public abstract static class AbstractGridMouseEvent<HANDLER extends AbstractGridMouseEventHandler> extends MouseEvent<HANDLER> { /** @@ -8972,17 +8972,17 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, * @param parent * The parent to set */ - private static native final void setParent(Widget widget, Grid<?> parent) + private static final native void setParent(Widget widget, Grid<?> parent) /*-{ widget.@com.google.gwt.user.client.ui.Widget::setParent(Lcom/google/gwt/user/client/ui/Widget;)(parent); }-*/; - private static native final void onAttach(Widget widget) + private static final native void onAttach(Widget widget) /*-{ widget.@Widget::onAttach()(); }-*/; - private static native final void onDetach(Widget widget) + private static final native void onDetach(Widget widget) /*-{ widget.@Widget::onDetach()(); }-*/; diff --git a/client/src/main/java/com/vaadin/client/widgets/Overlay.java b/client/src/main/java/com/vaadin/client/widgets/Overlay.java index e6ce34b8a7..86758e3173 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Overlay.java +++ b/client/src/main/java/com/vaadin/client/widgets/Overlay.java @@ -352,7 +352,7 @@ public class Overlay extends PopupPanel { return topFix; } - private native static int detectRelativeBodyFixes(String axis) + private static native int detectRelativeBodyFixes(String axis) /*-{ try { var b = $wnd.document.body; |