diff options
author | Denis <denis@vaadin.com> | 2016-12-08 10:57:38 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-12-08 10:57:38 +0200 |
commit | 9fb43988c7335167d40b01479265e41cad55d301 (patch) | |
tree | 941d5c15b403776a83b9474df39ffb52eb320768 /client | |
parent | 414de3c4b2ea5267808980bd23a9e56aa865e96b (diff) | |
download | vaadin-framework-9fb43988c7335167d40b01479265e41cad55d301.tar.gz vaadin-framework-9fb43988c7335167d40b01479265e41cad55d301.zip |
Introduce dedicated shared states for every core vaadin component/ext. (#98)
* Introduce dedicated shared states for every core vaadin component/ext.
Updated components are:
- PasswordField
- CustomField
- AbstractListing
- AbstractMultiSelect
- ColorPicker
- ColorPickerArea
- DataCommunicator
- Responsive
- AbstractListingExtension
- DetailsManager
- AbstractRenderer
- ClickableRenderer
- ButtonRenderer
- CheckBoxRenderer
- DateRenderer
- HtmlRenderer
- ImageRenderer
- NumberRenderer
- ProgressBarRenderer
- TextRenderer
Fixes vaadin/framework8-issues#480.
Diffstat (limited to 'client')
22 files changed, 158 insertions, 46 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractListingConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractListingConnector.java index 88fccab32e..41af07bca9 100644 --- a/client/src/main/java/com/vaadin/client/connectors/AbstractListingConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/AbstractListingConnector.java @@ -19,6 +19,7 @@ import com.vaadin.client.connectors.data.HasDataSource; import com.vaadin.client.data.DataSource; import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.shared.data.DataCommunicatorConstants; +import com.vaadin.shared.ui.abstractlisting.AbstractListingState; import com.vaadin.ui.AbstractListing; import elemental.json.JsonObject; @@ -78,4 +79,9 @@ public abstract class AbstractListingConnector extends AbstractFieldConnector protected boolean isRowSelected(JsonObject row) { return row.hasKey(DataCommunicatorConstants.SELECTED); } + + @Override + public AbstractListingState getState() { + return (AbstractListingState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java index 1550f86292..ee85b50ebe 100644 --- a/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java @@ -26,11 +26,11 @@ import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.data.DataSource; import com.vaadin.client.ui.HasRequiredIndicator; -import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.Range; import com.vaadin.shared.Registration; import com.vaadin.shared.data.selection.MultiSelectServerRpc; import com.vaadin.shared.ui.ListingJsonConstants; +import com.vaadin.shared.ui.abstractmultiselect.AbstractMultiSelectState; import elemental.json.JsonObject; @@ -156,8 +156,8 @@ public abstract class AbstractMultiSelectConnector } @Override - public AbstractFieldState getState() { - return (AbstractFieldState) super.getState(); + public AbstractMultiSelectState getState() { + return (AbstractMultiSelectState) super.getState(); } @Override diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java index 989f10f266..ce41ae38ac 100644 --- a/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.metadata.Type; import com.vaadin.client.metadata.TypeData; import com.vaadin.client.metadata.TypeDataStore; import com.vaadin.client.renderers.Renderer; +import com.vaadin.shared.ui.grid.renderers.AbstractRendererState; import elemental.json.JsonValue; @@ -125,4 +126,8 @@ public abstract class AbstractRendererConnector<T> // NOOP } + @Override + public AbstractRendererState getState() { + return (AbstractRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java index 2c353e484a..6fbe428edc 100644 --- a/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java @@ -19,6 +19,7 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.renderers.ButtonRenderer; import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.ButtonRendererState; import elemental.json.JsonObject; @@ -42,4 +43,9 @@ public class ButtonRendererConnector RendererClickHandler<JsonObject> handler) { return getRenderer().addClickHandler(handler); } + + @Override + public ButtonRendererState getState() { + return (ButtonRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/CheckBoxRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/CheckBoxRendererConnector.java index 8a2317c0a4..4d9ec782c7 100644 --- a/client/src/main/java/com/vaadin/client/connectors/CheckBoxRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/CheckBoxRendererConnector.java @@ -19,6 +19,7 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.renderers.CheckBoxRenderer; import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.CheckBoxRendererState; import elemental.json.JsonObject; @@ -42,4 +43,9 @@ public class CheckBoxRendererConnector RendererClickHandler<JsonObject> handler) { return getRenderer().addClickHandler(handler); } + + @Override + public CheckBoxRendererState getState() { + return (CheckBoxRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java index bed09ca75c..a7d2bbf6b4 100644 --- a/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java @@ -20,6 +20,7 @@ import com.vaadin.client.MouseEventDetailsBuilder; import com.vaadin.client.connectors.grid.AbstractGridRendererConnector; import com.vaadin.client.renderers.ClickableRenderer.RendererClickEvent; import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler; +import com.vaadin.shared.ui.grid.renderers.ClickableRendererState; import com.vaadin.shared.ui.grid.renderers.RendererClickRpc; import elemental.json.JsonObject; @@ -60,4 +61,9 @@ public abstract class ClickableRendererConnector<T> protected abstract HandlerRegistration addClickHandler( RendererClickHandler<JsonObject> handler); + + @Override + public ClickableRendererState getState() { + return (ClickableRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java index 7ebeb33638..0bd2f16fd3 100644 --- a/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java @@ -22,6 +22,7 @@ import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler; import com.vaadin.client.renderers.ImageRenderer; import com.vaadin.shared.communication.URLReference; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.ImageRendererState; import elemental.json.JsonObject; import elemental.json.JsonValue; @@ -54,4 +55,9 @@ public class ImageRendererConnector extends ClickableRendererConnector<String> { RendererClickHandler<JsonObject> handler) { return getRenderer().addClickHandler(handler); } + + @Override + public ImageRendererState getState() { + return (ImageRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/data/DataCommunicatorConnector.java b/client/src/main/java/com/vaadin/client/connectors/data/DataCommunicatorConnector.java index 380e4681d5..cceedf9bf9 100644 --- a/client/src/main/java/com/vaadin/client/connectors/data/DataCommunicatorConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/data/DataCommunicatorConnector.java @@ -28,6 +28,7 @@ import com.vaadin.server.data.DataCommunicator; import com.vaadin.shared.data.DataCommunicatorClientRpc; import com.vaadin.shared.data.DataCommunicatorConstants; import com.vaadin.shared.data.DataRequestRpc; +import com.vaadin.shared.extension.datacommunicator.DataCommunicatorState; import com.vaadin.shared.ui.Connect; import elemental.json.Json; @@ -133,4 +134,9 @@ public class DataCommunicatorConnector extends AbstractExtensionConnector { assert false : "Parent not implementing HasDataSource"; } } + + @Override + public DataCommunicatorState getState() { + return (DataCommunicatorState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/DateRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/DateRendererConnector.java index da22c77548..ddda1a778a 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/DateRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/DateRendererConnector.java @@ -16,6 +16,7 @@ package com.vaadin.client.connectors.grid; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.DateRendererState; /** * A connector for {@link com.vaadin.ui.renderers.DateRenderer DateRenderer}. @@ -29,5 +30,9 @@ import com.vaadin.shared.ui.Connect; */ @Connect(com.vaadin.ui.renderers.DateRenderer.class) public class DateRendererConnector extends TextRendererConnector { - // No implementation needed + + @Override + public DateRendererState getState() { + return (DateRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/DetailsManagerConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/DetailsManagerConnector.java index 5488799f61..009de4e99e 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/DetailsManagerConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/DetailsManagerConnector.java @@ -30,6 +30,7 @@ import com.vaadin.client.widget.grid.HeightAwareDetailsGenerator; import com.vaadin.client.widgets.Grid; import com.vaadin.shared.Registration; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.DetailsManagerState; import com.vaadin.shared.ui.grid.GridState; import com.vaadin.ui.Grid.DetailsManager; @@ -159,6 +160,11 @@ public class DetailsManagerConnector extends AbstractExtensionConnector { return (GridConnector) super.getParent(); } + @Override + public DetailsManagerState getState() { + return (DetailsManagerState) super.getState(); + } + private Grid<JsonObject> getWidget() { return getParent().getWidget(); } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/NumberRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/NumberRendererConnector.java index dd5d4fae40..4dd089c555 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/NumberRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/NumberRendererConnector.java @@ -16,6 +16,7 @@ package com.vaadin.client.connectors.grid; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.NumberRendererState; /** * A connector for {@link com.vaadin.ui.renderers.NumberRenderer @@ -30,5 +31,9 @@ import com.vaadin.shared.ui.Connect; */ @Connect(com.vaadin.ui.renderers.NumberRenderer.class) public class NumberRendererConnector extends TextRendererConnector { - // no implementation needed + + @Override + public NumberRendererState getState() { + return (NumberRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ProgressBarRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ProgressBarRendererConnector.java index a5f6bec479..5374a87436 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/ProgressBarRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/ProgressBarRendererConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.connectors.grid; import com.vaadin.client.renderers.ProgressBarRenderer; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.ProgressBarRendererState; /** * A connector for {@link ProgressBarRenderer}. @@ -32,4 +33,9 @@ public class ProgressBarRendererConnector public ProgressBarRenderer getRenderer() { return (ProgressBarRenderer) super.getRenderer(); } + + @Override + public ProgressBarRendererState getState() { + return (ProgressBarRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/TextRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/TextRendererConnector.java index 4a368a975d..9d9fe75407 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/TextRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/TextRendererConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.connectors.grid; import com.vaadin.client.renderers.TextRenderer; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.TextRendererState; /** * A connector for {@link TextRenderer}. @@ -32,4 +33,9 @@ public class TextRendererConnector public TextRenderer getRenderer() { return (TextRenderer) super.getRenderer(); } + + @Override + public TextRendererState getState() { + return (TextRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/UnsafeHtmlRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/UnsafeHtmlRendererConnector.java index 42c9a64bd4..f91497687a 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/UnsafeHtmlRendererConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/UnsafeHtmlRendererConnector.java @@ -18,6 +18,7 @@ package com.vaadin.client.connectors.grid; import com.vaadin.client.renderers.Renderer; import com.vaadin.client.widget.grid.RendererCellReference; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.grid.renderers.HtmlRendererState; /** * A connector for {@link UnsafeHtmlRenderer} @@ -40,4 +41,9 @@ public class UnsafeHtmlRendererConnector public UnsafeHtmlRenderer getRenderer() { return (UnsafeHtmlRenderer) super.getRenderer(); } + + @Override + public HtmlRendererState getState() { + return (HtmlRendererState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java b/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java index 114cada56c..0c43a1f8ff 100644 --- a/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java @@ -30,6 +30,7 @@ import com.vaadin.client.BrowserInfo; import com.vaadin.client.ComponentConnector; import com.vaadin.client.ServerConnector; import com.vaadin.server.FileDownloader; +import com.vaadin.shared.extension.filedownloader.FileDownloaderState; import com.vaadin.shared.ui.Connect; @Connect(FileDownloader.class) @@ -81,4 +82,9 @@ public class FileDownloaderConnector extends AbstractExtensionConnector } } + @Override + public FileDownloaderState getState() { + return (FileDownloaderState) super.getState(); + } + } diff --git a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java index cf0fc55292..314d167bfe 100644 --- a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.client.ui.layout.ElementResizeEvent; import com.vaadin.client.ui.layout.ElementResizeListener; import com.vaadin.server.Responsive; +import com.vaadin.shared.extension.responsive.ResponsiveState; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.util.SharedUtil; @@ -164,26 +165,26 @@ public class ResponsiveConnector extends AbstractExtensionConnector */ private static native void searchForBreakPointsNative() /*-{ - + // Initialize variables @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache = []; @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache = []; - + var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + // Can't do squat if we can't parse stylesheets if(!$doc.styleSheets) return; - + var sheets = $doc.styleSheets; - + // Loop all stylesheets on the page and process them individually for(var i = 0, len = sheets.length; i < len; i++) { var sheet = sheets[i]; @com.vaadin.client.extensions.ResponsiveConnector::searchStylesheetForBreakPoints(Lcom/google/gwt/core/client/JavaScriptObject;)(sheet); } - + }-*/; /** @@ -196,15 +197,15 @@ public class ResponsiveConnector extends AbstractExtensionConnector private static native void searchStylesheetForBreakPoints( final JavaScriptObject sheet) /*-{ - + // Inline variables for easier reading var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + // Get all the rulesets from the stylesheet var theRules = new Array(); var IEOrEdge = @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isIE()() || @com.vaadin.client.BrowserInfo::get()().@com.vaadin.client.BrowserInfo::isEdge()(); - + try { if (sheet.cssRules) { theRules = sheet.cssRules @@ -217,18 +218,18 @@ public class ResponsiveConnector extends AbstractExtensionConnector ", probably because of cross domain issues: " + e); return; } - + // Loop through the rulesets for(var i = 0, len = theRules.length; i < len; i++) { var rule = theRules[i]; - + if(rule.type == 3) { // @import rule, traverse recursively @com.vaadin.client.extensions.ResponsiveConnector::searchStylesheetForBreakPoints(Lcom/google/gwt/core/client/JavaScriptObject;)(rule.styleSheet); - + } else if(rule.type == 1 || !rule.type) { // Regular selector rule - + // Helper function var pushToCache = function(ranges, selector, min, max) { // Avoid adding duplicates @@ -244,46 +245,46 @@ public class ResponsiveConnector extends AbstractExtensionConnector ranges.push([selector, min, max]); } }; - + // Array of all of the separate selectors in this ruleset var haystack = rule.selectorText.split(","); - + // IE/Edge parses CSS like .class[attr="val"] into [attr="val"].class so we need to check for both var selectorRegEx = IEOrEdge ? /\[.*\]([\.|#]\S+)/ : /([\.|#]\S+?)\[.*\]/; - + // Loop all the selectors in this ruleset for(var k = 0, len2 = haystack.length; k < len2; k++) { - + // Split the haystack into parts. var widthRange = haystack[k].match(/\[width-range.*?\]/); var heightRange = haystack[k].match(/\[height-range.*?\]/); var selector = haystack[k].match(selectorRegEx); - + if (selector != null) { selector = selector[1]; - + // Check for width-ranges. if (widthRange != null) { var minMax = widthRange[0].match(/\[width-range~?=["|'](.*?)-(.*?)["|']\]/i); var min = minMax[1]; var max = minMax[2]; - + pushToCache(widthRanges, selector, min, max); } - + // Check for height-ranges. if (heightRange != null) { var minMax = heightRange[0].match(/\[height-range~?=["|'](.*?)-(.*?)["|']\]/i); var min = minMax[1]; var max = minMax[2]; - + pushToCache(heightRanges, selector, min, max); } } } } } - + }-*/; /** @@ -293,15 +294,15 @@ public class ResponsiveConnector extends AbstractExtensionConnector */ private native void getBreakPointsFor(final String selectors) /*-{ - + var selectors = selectors.split(","); - + var widthBreakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::widthBreakpoints = []; var heightBreakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::heightBreakpoints = []; - + var widthRanges = @com.vaadin.client.extensions.ResponsiveConnector::widthRangeCache; var heightRanges = @com.vaadin.client.extensions.ResponsiveConnector::heightRangeCache; - + for(var i = 0, len = widthRanges.length; i < len; i++) { var bp = widthRanges[i]; for(var j = 0, len2 = selectors.length; j < len2; j++) { @@ -309,7 +310,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector widthBreakpoints.push(bp); } } - + for(var i = 0, len = heightRanges.length; i < len; i++) { var bp = heightRanges[i]; for(var j = 0, len2 = selectors.length; j < len2; j++) { @@ -317,10 +318,10 @@ public class ResponsiveConnector extends AbstractExtensionConnector heightBreakpoints.push(bp); } } - + // Only for debugging // console.log("Breakpoints for", selectors.join(","), widthBreakpoints, heightBreakpoints); - + }-*/; private String currentWidthRanges = ""; @@ -331,6 +332,11 @@ public class ResponsiveConnector extends AbstractExtensionConnector updateRanges(); } + @Override + public ResponsiveState getState() { + return (ResponsiveState) super.getState(); + } + private void updateRanges() { LayoutManager layoutManager = LayoutManager.get(getConnection()); com.google.gwt.user.client.Element element = target.getWidget() @@ -370,24 +376,24 @@ public class ResponsiveConnector extends AbstractExtensionConnector private native String resolveBreakpoint(String which, int size) /*-{ - + // Default to "width" breakpoints var breakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::widthBreakpoints; - + // Use height breakpoints if we're measuring the height if(which == "height") breakpoints = this.@com.vaadin.client.extensions.ResponsiveConnector::heightBreakpoints; - + // Output string that goes into either the "width-range" or "height-range" attribute in the element var ranges = ""; - + // Loop the breakpoints for(var i = 0, len = breakpoints.length; i < len; i++) { var bp = breakpoints[i]; - + var min = parseInt(bp[1]); var max = parseInt(bp[2]); - + if(!isNaN(min) && !isNaN(max)) { if(min <= size && size <= max) { ranges += " " + bp[1] + "-" + bp[2]; @@ -402,10 +408,10 @@ public class ResponsiveConnector extends AbstractExtensionConnector } } } - + // Trim the output and return it return ranges.replace(/^\s+/, ""); - + }-*/; } diff --git a/client/src/main/java/com/vaadin/client/renderers/CheckBoxRenderer.java b/client/src/main/java/com/vaadin/client/renderers/CheckBoxRenderer.java index 12a92f4574..b004b1c2fa 100644 --- a/client/src/main/java/com/vaadin/client/renderers/CheckBoxRenderer.java +++ b/client/src/main/java/com/vaadin/client/renderers/CheckBoxRenderer.java @@ -45,4 +45,5 @@ public class CheckBoxRenderer extends ClickableRenderer<Boolean, CheckBox> { CheckBox widget) { widget.setValue(data); } + } diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java index 6f480538e0..e027775793 100644 --- a/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java @@ -19,7 +19,7 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.HasClickHandlers; import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.AbstractComponentConnector; -import com.vaadin.shared.ui.colorpicker.ColorPickerState; +import com.vaadin.shared.ui.colorpicker.AbstractColorPickerState; /** * An abstract class that defines default implementation for a color picker @@ -33,8 +33,8 @@ public abstract class AbstractColorPickerConnector private static final String DEFAULT_WIDTH_STYLE = "v-default-caption-width"; @Override - public ColorPickerState getState() { - return (ColorPickerState) super.getState(); + public AbstractColorPickerState getState() { + return (AbstractColorPickerState) super.getState(); } @Override diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java index 828cc689c7..fe775aaf44 100644 --- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.communication.RpcProxy; import com.vaadin.client.ui.VColorPickerArea; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.colorpicker.ColorPickerAreaState; import com.vaadin.shared.ui.colorpicker.ColorPickerServerRpc; import com.vaadin.ui.ColorPickerArea; @@ -64,4 +65,9 @@ public class ColorPickerAreaConnector extends AbstractColorPickerConnector { getWidget().refreshColor(); } + @Override + public ColorPickerAreaState getState() { + return (ColorPickerAreaState) super.getState(); + } + } diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java index 6254e7adbe..9a4368b0a4 100644 --- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.ui.VColorPicker; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; import com.vaadin.shared.ui.colorpicker.ColorPickerServerRpc; +import com.vaadin.shared.ui.colorpicker.ColorPickerState; import com.vaadin.ui.ColorPicker; /** @@ -66,4 +67,9 @@ public class ColorPickerConnector extends AbstractColorPickerConnector { protected void refreshColor() { getWidget().refreshColor(); } + + @Override + public ColorPickerState getState() { + return (ColorPickerState) super.getState(); + } } diff --git a/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java index 22abb495d9..c058522c4e 100644 --- a/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.HasComponentsConnector; import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.client.ui.VCustomComponent; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.customfield.CustomFieldState; import com.vaadin.ui.CustomField; @Connect(value = CustomField.class) @@ -121,4 +122,9 @@ public class CustomFieldConnector extends AbstractFieldConnector } } + @Override + public CustomFieldState getState() { + return (CustomFieldState) super.getState(); + } + } diff --git a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java index c129c12c8f..03cc60caca 100644 --- a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java @@ -18,6 +18,7 @@ package com.vaadin.client.ui.passwordfield; import com.vaadin.client.ui.VPasswordField; import com.vaadin.client.ui.textfield.TextFieldConnector; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.passwordfield.PasswordFieldState; import com.vaadin.ui.PasswordField; @Connect(PasswordField.class) @@ -27,4 +28,9 @@ public class PasswordFieldConnector extends TextFieldConnector { public VPasswordField getWidget() { return (VPasswordField) super.getWidget(); } + + @Override + public PasswordFieldState getState() { + return (PasswordFieldState) super.getState(); + } } |