@@ -598,16 +598,14 @@ public class ConnectorBundle { | |||
Map<JMethod, Set<MethodAttribute>> typeData = methodAttributes | |||
.get(type); | |||
if (typeData == null) { | |||
typeData = new TreeMap<>( | |||
jMethodComparator); | |||
typeData = new TreeMap<>(jMethodComparator); | |||
methodAttributes.put(type, typeData); | |||
} | |||
Map<JMethod, Set<MethodAttribute>> methods = methodAttributes | |||
.get(type); | |||
if (methods == null) { | |||
methods = new TreeMap<>( | |||
jMethodComparator); | |||
methods = new TreeMap<>(jMethodComparator); | |||
methodAttributes.put(type, methods); | |||
} | |||
@@ -24,6 +24,7 @@ import com.google.gwt.core.ext.typeinfo.JParameterizedType; | |||
import com.google.gwt.core.ext.typeinfo.JType; | |||
import com.google.gwt.core.ext.typeinfo.NotFoundException; | |||
import com.vaadin.client.connectors.AbstractRendererConnector; | |||
import com.vaadin.client.connectors.grid.AbstractGridRendererConnector; | |||
import elemental.json.JsonValue; | |||
@@ -66,15 +66,15 @@ public class AnimationUtil { | |||
listener.@com.vaadin.client.AnimationUtil.AnimationEndListener::onAnimationEnd(Lcom/google/gwt/dom/client/NativeEvent;)(e); | |||
}); | |||
callbackFunc.listener = listener; | |||
elem.addEventListener(@com.vaadin.client.AnimationUtil::ANIMATION_END_EVENT_NAME, callbackFunc, false); | |||
// Store function reference for later removal | |||
if(!elem._vaadin_animationend_callbacks) { | |||
elem._vaadin_animationend_callbacks = []; | |||
} | |||
elem._vaadin_animationend_callbacks.push(callbackFunc); | |||
return callbackFunc; | |||
}-*/; | |||
@@ -137,7 +137,7 @@ public class AnimationUtil { | |||
return event.mozAnimationName; | |||
else if(event.oAnimationName) | |||
return event.oAnimationName; | |||
return ""; | |||
}-*/; | |||
@@ -145,22 +145,22 @@ public class AnimationUtil { | |||
public static native String getAnimationName(ComputedStyle cstyle) | |||
/*-{ | |||
var cs = cstyle.@com.vaadin.client.ComputedStyle::computedStyle; | |||
if(!cs.getPropertyValue) | |||
return ""; | |||
if(cs.getPropertyValue("-webkit-animation-name")) | |||
return cs.getPropertyValue("-webkit-animation-name"); | |||
else if(cs.getPropertyValue("animation-name")) | |||
return cs.getPropertyValue("animation-name"); | |||
else if(cs.getPropertyValue("-moz-animation-name")) | |||
return cs.getPropertyValue("-moz-animation-name"); | |||
else if(cs.getPropertyValue("-o-animation-name")) | |||
return cs.getPropertyValue("-o-animation-name"); | |||
return ""; | |||
}-*/; | |||
@@ -175,7 +175,7 @@ public class AnimationUtil { | |||
'MozAnimation': 'animationend', | |||
'WebkitAnimation': 'webkitAnimationEnd' | |||
} | |||
for(var a in anims){ | |||
if( el.style[a] !== undefined ){ | |||
return anims[a]; | |||
@@ -194,7 +194,7 @@ public class AnimationUtil { | |||
'mozAnimation', | |||
'webkitAnimation' | |||
] | |||
for(var i=0; i < anims.length; i++) { | |||
if( el.style[anims[i]] !== undefined ){ | |||
return anims[i]; |
@@ -66,8 +66,8 @@ public class ComputedStyle { | |||
var cs = this.@com.vaadin.client.ComputedStyle::computedStyle; | |||
var elem = this.@com.vaadin.client.ComputedStyle::elem; | |||
// Border values need to be checked separately. The width might have a | |||
// meaningful value even if the border style is "none". In that case the | |||
// Border values need to be checked separately. The width might have a | |||
// meaningful value even if the border style is "none". In that case the | |||
// value should be 0. | |||
if(name.indexOf("border") > -1 && name.indexOf("Width") > -1) { | |||
var borderStyleProp = name.substring(0,name.length-5) + "Style"; | |||
@@ -111,7 +111,7 @@ public class ComputedStyle { | |||
} | |||
// Normalize margin values. This is not totally valid, but in most cases | |||
// Normalize margin values. This is not totally valid, but in most cases | |||
// it is what the user wants to know. | |||
if(name.indexOf("margin") > -1 && ret == "auto") { | |||
return "0px"; |
@@ -267,8 +267,7 @@ public class ConnectorMap { | |||
@Deprecated | |||
public Collection<? extends ServerConnector> getConnectors() { | |||
Collection<ComponentDetail> values = idToComponentDetail.values(); | |||
ArrayList<ServerConnector> arrayList = new ArrayList<>( | |||
values.size()); | |||
ArrayList<ServerConnector> arrayList = new ArrayList<>(values.size()); | |||
for (ComponentDetail componentDetail : values) { | |||
arrayList.add(componentDetail.getConnector()); | |||
} |
@@ -46,7 +46,7 @@ import com.google.gwt.user.client.ui.Widget; | |||
* if registration is null | |||
* register paintable as as handler for event | |||
* return the registration | |||
* else | |||
* else | |||
* if registration is not null | |||
* remove the handler from paintable | |||
* return null | |||
@@ -149,7 +149,7 @@ public class EventHelper { | |||
* {@code handlerRegistration} and adds it via provided | |||
* {@code handlerProvider} if connector has event listener with | |||
* {@code eventIdentifier}. | |||
* | |||
* | |||
* @param connector | |||
* connector to check event listener presence | |||
* @param eventIdentifier |
@@ -52,7 +52,7 @@ public final class FastStringMap<T> extends JavaScriptObject { | |||
for(var key in this) { | |||
if (Object.hasOwnProperty.call(this, key)) { | |||
keys.push(key); | |||
} | |||
} | |||
} | |||
return keys; | |||
}-*/; | |||
@@ -63,7 +63,7 @@ public final class FastStringMap<T> extends JavaScriptObject { | |||
for(var key in this) { | |||
if (Object.hasOwnProperty.call(this, key)) { | |||
size++; | |||
} | |||
} | |||
} | |||
return size; | |||
}-*/; |
@@ -402,7 +402,7 @@ public class JavaScriptConnectorHelper { | |||
private static native void updateNativeState(JavaScriptObject state, | |||
JavaScriptObject input) | |||
/*-{ | |||
// Copy all fields to existing state object | |||
// Copy all fields to existing state object | |||
for(var key in state) { | |||
if (state.hasOwnProperty(key)) { | |||
delete state[key]; |
@@ -27,7 +27,6 @@ import com.vaadin.client.metadata.NoDataException; | |||
import com.vaadin.client.metadata.TypeData; | |||
import com.vaadin.client.ui.UnknownComponentConnector; | |||
import com.vaadin.client.ui.UnknownExtensionConnector; | |||
import com.vaadin.client.ui.UnknownExtensionConnector; | |||
public class WidgetSet { | |||
/** |
@@ -251,7 +251,7 @@ public class StateChangeEvent | |||
target = target[nextSegment]; | |||
} | |||
} | |||
// Not defined if we reach something that isn't an object | |||
// Not defined if we reach something that isn't an object | |||
return false; | |||
}-*/; | |||
@@ -22,7 +22,7 @@ import com.vaadin.client.ui.ConnectorFocusAndBlurHandler; | |||
/** | |||
* Abstract class for listing widget connectors that contains focusable children | |||
* to track their focus/blur events. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
* @param <WIDGET> |
@@ -64,7 +64,7 @@ public class JavaScriptRendererConnector | |||
private static native JavaScriptObject createCellReferenceWrapper() | |||
/*-{ | |||
var reference = {}; | |||
var setProperty = function(name, getter, setter) { | |||
var descriptor = { | |||
get: getter | |||
@@ -74,25 +74,25 @@ public class JavaScriptRendererConnector | |||
} | |||
Object.defineProperty(reference, name, descriptor); | |||
}; | |||
setProperty("element", function() { | |||
return reference.target.@CellReference::getElement()(); | |||
}, null); | |||
setProperty("rowIndex", function() { | |||
return reference.target.@CellReference::getRowIndex()(); | |||
}, null); | |||
setProperty("columnIndex", function() { | |||
return reference.target.@CellReference::getColumnIndex()(); | |||
}, null); | |||
setProperty("colSpan", function() { | |||
return reference.target.@RendererCellReference::getColSpan()(); | |||
}, function(colSpan) { | |||
reference.target.@RendererCellReference::setColSpan(*)(colSpan); | |||
}); | |||
return reference; | |||
}-*/; | |||
@@ -21,7 +21,7 @@ import elemental.json.JsonObject; | |||
/** | |||
* A marker interface for connectors that have a data source. | |||
* | |||
* | |||
* @author Vaadin Ltd. | |||
* @see DataSource | |||
* @since 8.0 |
@@ -73,7 +73,7 @@ public abstract class AbstractGridRendererConnector<T> | |||
/** | |||
* Gets the grid connector for this renderer connector. | |||
* | |||
* | |||
* @return the parent grid connector. | |||
*/ | |||
protected GridConnector getGridConnector() { |
@@ -803,7 +803,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { | |||
/** | |||
* Checks if it is possible to currently fetch data from the remote data | |||
* source. | |||
* | |||
* | |||
* @return <code>true</code> if it is ok to try to fetch data, | |||
* <code>false</code> if it is known that fetching data will fail | |||
* and should not be tried right now. |
@@ -28,8 +28,8 @@ public class InputEvent extends DomEvent<InputHandler> { | |||
* Event type for InputEvent. Represents the meta-data associated with this | |||
* event. | |||
*/ | |||
private static final Type<InputHandler> TYPE = new Type<>( | |||
"input", new InputEvent()); | |||
private static final Type<InputHandler> TYPE = new Type<>("input", | |||
new InputEvent()); | |||
protected InputEvent() { | |||
} |
@@ -21,7 +21,7 @@ import com.vaadin.client.ui.AbstractConnector; | |||
/** | |||
* An abstract implementation for extension connectors. | |||
* | |||
* | |||
* @author Vaadin Ltd. | |||
* @since 7.0 | |||
*/ |
@@ -165,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); | |||
} | |||
}-*/; | |||
/** | |||
@@ -197,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 | |||
@@ -218,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 | |||
@@ -245,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); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}-*/; | |||
/** | |||
@@ -294,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++) { | |||
@@ -310,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++) { | |||
@@ -318,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 = ""; | |||
@@ -376,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]; | |||
@@ -408,10 +408,10 @@ public class ResponsiveConnector extends AbstractExtensionConnector | |||
} | |||
} | |||
} | |||
// Trim the output and return it | |||
return ranges.replace(/^\s+/, ""); | |||
}-*/; | |||
} |
@@ -165,11 +165,13 @@ public abstract class ConnectorBundleLoader { | |||
if (notice == null) { | |||
notice = new HTML(); | |||
notice.addClickHandler(new ClickHandler() { | |||
@Override | |||
public void onClick(ClickEvent event) { | |||
notice.removeFromParent(); | |||
} | |||
}); | |||
notice.addTouchStartHandler(new TouchStartHandler() { | |||
@Override | |||
public void onTouchStart(TouchStartEvent event) { | |||
notice.removeFromParent(); | |||
} |
@@ -354,7 +354,7 @@ public class TypeDataStore { | |||
} | |||
else { | |||
typeData[baseClassName] = {}; | |||
} | |||
} | |||
}-*/; | |||
private static native boolean hasGetter(JavaScriptObject typeData, |
@@ -161,7 +161,7 @@ public abstract class ClickableRenderer<T, W extends Widget> | |||
} | |||
private native static Escalator getEscalator(Grid<?> grid) | |||
/*-{ | |||
/*-{ | |||
return grid.@com.vaadin.client.widgets.Grid::escalator; | |||
}-*/; | |||
@@ -47,7 +47,7 @@ public class ConnectorFocusAndBlurHandler | |||
/** | |||
* Add focus/blur handlers to the widget of the {@code connector}. | |||
* | |||
* | |||
* @param connector | |||
* connector whose widget is a target to add focus/blur handlers | |||
* @return ConnectorFocusAndBlurHandler instance to remove all registered | |||
@@ -61,7 +61,7 @@ public class ConnectorFocusAndBlurHandler | |||
/** | |||
* Add focus/blur handlers to the widget and a state change handler for the | |||
* {@code connector}. | |||
* | |||
* | |||
* @param connector | |||
* connector to register state change handler | |||
* @param widget |
@@ -241,12 +241,12 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, | |||
return $entry(function(e) { | |||
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX; | |||
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY; | |||
// IE8 has only delta y | |||
if (isNaN(deltaY)) { | |||
deltaY = -0.5*e.wheelDelta; | |||
} | |||
@com.vaadin.client.ui.VComboBox.JsniUtil::moveScrollFromEvent(*)(widget, deltaX, deltaY, e, e.deltaMode); | |||
}); | |||
}-*/; |
@@ -129,8 +129,8 @@ public class VPopupCalendar extends VTextualDate | |||
// Description of the usage of the widget for assisitve device users | |||
descriptionForAssisitveDevicesElement = DOM.createDiv(); | |||
descriptionForAssisitveDevicesElement.setInnerText( | |||
DateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES); | |||
descriptionForAssisitveDevicesElement | |||
.setInnerText(DateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES); | |||
AriaHelper.ensureHasId(descriptionForAssisitveDevicesElement); | |||
Roles.getTextboxRole().setAriaDescribedbyProperty(text.getElement(), | |||
Id.of(descriptionForAssisitveDevicesElement)); |
@@ -355,7 +355,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
/** | |||
* Returns window position in list of opened and shown windows. | |||
* | |||
* | |||
* @since 8.0.0 | |||
*/ | |||
public final int getWindowOrder() { | |||
@@ -1509,7 +1509,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
/** | |||
* Adds a Handler for window order change event. | |||
* | |||
* | |||
* @since 8.0.0 | |||
* | |||
* @return registration object to deregister the handler | |||
@@ -1522,7 +1522,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
/** | |||
* Checks if a modal window is currently open. | |||
* | |||
* | |||
* @return <code>true</code> if a modal window is open, <code>false</code> | |||
* otherwise. | |||
*/ |
@@ -31,8 +31,8 @@ import com.vaadin.ui.components.colorpicker.ColorPickerGrid; | |||
/** | |||
* A class that defines the default implementation for a color picker grid | |||
* connector. Connects the server side | |||
* {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the | |||
* client side counterpart {@link VColorPickerGrid} | |||
* {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the client | |||
* side counterpart {@link VColorPickerGrid} | |||
* | |||
* @since 7.0.0 | |||
*/ |
@@ -70,7 +70,7 @@ public class VColorPickerGrid extends AbsolutePanel | |||
* The new grid replaces the old grid if one existed. | |||
* <p> | |||
* For internal use only. May be renamed or removed in a future release. | |||
* | |||
* | |||
* @param rowCount | |||
* @param columnCount | |||
*/ |
@@ -23,7 +23,6 @@ import com.google.gwt.event.logical.shared.CloseHandler; | |||
import com.google.gwt.user.client.ui.PopupPanel; | |||
import com.vaadin.client.ApplicationConnection; | |||
import com.vaadin.client.UIDL; | |||
import com.vaadin.client.annotations.OnStateChange; | |||
import com.vaadin.client.communication.StateChangeEvent; | |||
import com.vaadin.client.ui.VCalendarPanel.FocusChangeListener; | |||
import com.vaadin.client.ui.VPopupCalendar; |
@@ -725,8 +725,7 @@ public class LayoutDependencyTree { | |||
public Collection<ComponentConnector> getMeasureTargets() { | |||
JsArrayString targetIds = getMeasureTargetsJsArray(); | |||
int length = targetIds.length(); | |||
ArrayList<ComponentConnector> targets = new ArrayList<>( | |||
length); | |||
ArrayList<ComponentConnector> targets = new ArrayList<>(length); | |||
ConnectorMap connectorMap = ConnectorMap.get(connection); | |||
for (int i = 0; i < length; i++) { |
@@ -1,12 +1,12 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
@@ -22,9 +22,9 @@ import com.vaadin.client.ui.VWindow; | |||
/** | |||
* Event for window order position updates. | |||
* | |||
* | |||
* @since 8.0.0 | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
*/ | |||
public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
@@ -35,7 +35,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
/** | |||
* Creates a new event with the given order. | |||
* | |||
* | |||
* @param windows | |||
* The new order position for the VWindow | |||
*/ | |||
@@ -50,7 +50,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
/** | |||
* Returns windows in order. | |||
* | |||
* | |||
* @return windows in the specific order | |||
*/ | |||
public VWindow[] getWindows() { | |||
@@ -64,7 +64,7 @@ public class WindowOrderEvent extends GwtEvent<WindowOrderHandler> { | |||
/** | |||
* Gets the type of the event. | |||
* | |||
* | |||
* @return the type of the event | |||
*/ | |||
public static Type<WindowOrderHandler> getType() { |
@@ -1,12 +1,12 @@ | |||
/* | |||
* Copyright 2000-2016 Vaadin Ltd. | |||
* | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |||
* use this file except in compliance with the License. You may obtain a copy of | |||
* the License at | |||
* | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
@@ -19,16 +19,16 @@ import com.google.gwt.event.shared.EventHandler; | |||
/** | |||
* Handler for {@link WindowOrderEvent}s. | |||
* | |||
* | |||
* @since 8.0.0 | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
*/ | |||
public interface WindowOrderHandler extends EventHandler { | |||
/** | |||
* Called when the VWindow instances changed their order position. | |||
* | |||
* | |||
* @param event | |||
* Contains windows whose position has changed | |||
*/ |
@@ -645,7 +645,7 @@ public abstract class ScrollbarBundle implements DeferredWorker { | |||
* This needs to be made step-by-step because IE8 flat-out refuses to | |||
* fire a scroll event when the scroll size becomes smaller than the | |||
* offset size. All other browser need to suffer alongside. | |||
* | |||
* | |||
* This really should be changed to not use any temporary scroll | |||
* handlers at all once IE8 support is dropped, like now done only for | |||
* Firefox. |
@@ -87,7 +87,7 @@ public class EventCellReference<T> extends CellReference<T> { | |||
* Is the cell reference for a cell in the header of the Grid. | |||
* | |||
* @since 7.5 | |||
* @return <code>true</true> if referenced cell is in the header, | |||
* @return <code>true</true> if referenced cell is in the header, | |||
* <code>false</code> if not | |||
*/ | |||
public boolean isHeader() { | |||
@@ -98,7 +98,7 @@ public class EventCellReference<T> extends CellReference<T> { | |||
* Is the cell reference for a cell in the body of the Grid. | |||
* | |||
* @since 7.5 | |||
* @return <code>true</true> if referenced cell is in the body, | |||
* @return <code>true</true> if referenced cell is in the body, | |||
* <code>false</code> if not | |||
*/ | |||
public boolean isBody() { | |||
@@ -109,7 +109,7 @@ public class EventCellReference<T> extends CellReference<T> { | |||
* Is the cell reference for a cell in the footer of the Grid. | |||
* | |||
* @since 7.5 | |||
* @return <code>true</true> if referenced cell is in the footer, | |||
* @return <code>true</true> if referenced cell is in the footer, | |||
* <code>false</code> if not | |||
*/ | |||
public boolean isFooter() { |
@@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler; | |||
/** | |||
* Handler for a Grid {@link GridSelectionAllowedEvent}, called when the Grid is | |||
* becomes allowed for selection or disallowed. | |||
* | |||
* | |||
* @see GridSelectionAllowedEvent | |||
* @author Vaadin Ltd | |||
* @since 8.0 |
@@ -97,7 +97,7 @@ public interface SelectionModel<T> { | |||
* <p> | |||
* The check is done only for the client side actions. It doesn't affect | |||
* selection requests sent from the server side. | |||
* | |||
* | |||
* @param selectionAllowed | |||
* <code>true</code> if the user is allowed to change the | |||
* selection, <code>false</code> otherwise | |||
@@ -109,7 +109,7 @@ public interface SelectionModel<T> { | |||
* <p> | |||
* The check is done only for the client side actions. It doesn't affect | |||
* selection requests sent from the server side. | |||
* | |||
* | |||
* @return <code>true</code> if the user is allowed to change the selection, | |||
* <code>false</code> otherwise | |||
*/ |
@@ -37,7 +37,7 @@ import com.vaadin.client.ui.FocusableFlowPanel; | |||
* Focusable flow panel which fires focus/blur events if it or any of its child | |||
* is focused/blured, but doesn't fire events if it happens between its content | |||
* (child) elements. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
*/ |
@@ -468,9 +468,9 @@ public class Escalator extends Widget | |||
if (isCurrentBrowserIE11OrEdge()) { | |||
return vertical | |||
? event.getNativeEvent().getClientY() | |||
+ Window.getScrollTop() | |||
+ Window.getScrollTop() | |||
: event.getNativeEvent().getClientX() | |||
+ Window.getScrollLeft(); | |||
+ Window.getScrollLeft(); | |||
} | |||
JsArray<Touch> a = event.getNativeEvent().getTouches(); | |||
return vertical ? a.get(0).getPageY() : a.get(0).getPageX(); | |||
@@ -563,9 +563,11 @@ public class Escalator extends Widget | |||
// (#18737), | |||
// otherwise allow touch only if there is a single touch in the | |||
// event | |||
private boolean allowTouch(final TouchHandlerBundle.CustomTouchEvent event) { | |||
private boolean allowTouch( | |||
final TouchHandlerBundle.CustomTouchEvent event) { | |||
if (isCurrentBrowserIE11OrEdge()) { | |||
return (POINTER_EVENT_TYPE_TOUCH.equals(event.getPointerType())); | |||
return (POINTER_EVENT_TYPE_TOUCH | |||
.equals(event.getPointerType())); | |||
} else { | |||
return (event.getNativeEvent().getTouches().length() == 1); | |||
} | |||
@@ -987,8 +989,8 @@ public class Escalator extends Widget | |||
}-*/; | |||
/** | |||
* Using pointerdown, pointermove, pointerup, and pointercancel for IE11 and Edge instead of | |||
* touch* listeners (#18737) | |||
* Using pointerdown, pointermove, pointerup, and pointercancel for IE11 | |||
* and Edge instead of touch* listeners (#18737) | |||
* | |||
* @param element | |||
*/ | |||
@@ -1009,8 +1011,8 @@ public class Escalator extends Widget | |||
}-*/; | |||
/** | |||
* Using pointerdown, pointermove, pointerup, and pointercancel for IE11 and Edge instead of | |||
* touch* listeners (#18737) | |||
* Using pointerdown, pointermove, pointerup, and pointercancel for IE11 | |||
* and Edge instead of touch* listeners (#18737) | |||
* | |||
* @param element | |||
*/ | |||
@@ -6859,6 +6861,7 @@ public class Escalator extends Widget | |||
/** | |||
* Internal method for checking whether the browser is IE11 or Edge | |||
* | |||
* @return true only if the current browser is IE11, or Edge | |||
*/ | |||
private static boolean isCurrentBrowserIE11OrEdge() { |
@@ -25,7 +25,7 @@ import com.vaadin.client.Focusable; | |||
/** | |||
* Focusable composite whose widget is {@link ChildFocusAwareFlowPanel} (flow | |||
* panel that tracks focus/blur events from its children). | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
*/ |
@@ -36,9 +36,9 @@ import com.googlecode.gentyref.GenericTypeReflector; | |||
import com.vaadin.annotations.PropertyId; | |||
import com.vaadin.data.util.BeanUtil; | |||
import com.vaadin.data.validator.BeanValidator; | |||
import com.vaadin.server.Setter; | |||
import com.vaadin.server.SerializableFunction; | |||
import com.vaadin.server.SerializablePredicate; | |||
import com.vaadin.server.Setter; | |||
import com.vaadin.ui.Label; | |||
import com.vaadin.util.ReflectTools; | |||
@@ -160,8 +160,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { | |||
* @throws IllegalArgumentException | |||
* if the property has no accessible getter | |||
* | |||
* @see BindingBuilder#bind(ValueProvider, | |||
* Setter) | |||
* @see BindingBuilder#bind(ValueProvider, Setter) | |||
*/ | |||
public Binding<BEAN, TARGET> bind(String propertyName); | |||
} |
@@ -34,9 +34,9 @@ import com.vaadin.data.HasValue.ValueChangeEvent; | |||
import com.vaadin.data.converter.StringToIntegerConverter; | |||
import com.vaadin.event.EventRouter; | |||
import com.vaadin.server.ErrorMessage; | |||
import com.vaadin.server.Setter; | |||
import com.vaadin.server.SerializableFunction; | |||
import com.vaadin.server.SerializablePredicate; | |||
import com.vaadin.server.Setter; | |||
import com.vaadin.server.UserError; | |||
import com.vaadin.shared.Registration; | |||
import com.vaadin.ui.AbstractComponent; | |||
@@ -171,8 +171,7 @@ public class Binder<BEAN> implements Serializable { | |||
* @throws IllegalStateException | |||
* if {@code bind} has already been called on this binding | |||
*/ | |||
public Binding<BEAN, TARGET> bind( | |||
ValueProvider<BEAN, TARGET> getter, | |||
public Binding<BEAN, TARGET> bind(ValueProvider<BEAN, TARGET> getter, | |||
Setter<BEAN, TARGET> setter); | |||
/** | |||
@@ -255,8 +254,8 @@ public class Binder<BEAN> implements Serializable { | |||
* which must match the current target data type of the binding, and a | |||
* model type, which can be any data type and becomes the new target | |||
* type of the binding. When invoking | |||
* {@link #bind(ValueProvider, Setter)}, the | |||
* target type of the binding must match the getter/setter types. | |||
* {@link #bind(ValueProvider, Setter)}, the target type of the binding | |||
* must match the getter/setter types. | |||
* <p> | |||
* For instance, a {@code TextField} can be bound to an integer-typed | |||
* property using an appropriate converter such as a | |||
@@ -281,8 +280,8 @@ public class Binder<BEAN> implements Serializable { | |||
* type, which must match the current target data type of the binding, | |||
* and a model type, which can be any data type and becomes the new | |||
* target type of the binding. When invoking | |||
* {@link #bind(ValueProvider, Setter)}, the | |||
* target type of the binding must match the getter/setter types. | |||
* {@link #bind(ValueProvider, Setter)}, the target type of the binding | |||
* must match the getter/setter types. | |||
* <p> | |||
* For instance, a {@code TextField} can be bound to an integer-typed | |||
* property using appropriate functions such as: | |||
@@ -316,8 +315,8 @@ public class Binder<BEAN> implements Serializable { | |||
* type, which must match the current target data type of the binding, | |||
* and a model type, which can be any data type and becomes the new | |||
* target type of the binding. When invoking | |||
* {@link #bind(ValueProvider, Setter)}, the | |||
* target type of the binding must match the getter/setter types. | |||
* {@link #bind(ValueProvider, Setter)}, the target type of the binding | |||
* must match the getter/setter types. | |||
* <p> | |||
* For instance, a {@code TextField} can be bound to an integer-typed | |||
* property using appropriate functions such as: | |||
@@ -381,12 +380,13 @@ public class Binder<BEAN> implements Serializable { | |||
* default behavior). | |||
* <p> | |||
* This is just a shorthand for | |||
* {@link #withValidationStatusHandler(BindingValidationStatusHandler)} method | |||
* where the handler instance hides the {@code label} if there is no | |||
* error and shows it with validation error message if validation fails. | |||
* It means that it cannot be called after | |||
* {@link #withValidationStatusHandler(BindingValidationStatusHandler)} method | |||
* call or {@link #withValidationStatusHandler(BindingValidationStatusHandler)} | |||
* {@link #withValidationStatusHandler(BindingValidationStatusHandler)} | |||
* method where the handler instance hides the {@code label} if there is | |||
* no error and shows it with validation error message if validation | |||
* fails. It means that it cannot be called after | |||
* {@link #withValidationStatusHandler(BindingValidationStatusHandler)} | |||
* method call or | |||
* {@link #withValidationStatusHandler(BindingValidationStatusHandler)} | |||
* after this method call. | |||
* | |||
* @see #withValidationStatusHandler(BindingValidationStatusHandler) | |||
@@ -405,8 +405,8 @@ public class Binder<BEAN> implements Serializable { | |||
} | |||
/** | |||
* Sets a {@link BindingValidationStatusHandler} to track validation status | |||
* changes. | |||
* Sets a {@link BindingValidationStatusHandler} to track validation | |||
* status changes. | |||
* <p> | |||
* The validation state of each field is updated whenever the user | |||
* modifies the value of that field. The validation state is by default | |||
@@ -532,8 +532,7 @@ public class Binder<BEAN> implements Serializable { | |||
} | |||
@Override | |||
public Binding<BEAN, TARGET> bind( | |||
ValueProvider<BEAN, TARGET> getter, | |||
public Binding<BEAN, TARGET> bind(ValueProvider<BEAN, TARGET> getter, | |||
Setter<BEAN, TARGET> setter) { | |||
checkUnbound(); | |||
Objects.requireNonNull(getter, "getter cannot be null"); | |||
@@ -575,9 +574,9 @@ public class Binder<BEAN> implements Serializable { | |||
checkUnbound(); | |||
Objects.requireNonNull(handler, "handler cannot be null"); | |||
if (isStatusHandlerChanged) { | |||
throw new IllegalStateException( | |||
"A " + BindingValidationStatusHandler.class.getSimpleName() | |||
+ " has already been set"); | |||
throw new IllegalStateException("A " | |||
+ BindingValidationStatusHandler.class.getSimpleName() | |||
+ " has already been set"); | |||
} | |||
isStatusHandlerChanged = true; | |||
statusHandler = handler; | |||
@@ -735,7 +734,8 @@ public class Binder<BEAN> implements Serializable { | |||
/** | |||
* Returns the field value run through all converters and validators, | |||
* but doesn't pass the {@link BindingValidationStatus} to any status handler. | |||
* but doesn't pass the {@link BindingValidationStatus} to any status | |||
* handler. | |||
* | |||
* @return the result of the conversion | |||
*/ | |||
@@ -755,7 +755,8 @@ public class Binder<BEAN> implements Serializable { | |||
/** | |||
* Returns the field value run through all converters and validators, | |||
* but doesn't pass the {@link BindingValidationStatus} to any status handler. | |||
* but doesn't pass the {@link BindingValidationStatus} to any status | |||
* handler. | |||
* | |||
* @return the validation status | |||
*/ | |||
@@ -976,9 +977,8 @@ public class Binder<BEAN> implements Serializable { | |||
/** | |||
* Creates a new binding for the given field. The returned builder may be | |||
* further configured before invoking | |||
* {@link BindingBuilder#bind(ValueProvider, Setter)} | |||
* which completes the binding. Until {@code Binding.bind} is called, the | |||
* binding has no effect. | |||
* {@link BindingBuilder#bind(ValueProvider, Setter)} which completes the | |||
* binding. Until {@code Binding.bind} is called, the binding has no effect. | |||
* <p> | |||
* <strong>Note:</strong> Not all {@link HasValue} implementations support | |||
* passing {@code null} as the value. For these the Binder will | |||
@@ -1059,8 +1059,7 @@ public class Binder<BEAN> implements Serializable { | |||
* @return the newly created binding | |||
*/ | |||
public <FIELDVALUE> Binding<BEAN, FIELDVALUE> bind( | |||
HasValue<FIELDVALUE> field, | |||
ValueProvider<BEAN, FIELDVALUE> getter, | |||
HasValue<FIELDVALUE> field, ValueProvider<BEAN, FIELDVALUE> getter, | |||
Setter<BEAN, FIELDVALUE> setter) { | |||
return forField(field).bind(getter, setter); | |||
} | |||
@@ -1133,8 +1132,8 @@ public class Binder<BEAN> implements Serializable { | |||
setHasChanges(false); | |||
bindings.forEach(binding -> binding.initFieldValue(bean)); | |||
getValidationStatusHandler() | |||
.statusChange(BinderValidationStatus.createUnresolvedStatus(this)); | |||
getValidationStatusHandler().statusChange( | |||
BinderValidationStatus.createUnresolvedStatus(this)); | |||
fireStatusChangeEvent(false); | |||
} | |||
@@ -1208,8 +1207,8 @@ public class Binder<BEAN> implements Serializable { | |||
// First run fields level validation | |||
List<BindingValidationStatus<?>> bindingStatuses = validateBindings(); | |||
// If no validation errors then update bean | |||
if (bindingStatuses.stream().filter(BindingValidationStatus::isError).findAny() | |||
.isPresent()) { | |||
if (bindingStatuses.stream().filter(BindingValidationStatus::isError) | |||
.findAny().isPresent()) { | |||
fireStatusChangeEvent(true); | |||
return new BinderValidationStatus<>(this, bindingStatuses, | |||
Collections.emptyList()); | |||
@@ -1325,8 +1324,8 @@ public class Binder<BEAN> implements Serializable { | |||
List<BindingValidationStatus<?>> bindingStatuses = validateBindings(); | |||
BinderValidationStatus<BEAN> validationStatus; | |||
if (bindingStatuses.stream().filter(BindingValidationStatus::isError).findAny() | |||
.isPresent() || bean == null) { | |||
if (bindingStatuses.stream().filter(BindingValidationStatus::isError) | |||
.findAny().isPresent() || bean == null) { | |||
validationStatus = new BinderValidationStatus<>(this, | |||
bindingStatuses, Collections.emptyList()); | |||
} else { | |||
@@ -1371,11 +1370,10 @@ public class Binder<BEAN> implements Serializable { | |||
*/ | |||
private List<ValidationResult> validateBean(BEAN bean) { | |||
Objects.requireNonNull(bean, "bean cannot be null"); | |||
List<ValidationResult> results = Collections | |||
.unmodifiableList(validators.stream() | |||
.map(validator -> validator.apply(bean, | |||
new ValueContext())) | |||
.collect(Collectors.toList())); | |||
List<ValidationResult> results = Collections.unmodifiableList(validators | |||
.stream() | |||
.map(validator -> validator.apply(bean, new ValueContext())) | |||
.collect(Collectors.toList())); | |||
return results; | |||
} | |||
@@ -1472,9 +1470,7 @@ public class Binder<BEAN> implements Serializable { | |||
* <li>{@link #readBean(Object)} is called | |||
* <li>{@link #setBean(Object)} is called | |||
* <li>{@link #removeBean()} is called | |||
* <li> | |||
* {@link BindingBuilder#bind(ValueProvider, Setter)} | |||
* is called | |||
* <li>{@link BindingBuilder#bind(ValueProvider, Setter)} is called | |||
* <li>{@link Binder#validate()} or {@link Binding#validate()} is called | |||
* </ul> | |||
* | |||
@@ -1552,7 +1548,8 @@ public class Binder<BEAN> implements Serializable { | |||
} | |||
/** | |||
* Default {@link BindingValidationStatusHandler} functional method implementation. | |||
* Default {@link BindingValidationStatusHandler} functional method | |||
* implementation. | |||
* | |||
* @param status | |||
* the validation status | |||
@@ -1673,8 +1670,8 @@ public class Binder<BEAN> implements Serializable { | |||
if (bean != null) { | |||
bean = null; | |||
} | |||
getValidationStatusHandler() | |||
.statusChange(BinderValidationStatus.createUnresolvedStatus(this)); | |||
getValidationStatusHandler().statusChange( | |||
BinderValidationStatus.createUnresolvedStatus(this)); | |||
if (fireStatusEvent) { | |||
fireStatusChangeEvent(false); | |||
} |
@@ -71,8 +71,8 @@ public class BinderValidationStatus<BEAN> implements Serializable { | |||
public static <BEAN> BinderValidationStatus<BEAN> createUnresolvedStatus( | |||
Binder<BEAN> source) { | |||
return new BinderValidationStatus<>(source, | |||
source.getBindings().stream() | |||
.map(b -> BindingValidationStatus.createUnresolvedStatus(b)) | |||
source.getBindings().stream().map( | |||
b -> BindingValidationStatus.createUnresolvedStatus(b)) | |||
.collect(Collectors.toList()), | |||
Collections.emptyList()); | |||
} | |||
@@ -118,8 +118,9 @@ public class BinderValidationStatus<BEAN> implements Serializable { | |||
public boolean hasErrors() { | |||
return binderStatuses.stream().filter(ValidationResult::isError) | |||
.findAny().isPresent() | |||
|| bindingStatuses.stream().filter(BindingValidationStatus::isError) | |||
.findAny().isPresent(); | |||
|| bindingStatuses.stream() | |||
.filter(BindingValidationStatus::isError).findAny() | |||
.isPresent(); | |||
} | |||
/** |
@@ -19,6 +19,7 @@ package com.vaadin.data; | |||
import java.io.Serializable; | |||
import java.util.function.Function; | |||
import com.vaadin.data.Binder.BindingBuilder; | |||
import com.vaadin.server.SerializableFunction; | |||
/** |
@@ -16,14 +16,14 @@ | |||
package com.vaadin.data; | |||
import com.vaadin.server.SerializableConsumer; | |||
import com.vaadin.server.SerializableFunction; | |||
import com.vaadin.server.SerializableSupplier; | |||
import java.io.Serializable; | |||
import java.util.Objects; | |||
import java.util.Optional; | |||
import com.vaadin.server.SerializableConsumer; | |||
import com.vaadin.server.SerializableFunction; | |||
import com.vaadin.server.SerializableSupplier; | |||
/** | |||
* Represents the result of an operation that might fail, such as type | |||
* conversion. A result may contain either a value, signifying a successful | |||
@@ -131,7 +131,8 @@ public interface Result<R> extends Serializable { | |||
* @param ifError | |||
* the function to call if failure | |||
*/ | |||
public void handle(SerializableConsumer<R> ifOk, SerializableConsumer<String> ifError); | |||
public void handle(SerializableConsumer<R> ifOk, | |||
SerializableConsumer<String> ifError); | |||
/** | |||
* Applies the {@code consumer} if result is not an error. | |||
@@ -184,5 +185,6 @@ public interface Result<R> extends Serializable { | |||
* if this result denotes an error | |||
*/ | |||
public <X extends Throwable> R getOrThrow( | |||
SerializableFunction<String, ? extends X> exceptionProvider) throws X; | |||
SerializableFunction<String, ? extends X> exceptionProvider) | |||
throws X; | |||
} |
@@ -15,12 +15,12 @@ | |||
*/ | |||
package com.vaadin.data; | |||
import com.vaadin.server.SerializableConsumer; | |||
import com.vaadin.server.SerializableFunction; | |||
import java.util.Objects; | |||
import java.util.Optional; | |||
import com.vaadin.server.SerializableConsumer; | |||
import com.vaadin.server.SerializableFunction; | |||
/** | |||
* An internal implementation of {@code Result}. | |||
* | |||
@@ -66,7 +66,8 @@ class SimpleResult<R> implements Result<R> { | |||
} | |||
@Override | |||
public void handle(SerializableConsumer<R> ifOk, SerializableConsumer<String> ifError) { | |||
public void handle(SerializableConsumer<R> ifOk, | |||
SerializableConsumer<String> ifError) { | |||
Objects.requireNonNull(ifOk, "ifOk cannot be null"); | |||
Objects.requireNonNull(ifError, "ifError cannot be null"); | |||
if (isError()) { | |||
@@ -97,7 +98,8 @@ class SimpleResult<R> implements Result<R> { | |||
@Override | |||
public <X extends Throwable> R getOrThrow( | |||
SerializableFunction<String, ? extends X> exceptionSupplier) throws X { | |||
SerializableFunction<String, ? extends X> exceptionSupplier) | |||
throws X { | |||
Objects.requireNonNull(exceptionSupplier, | |||
"Exception supplier cannot be null"); | |||
if (isError()) { |
@@ -32,8 +32,7 @@ import com.vaadin.server.Setter; | |||
* <li>{@link Binder#readBean(Object)} is called | |||
* <li>{@link Binder#setBean(Object)} is called | |||
* <li>{@link Binder#removeBean()} is called | |||
* <li>{@link BindingBuilder#bind(ValueProvider, Setter)} | |||
* is called | |||
* <li>{@link BindingBuilder#bind(ValueProvider, Setter)} is called | |||
* <li>{@link Binder#validate()} or {@link Binding#validate()} is called | |||
* </ul> | |||
* |
@@ -44,7 +44,8 @@ public class ValidationException extends Exception { | |||
* @param beanValidationErrors | |||
* binder validation errors list | |||
*/ | |||
public ValidationException(List<BindingValidationStatus<?>> fieldValidationErrors, | |||
public ValidationException( | |||
List<BindingValidationStatus<?>> fieldValidationErrors, | |||
List<ValidationResult> beanValidationErrors) { | |||
super("Validation has failed for some fields"); | |||
this.fieldValidationErrors = Collections |
@@ -78,7 +78,7 @@ public interface ValidationResult extends Serializable { | |||
/** | |||
* Returns a successful result. | |||
* | |||
* | |||
* @return the successful result | |||
*/ | |||
public static ValidationResult ok() { | |||
@@ -88,7 +88,7 @@ public interface ValidationResult extends Serializable { | |||
/** | |||
* Creates the validation result which represent an error with the given | |||
* {@code errorMessage}. | |||
* | |||
* | |||
* @param errorMessage | |||
* error message, not {@code null} | |||
* @return validation result which represent an error with the given |
@@ -39,8 +39,8 @@ public class ValueContext implements Serializable { | |||
* Constructor for {@code ValueContext} without a {@code Locale}. | |||
*/ | |||
public ValueContext() { | |||
this.component = null; | |||
this.locale = findLocale(); | |||
component = null; | |||
locale = findLocale(); | |||
} | |||
/** | |||
@@ -50,7 +50,7 @@ public class ValueContext implements Serializable { | |||
* The locale used with conversion. Can be null. | |||
*/ | |||
public ValueContext(Locale locale) { | |||
this.component = null; | |||
component = null; | |||
this.locale = locale; | |||
} | |||
@@ -64,7 +64,7 @@ public class ValueContext implements Serializable { | |||
Objects.requireNonNull(component, | |||
"Component can't be null in ValueContext construction"); | |||
this.component = component; | |||
this.locale = findLocale(); | |||
locale = findLocale(); | |||
} | |||
private Locale findLocale() { |
@@ -23,7 +23,7 @@ import com.vaadin.server.SerializableFunction; | |||
* For example this interface can be implemented to simply extract a value with | |||
* a getter, or to create a composite value based on the fields of the source | |||
* object. | |||
* | |||
* | |||
* @author Vaadin Ltd. | |||
* @since 8.0 | |||
* | |||
@@ -49,7 +49,7 @@ public interface ValueProvider<SOURCE, TARGET> | |||
/** | |||
* Provides a value from the given source object. | |||
* | |||
* | |||
* @param source | |||
* the source to retrieve the value from | |||
* @return the value provided by the source |
@@ -35,7 +35,8 @@ public interface DataGenerator<T> extends Serializable { | |||
/** | |||
* Adds custom data for the given item to its serialized {@code JsonObject} | |||
* representation. This JSON object will be sent to client-side DataProvider. | |||
* representation. This JSON object will be sent to client-side | |||
* DataProvider. | |||
* | |||
* @param item | |||
* the data item being serialized |
@@ -20,7 +20,7 @@ import java.io.Serializable; | |||
/** | |||
* Interface for listening for a data change events fired by a | |||
* {@link DataProvider}. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* @since 8.0 | |||
*/ |
@@ -15,6 +15,7 @@ | |||
*/ | |||
package com.vaadin.event; | |||
import java.util.Arrays; | |||
import java.util.HashSet; | |||
import java.util.LinkedHashSet; | |||
import java.util.Map; | |||
@@ -26,7 +27,6 @@ import com.vaadin.server.PaintException; | |||
import com.vaadin.server.PaintTarget; | |||
import com.vaadin.server.VariableOwner; | |||
import com.vaadin.ui.Component; | |||
import java.util.Arrays; | |||
/** | |||
* Javadoc TODO |
@@ -190,7 +190,7 @@ public interface FieldEvents { | |||
/** | |||
* Focus and blur server RPC implementation which fires focus or blur event | |||
* using a provided event handler. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
*/ | |||
@@ -201,7 +201,7 @@ public interface FieldEvents { | |||
/** | |||
* Create a new decorator instance. | |||
* | |||
* | |||
* @param component | |||
* the source events component | |||
* @param eventHandler |
@@ -78,7 +78,7 @@ public class SortEvent<T> extends Component.Event { | |||
/** | |||
* Listener for sort order change events. | |||
* | |||
* | |||
* @param <T> | |||
* the type of the sorting information, usually a String (field | |||
* id) or a {@link java.util.Comparator}. | |||
@@ -97,7 +97,7 @@ public class SortEvent<T> extends Component.Event { | |||
/** | |||
* The interface for adding and removing listeners for {@link SortEvent | |||
* SortEvents}. | |||
* | |||
* | |||
* @param <T> | |||
* the type of the sorting information, usually a String (field | |||
* id) or a {@link java.util.Comparator}. |
@@ -63,8 +63,8 @@ public class SourceIs extends ClientSideCriterion { | |||
@Override | |||
public boolean accept(DragAndDropEvent dragEvent) { | |||
if (dragEvent.getTransferable() instanceof TransferableImpl) { | |||
Component sourceComponent = dragEvent | |||
.getTransferable().getSourceComponent(); | |||
Component sourceComponent = dragEvent.getTransferable() | |||
.getSourceComponent(); | |||
for (Component c : components) { | |||
if (c == sourceComponent) { | |||
return true; |
@@ -46,8 +46,8 @@ public class SourceIsTarget extends ClientSideCriterion { | |||
@Override | |||
public boolean accept(DragAndDropEvent dragEvent) { | |||
if (dragEvent.getTransferable() instanceof TransferableImpl) { | |||
Component sourceComponent = dragEvent | |||
.getTransferable().getSourceComponent(); | |||
Component sourceComponent = dragEvent.getTransferable() | |||
.getSourceComponent(); | |||
DropTarget target = dragEvent.getTargetDetails().getTarget(); | |||
return sourceComponent == target; | |||
} |
@@ -878,8 +878,7 @@ public abstract class AbstractClientConnector | |||
* <p> | |||
* Note: Using this method is discouraged because it cannot be checked | |||
* during compilation. Use {@link #addListener(Class, Object, Method)} or | |||
* {@link #addListener(String, Class, Object, Method) instead. | |||
* </p> | |||
* {@link #addListener(String, Class, Object, Method) instead. </p> | |||
* | |||
* @param eventType | |||
* the type of the listened event. Events of this type or its | |||
@@ -920,9 +919,8 @@ public abstract class AbstractClientConnector | |||
* @param target | |||
* the target object that has registered to listen to events of | |||
* type <code>eventType</code> with one or more methods. | |||
* @deprecated use a {@link Registration} from | |||
* {@link #addListener} to remove a | |||
* listener | |||
* @deprecated use a {@link Registration} from {@link #addListener} to | |||
* remove a listener | |||
*/ | |||
@Deprecated | |||
@Override |
@@ -354,7 +354,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { | |||
throws IOException { | |||
response.setContentType("text/html"); | |||
try (BufferedWriter writer = new BufferedWriter( | |||
new OutputStreamWriter(response.getOutputStream(), "UTF-8"))) { | |||
new OutputStreamWriter(response.getOutputStream(), "UTF-8"))) { | |||
writer.append(html); | |||
} | |||
} |
@@ -209,7 +209,7 @@ public class BrowserWindowOpener extends AbstractExtension { | |||
} | |||
// Avoid breaking url to multiple lines | |||
// @formatter:off | |||
// @formatter:off | |||
/** | |||
* Sets the features for opening the window. See e.g. | |||
* {@link https://developer.mozilla.org/en-US/docs/DOM/window.open#Position_and_size_features} |
@@ -17,7 +17,9 @@ package com.vaadin.server; | |||
import java.io.PrintStream; | |||
import java.io.Serializable; | |||
import java.util.ArrayDeque; | |||
import java.util.ArrayList; | |||
import java.util.Deque; | |||
import java.util.HashMap; | |||
import java.util.Iterator; | |||
import java.util.LinkedList; | |||
@@ -40,8 +42,6 @@ import com.vaadin.ui.TabSheet; | |||
import com.vaadin.ui.UI; | |||
import com.vaadin.ui.VerticalLayout; | |||
import com.vaadin.ui.Window; | |||
import java.util.ArrayDeque; | |||
import java.util.Deque; | |||
@SuppressWarnings({ "serial", "deprecation" }) | |||
public class ComponentSizeValidator implements Serializable { | |||
@@ -104,7 +104,7 @@ public class ComponentSizeValidator implements Serializable { | |||
/** | |||
* Comparability form component which is defined in the different jar. | |||
* | |||
* | |||
* TODO : Normally this logic shouldn't be here. But it means that the whole | |||
* this class has wrong design and implementation and should be refactored. | |||
*/ | |||
@@ -402,7 +402,8 @@ public class ComponentSizeValidator implements Serializable { | |||
} | |||
if (createLoc != null) { | |||
err.append(", created at (").append(createLoc.file).append(":").append(createLoc.lineNumber).append(")"); | |||
err.append(", created at (").append(createLoc.file).append(":") | |||
.append(createLoc.lineNumber).append(")"); | |||
} | |||
@@ -410,7 +411,8 @@ public class ComponentSizeValidator implements Serializable { | |||
err.append(" ("); | |||
err.append(attribute); | |||
if (sizeLoc != null) { | |||
err.append(", set at (").append(sizeLoc.file).append(":").append(sizeLoc.lineNumber).append(")"); | |||
err.append(", set at (").append(sizeLoc.file).append(":") | |||
.append(sizeLoc.lineNumber).append(")"); | |||
} | |||
err.append(")"); | |||
@@ -512,7 +514,7 @@ public class ComponentSizeValidator implements Serializable { | |||
/** | |||
* Comparability form component which is defined in the different jar. | |||
* | |||
* | |||
* TODO : Normally this logic shouldn't be here. But it means that the whole | |||
* this class has wrong design and impementation and should be refactored. | |||
*/ | |||
@@ -713,8 +715,7 @@ public class ComponentSizeValidator implements Serializable { | |||
public static List<InvalidLayout> validateLayouts(UI ui) { | |||
List<InvalidLayout> invalidRelativeSizes = ComponentSizeValidator | |||
.validateComponentRelativeSizes(ui.getContent(), | |||
new ArrayList<>(), | |||
null); | |||
new ArrayList<>(), null); | |||
// Also check any existing subwindows | |||
if (ui.getWindows() != null) { |
@@ -499,8 +499,7 @@ public class JsonCodec implements Serializable { | |||
assert (keys.length() == values.length()); | |||
Map<Object, Object> map = new HashMap<>( | |||
keys.length() * 2); | |||
Map<Object, Object> map = new HashMap<>(keys.length() * 2); | |||
for (int i = 0; i < keys.length(); i++) { | |||
Object key = decodeInternalOrCustomType(keyType, keys.get(i), | |||
connectorTracker); |
@@ -19,9 +19,13 @@ package com.vaadin.server; | |||
import java.io.PrintWriter; | |||
import java.io.Serializable; | |||
import java.io.Writer; | |||
import java.util.ArrayDeque; | |||
import java.util.ArrayList; | |||
import java.util.Collection; | |||
import java.util.Deque; | |||
import java.util.HashSet; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Set; | |||
import java.util.logging.Level; | |||
@@ -30,10 +34,6 @@ import java.util.logging.Logger; | |||
import com.vaadin.ui.Alignment; | |||
import com.vaadin.ui.Component; | |||
import com.vaadin.ui.CustomLayout; | |||
import java.util.ArrayDeque; | |||
import java.util.ArrayList; | |||
import java.util.Deque; | |||
import java.util.List; | |||
/** | |||
* User Interface Description Language Target. |
@@ -299,7 +299,6 @@ public class LegacyCommunicationManager implements Serializable { | |||
} | |||
} | |||
/** | |||
* @deprecated As of 7.1. In 7.2 and later, use | |||
* {@link ConnectorTracker#getConnector(String) |
@@ -49,8 +49,8 @@ public class LegacyVaadinPortlet extends VaadinPortlet { | |||
getService().addSessionInitListener((SessionInitEvent event) -> { | |||
try { | |||
onVaadinSessionStarted( | |||
(VaadinPortletRequest) event.getRequest(), | |||
(VaadinPortletSession) event.getSession()); | |||
(VaadinPortletRequest) event.getRequest(), | |||
(VaadinPortletSession) event.getSession()); | |||
} catch (PortletException e) { | |||
throw new ServiceException(e); | |||
} |
@@ -49,8 +49,7 @@ public class LegacyVaadinServlet extends VaadinServlet { | |||
getService().addSessionInitListener((SessionInitEvent event) -> { | |||
try { | |||
onVaadinSessionStarted(event.getRequest(), | |||
event.getSession()); | |||
onVaadinSessionStarted(event.getRequest(), event.getSession()); | |||
} catch (ServletException e) { | |||
throw new ServiceException(e); | |||
} |
@@ -206,8 +206,7 @@ public class LocaleService implements Serializable { | |||
final boolean twelve_hour_clock = timeformat.contains("a"); | |||
// TODO there are other possibilities as well, like 'h' in french | |||
// (ignore them, too complicated) | |||
final String hour_min_delimiter = timeformat.contains(".") ? "." | |||
: ":"; | |||
final String hour_min_delimiter = timeformat.contains(".") ? "." : ":"; | |||
// outWriter.print("\"tf\":\"" + timeformat + "\","); | |||
localeData.twelveHourClock = twelve_hour_clock; | |||
localeData.hourMinuteDelimiter = hour_min_delimiter; |
@@ -20,7 +20,7 @@ import java.util.Comparator; | |||
/** | |||
* A {@link Comparator} that is also {@link Serializable}. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* @param <T> | |||
* the type of objects that may be compared by this comparator | |||
@@ -33,7 +33,7 @@ public interface SerializableComparator<T> extends Comparator<T>, Serializable { | |||
/** | |||
* Returns a {@link SerializableComparator} instance which delegates its | |||
* logic to the provided {@code comparator}. | |||
* | |||
* | |||
* @param comparator | |||
* comparator to convert | |||
* @param <T> |
@@ -20,11 +20,11 @@ import java.util.function.Consumer; | |||
/** | |||
* A {@link Consumer} that is also {@link Serializable}. | |||
* | |||
* | |||
* @see Consumer | |||
* @param <T> | |||
* the type of the first argument to the operation | |||
* | |||
* | |||
* @since 8.0 | |||
* @author Vaadin Ltd | |||
* |
@@ -20,7 +20,7 @@ import java.util.function.Predicate; | |||
/** | |||
* A {@link Predicate} that is also {@link Serializable}. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* @since 8.0 | |||
* @param <T> |
@@ -16,7 +16,6 @@ | |||
package com.vaadin.server; | |||
import java.io.Serializable; | |||
import java.util.function.Function; | |||
import java.util.function.Supplier; | |||
/** | |||
@@ -29,7 +28,6 @@ import java.util.function.Supplier; | |||
* the type of the input to the function | |||
*/ | |||
@FunctionalInterface | |||
public interface SerializableSupplier<T> | |||
extends Supplier<T>, Serializable { | |||
public interface SerializableSupplier<T> extends Supplier<T>, Serializable { | |||
// Only method inherited from Supplier | |||
} |
@@ -15,22 +15,22 @@ | |||
*/ | |||
package com.vaadin.server; | |||
import com.vaadin.data.Binder; | |||
import com.vaadin.data.HasValue; | |||
import java.io.Serializable; | |||
import java.util.function.BiConsumer; | |||
import com.vaadin.data.Binder; | |||
import com.vaadin.data.HasValue; | |||
/** | |||
* The function to write the field value to the bean property | |||
* | |||
* | |||
* @see BiConsumer | |||
* @see Binder#bind(HasValue, SerializableFunction, Setter) | |||
* @param <BEAN> | |||
* the type of the target bean | |||
* @param <FIELDVALUE> | |||
* the field value type to be written to the bean | |||
* | |||
* | |||
* @since 8.0 | |||
* @author Vaadin Ltd | |||
* | |||
@@ -39,12 +39,13 @@ import java.util.function.BiConsumer; | |||
public interface Setter<BEAN, FIELDVALUE> | |||
extends BiConsumer<BEAN, FIELDVALUE>, Serializable { | |||
/** Save value to the bean property | |||
/** | |||
* Save value to the bean property | |||
* | |||
* @param bean | |||
* the target bean | |||
* the target bean | |||
* @param fieldvalue | |||
* the field value to be written to the bean | |||
* the field value to be written to the bean | |||
*/ | |||
@Override | |||
void accept(BEAN bean, FIELDVALUE fieldvalue); |
@@ -63,31 +63,31 @@ public class UnsupportedBrowserHandler extends SynchronizedRequestHandler { | |||
VaadinResponse response) throws IOException { | |||
try (Writer page = response.getWriter()) { | |||
WebBrowser b = VaadinSession.getCurrent().getBrowser(); | |||
page.write( | |||
"<html><body><h1>I'm sorry, but your browser is not supported</h1>" | |||
+ "<p>The version (" + b.getBrowserMajorVersion() + "." | |||
+ b.getBrowserMinorVersion() | |||
+ ") of the browser you are using " | |||
+ " is outdated and not supported.</p>" | |||
+ "<p>You should <b>consider upgrading</b> to a more up-to-date browser.</p> " | |||
+ "<p>The most popular browsers are <b>" | |||
+ " <a href=\"https://www.google.com/chrome\">Chrome</a>," | |||
+ " <a href=\"http://www.mozilla.com/firefox\">Firefox</a>," | |||
+ (b.isWindows() | |||
? " <a href=\"http://windows.microsoft.com/en-US/internet-explorer/downloads/ie\">Internet Explorer</a>," | |||
: "") | |||
+ " <a href=\"http://www.opera.com/browser\">Opera</a>" | |||
+ " and <a href=\"http://www.apple.com/safari\">Safari</a>.</b><br/>" | |||
+ "Upgrading to the latest version of one of these <b>will make the web safer, faster and better looking.</b></p>" | |||
+ (b.isIE() | |||
? "<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js\"></script>" | |||
+ "<p>If you can not upgrade your browser, please consider trying <a onclick=\"CFInstall.check({mode:'overlay'});return false;\" href=\"http://www.google.com/chromeframe\">Chrome Frame</a>.</p>" | |||
: "") // | |||
+ "<p><sub><a onclick=\"document.cookie='" | |||
+ FORCE_LOAD_COOKIE | |||
+ "';window.location.reload();return false;\" href=\"#\">Continue without updating</a> (not recommended)</sub></p>" | |||
+ "</body>\n" + "</html>"); | |||
"<html><body><h1>I'm sorry, but your browser is not supported</h1>" | |||
+ "<p>The version (" + b.getBrowserMajorVersion() | |||
+ "." + b.getBrowserMinorVersion() | |||
+ ") of the browser you are using " | |||
+ " is outdated and not supported.</p>" | |||
+ "<p>You should <b>consider upgrading</b> to a more up-to-date browser.</p> " | |||
+ "<p>The most popular browsers are <b>" | |||
+ " <a href=\"https://www.google.com/chrome\">Chrome</a>," | |||
+ " <a href=\"http://www.mozilla.com/firefox\">Firefox</a>," | |||
+ (b.isWindows() | |||
? " <a href=\"http://windows.microsoft.com/en-US/internet-explorer/downloads/ie\">Internet Explorer</a>," | |||
: "") | |||
+ " <a href=\"http://www.opera.com/browser\">Opera</a>" | |||
+ " and <a href=\"http://www.apple.com/safari\">Safari</a>.</b><br/>" | |||
+ "Upgrading to the latest version of one of these <b>will make the web safer, faster and better looking.</b></p>" | |||
+ (b.isIE() | |||
? "<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js\"></script>" | |||
+ "<p>If you can not upgrade your browser, please consider trying <a onclick=\"CFInstall.check({mode:'overlay'});return false;\" href=\"http://www.google.com/chromeframe\">Chrome Frame</a>.</p>" | |||
: "") // | |||
+ "<p><sub><a onclick=\"document.cookie='" | |||
+ FORCE_LOAD_COOKIE | |||
+ "';window.location.reload();return false;\" href=\"#\">Continue without updating</a> (not recommended)</sub></p>" | |||
+ "</body>\n" + "</html>"); | |||
} | |||
} | |||
} |
@@ -47,6 +47,7 @@ import com.liferay.portal.kernel.util.PortalClassLoaderUtil; | |||
import com.liferay.portal.kernel.util.PropsUtil; | |||
import com.vaadin.server.communication.PortletDummyRequestHandler; | |||
import com.vaadin.server.communication.PortletUIInitHandler; | |||
import com.vaadin.ui.UI; | |||
import com.vaadin.util.CurrentInstance; | |||
/** | |||
@@ -359,8 +360,7 @@ public class VaadinPortlet extends GenericPortlet | |||
Class<?> portletRequestClass = Class.forName( | |||
"com.bea.portlet.container.PortletRequestImpl"); | |||
servletRequestMethod = portletRequestClass | |||
.getDeclaredMethod("getInternalRequest" | |||
); | |||
.getDeclaredMethod("getInternalRequest"); | |||
servletRequestMethod.setAccessible(true); | |||
} | |||
@@ -675,10 +675,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { | |||
} | |||
/** | |||
* Gets the currently used session. The current session is | |||
* automatically defined when processing requests related to the session | |||
* (see {@link ThreadLocal}) and in {@link VaadinSession#access(Command)} | |||
* and {@link UI#access(Command)}. In other cases, (e.g. from background | |||
* Gets the currently used session. The current session is automatically | |||
* defined when processing requests related to the session (see | |||
* {@link ThreadLocal}) and in {@link VaadinSession#access(Command)} and | |||
* {@link UI#access(Command)}. In other cases, (e.g. from background | |||
* threads, the current session is not automatically defined. | |||
* <p> | |||
* The session is stored using a weak reference to avoid leaking memory in |
@@ -124,17 +124,14 @@ public class ClientRpcWriter implements Serializable { | |||
List<ClientMethodInvocation> oldPendingRpc = pendingInvocations; | |||
int totalCalls = pendingInvocations.size() | |||
+ paintablePendingRpc.size(); | |||
pendingInvocations = new ArrayList<>( | |||
totalCalls); | |||
pendingInvocations = new ArrayList<>(totalCalls); | |||
// merge two ordered comparable lists | |||
for (int destIndex = 0, oldIndex = 0, paintableIndex = 0; destIndex < totalCalls; destIndex++) { | |||
if (paintableIndex >= paintablePendingRpc.size() | |||
|| (oldIndex < oldPendingRpc.size() | |||
&& oldPendingRpc | |||
.get(oldIndex).compareTo( | |||
paintablePendingRpc.get( | |||
paintableIndex)) <= 0)) { | |||
|| (oldIndex < oldPendingRpc.size() && oldPendingRpc | |||
.get(oldIndex).compareTo(paintablePendingRpc | |||
.get(paintableIndex)) <= 0)) { | |||
pendingInvocations.add(oldPendingRpc.get(oldIndex++)); | |||
} else { | |||
pendingInvocations |
@@ -678,7 +678,7 @@ public class FileUploadHandler implements RequestHandler { | |||
response.setContentType("text/html"); | |||
try (OutputStream out = response.getOutputStream()) { | |||
final PrintWriter outWriter = new PrintWriter( | |||
new BufferedWriter(new OutputStreamWriter(out, "UTF-8"))); | |||
new BufferedWriter(new OutputStreamWriter(out, "UTF-8"))); | |||
outWriter.print("<html><body>download handled</body></html>"); | |||
outWriter.flush(); | |||
} | |||
@@ -687,8 +687,8 @@ public class FileUploadHandler implements RequestHandler { | |||
private void cleanStreamVariable(VaadinSession session, final UI ui, | |||
final ClientConnector owner, final String variableName) { | |||
session.accessSynchronously(() -> { | |||
ui.getConnectorTracker().cleanStreamVariable( | |||
owner.getConnectorId(), variableName); | |||
ui.getConnectorTracker().cleanStreamVariable(owner.getConnectorId(), | |||
variableName); | |||
}); | |||
} | |||
} |
@@ -22,7 +22,6 @@ import java.io.Writer; | |||
import java.util.ArrayList; | |||
import java.util.Collection; | |||
import java.util.Collections; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.logging.Logger; | |||
@@ -78,7 +78,8 @@ public class PortletBootstrapHandler extends BootstrapHandler { | |||
&& !portalTheme.equals(context.getThemeName())) { | |||
String portalThemeUri = getThemeUri(context, portalTheme); | |||
// XSS safe - originates from portal properties | |||
builder.append("vaadin.loadTheme('").append(portalThemeUri).append("');"); | |||
builder.append("vaadin.loadTheme('").append(portalThemeUri) | |||
.append("');"); | |||
} | |||
super.appendMainScriptTagContents(context, builder); |
@@ -61,7 +61,7 @@ public class PortletDummyRequestHandler implements RequestHandler { | |||
final OutputStream out = ((ResourceResponse) response) | |||
.getPortletOutputStream(); | |||
try (PrintWriter outWriter = new PrintWriter( | |||
new BufferedWriter(new OutputStreamWriter(out, "UTF-8")))) { | |||
new BufferedWriter(new OutputStreamWriter(out, "UTF-8")))) { | |||
outWriter.print("<html><body>dummy page</body></html>"); | |||
} | |||
@@ -71,13 +71,14 @@ public class PushHandler { | |||
* open by calling resource.suspend(). If there is a pending push, send it | |||
* now. | |||
*/ | |||
private final PushEventCallback establishCallback = (AtmosphereResource resource, UI ui) -> { | |||
private final PushEventCallback establishCallback = ( | |||
AtmosphereResource resource, UI ui) -> { | |||
getLogger().log(Level.FINER, | |||
"New push connection for resource {0} with transport {1}", | |||
new Object[] { resource.uuid(), resource.transport() }); | |||
"New push connection for resource {0} with transport {1}", | |||
new Object[] { resource.uuid(), resource.transport() }); | |||
resource.getResponse().setContentType("text/plain; charset=UTF-8"); | |||
VaadinSession session = ui.getSession(); | |||
if (resource.transport() == TRANSPORT.STREAMING) { | |||
// Must ensure that the streaming response contains | |||
@@ -87,21 +88,21 @@ public class PushHandler { | |||
// connection) | |||
resource.getResponse().addHeader("Connection", "close"); | |||
} | |||
String requestToken = resource.getRequest() | |||
.getParameter(ApplicationConstants.CSRF_TOKEN_PARAMETER); | |||
.getParameter(ApplicationConstants.CSRF_TOKEN_PARAMETER); | |||
if (!VaadinService.isCsrfTokenValid(session, requestToken)) { | |||
getLogger().log(Level.WARNING, | |||
"Invalid CSRF token in new connection received from {0}", | |||
resource.getRequest().getRemoteHost()); | |||
"Invalid CSRF token in new connection received from {0}", | |||
resource.getRequest().getRemoteHost()); | |||
// Refresh on client side, create connection just for | |||
// sending a message | |||
sendRefreshAndDisconnect(resource); | |||
return; | |||
} | |||
suspend(resource); | |||
AtmospherePushConnection connection = getConnectionForUI(ui); | |||
assert (connection != null); | |||
connection.connect(resource); | |||
@@ -114,43 +115,43 @@ public class PushHandler { | |||
* the request and send changed UI state via the push channel (we do not | |||
* respond to the request directly.) | |||
*/ | |||
private final PushEventCallback receiveCallback = (AtmosphereResource resource, UI ui) -> { | |||
private final PushEventCallback receiveCallback = ( | |||
AtmosphereResource resource, UI ui) -> { | |||
getLogger().log(Level.FINER, "Received message from resource {0}", | |||
resource.uuid()); | |||
resource.uuid()); | |||
AtmosphereRequest req = resource.getRequest(); | |||
AtmospherePushConnection connection = getConnectionForUI(ui); | |||
assert connection != null : "Got push from the client " | |||
+ "even though the connection does not seem to be " | |||
+ "valid. This might happen if a HttpSession is " | |||
+ "serialized and deserialized while the push " | |||
+ "connection is kept open or if the UI has a " | |||
+ "connection of unexpected type."; | |||
+ "even though the connection does not seem to be " | |||
+ "valid. This might happen if a HttpSession is " | |||
+ "serialized and deserialized while the push " | |||
+ "connection is kept open or if the UI has a " | |||
+ "connection of unexpected type."; | |||
Reader reader = connection.receiveMessage(req.getReader()); | |||
if (reader == null) { | |||
// The whole message was not yet received | |||
return; | |||
} | |||
// Should be set up by caller | |||
VaadinRequest vaadinRequest = VaadinService.getCurrentRequest(); | |||
assert vaadinRequest != null; | |||
try { | |||
new ServerRpcHandler().handleRpc(ui, reader, vaadinRequest); | |||
connection.push(false); | |||
} catch (JsonException e) { | |||
getLogger().log(Level.SEVERE, "Error writing JSON to response", | |||
e); | |||
getLogger().log(Level.SEVERE, "Error writing JSON to response", e); | |||
// Refresh on client side | |||
sendRefreshAndDisconnect(resource); | |||
} catch (InvalidUIDLSecurityKeyException e) { | |||
getLogger().log(Level.WARNING, | |||
"Invalid security key received from {0}", | |||
resource.getRequest().getRemoteHost()); | |||
"Invalid security key received from {0}", | |||
resource.getRequest().getRemoteHost()); | |||
// Refresh on client side | |||
sendRefreshAndDisconnect(resource); | |||
} |
@@ -37,7 +37,6 @@ import org.atmosphere.util.VoidAnnotationProcessor; | |||
import com.vaadin.server.RequestHandler; | |||
import com.vaadin.server.ServiceDestroyEvent; | |||
import com.vaadin.server.ServiceDestroyListener; | |||
import com.vaadin.server.ServiceException; | |||
import com.vaadin.server.ServletPortletHelper; | |||
import com.vaadin.server.SessionExpiredHandler; |
@@ -54,8 +54,7 @@ public class SessionRequestHandler implements RequestHandler { | |||
session.lock(); | |||
ArrayList<RequestHandler> requestHandlers; | |||
try { | |||
requestHandlers = new ArrayList<>( | |||
session.getRequestHandlers()); | |||
requestHandlers = new ArrayList<>(session.getRequestHandlers()); | |||
} finally { | |||
session.unlock(); | |||
} |
@@ -85,24 +85,24 @@ public class WidgetSetBuilder { | |||
} | |||
widgetsetFile.createNewFile(); | |||
try (PrintStream printStream = new PrintStream( | |||
new FileOutputStream(widgetsetFile))) { | |||
new FileOutputStream(widgetsetFile))) { | |||
printStream.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" | |||
+ "<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN\" \"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd\">\n"); | |||
+ "<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN\" \"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd\">\n"); | |||
printStream.print("<module>\n"); | |||
printStream.print(" <!--\n" | |||
+ " Uncomment the following to compile the widgetset for one browser only.\n\n" | |||
+ " Multiple browsers can be specified as a comma separated list. The\n" | |||
+ " supported user agents at the moment of writing were:\n" | |||
+ " ie8,ie9,gecko1_8,safari,opera\n\n" | |||
+ " The value gecko1_8 is used for Firefox and safari is used for webkit\n" | |||
+ " based browsers including Google Chrome.\n" | |||
+ " -->\n" | |||
+ " <!-- <set-property name=\"user.agent\" value=\"safari\"/> -->\n\n" | |||
+ " <!--\n" | |||
+ " To enable SuperDevMode, uncomment this line.\n\n" | |||
+ " See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more\n" | |||
+ " information and instructions.\n" + " -->\n" | |||
+ " <!-- <set-configuration-property name=\"devModeRedirectEnabled\" value=\"true\" /> -->\n\n"); | |||
+ " Uncomment the following to compile the widgetset for one browser only.\n\n" | |||
+ " Multiple browsers can be specified as a comma separated list. The\n" | |||
+ " supported user agents at the moment of writing were:\n" | |||
+ " ie8,ie9,gecko1_8,safari,opera\n\n" | |||
+ " The value gecko1_8 is used for Firefox and safari is used for webkit\n" | |||
+ " based browsers including Google Chrome.\n" | |||
+ " -->\n" | |||
+ " <!-- <set-property name=\"user.agent\" value=\"safari\"/> -->\n\n" | |||
+ " <!--\n" | |||
+ " To enable SuperDevMode, uncomment this line.\n\n" | |||
+ " See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more\n" | |||
+ " information and instructions.\n" + " -->\n" | |||
+ " <!-- <set-configuration-property name=\"devModeRedirectEnabled\" value=\"true\" /> -->\n\n"); | |||
printStream.print("\n</module>\n"); | |||
} | |||
changed = true; | |||
@@ -156,7 +156,7 @@ public class WidgetSetBuilder { | |||
private static void commitChanges(File widgetsetFile, String content) | |||
throws IOException { | |||
try (BufferedWriter bufferedWriter = new BufferedWriter( | |||
new OutputStreamWriter(new FileOutputStream(widgetsetFile)))) { | |||
new OutputStreamWriter(new FileOutputStream(widgetsetFile)))) { | |||
bufferedWriter.write(content); | |||
} | |||
} |
@@ -22,9 +22,9 @@ import java.util.Objects; | |||
import org.jsoup.nodes.Attributes; | |||
import org.jsoup.nodes.Element; | |||
import com.vaadin.shared.ui.colorpicker.AbstractColorPickerState; | |||
import com.vaadin.shared.ui.colorpicker.Color; | |||
import com.vaadin.shared.ui.colorpicker.ColorPickerServerRpc; | |||
import com.vaadin.shared.ui.colorpicker.AbstractColorPickerState; | |||
import com.vaadin.ui.components.colorpicker.ColorPickerPopup; | |||
import com.vaadin.ui.declarative.DesignAttributeHandler; | |||
import com.vaadin.ui.declarative.DesignContext; |
@@ -280,7 +280,7 @@ public abstract class AbstractListing<T> extends AbstractComponent | |||
* This method is separated from {@link writeDesign(Element, DesignContext)} | |||
* to be overridable in subclasses that need to replace this, but still must | |||
* be able to call {@code super.writeDesign(...)}. | |||
* | |||
* | |||
* @see #doReadDesign(Element, DesignContext) | |||
* | |||
* @param design | |||
@@ -360,7 +360,7 @@ public abstract class AbstractListing<T> extends AbstractComponent | |||
* This method is separated from {@link readDesign(Element, DesignContext)} | |||
* to be overridable in subclasses that need to replace this, but still must | |||
* be able to call {@code super.readDesign(...)}. | |||
* | |||
* | |||
* @see #doWriteDesign(Element, DesignContext) | |||
* | |||
* @param design |
@@ -272,6 +272,7 @@ public abstract class AbstractTextField extends AbstractField<String> | |||
/** | |||
* Clears the value of this field. | |||
*/ | |||
@Override | |||
public void clear() { | |||
setValue(""); | |||
} |
@@ -23,11 +23,6 @@ import java.util.Map; | |||
import java.util.Objects; | |||
import java.util.Set; | |||
import com.vaadin.server.KeyMapper; | |||
import com.vaadin.server.Resource; | |||
import com.vaadin.server.ResourceReference; | |||
import com.vaadin.server.SerializableBiPredicate; | |||
import com.vaadin.server.SerializableConsumer; | |||
import org.jsoup.nodes.Element; | |||
import com.vaadin.data.HasValue; | |||
@@ -41,6 +36,11 @@ import com.vaadin.event.FieldEvents.BlurListener; | |||
import com.vaadin.event.FieldEvents.FocusAndBlurServerRpcDecorator; | |||
import com.vaadin.event.FieldEvents.FocusEvent; | |||
import com.vaadin.event.FieldEvents.FocusListener; | |||
import com.vaadin.server.KeyMapper; | |||
import com.vaadin.server.Resource; | |||
import com.vaadin.server.ResourceReference; | |||
import com.vaadin.server.SerializableBiPredicate; | |||
import com.vaadin.server.SerializableConsumer; | |||
import com.vaadin.shared.Registration; | |||
import com.vaadin.shared.data.DataCommunicatorConstants; | |||
import com.vaadin.shared.ui.combobox.ComboBoxConstants; | |||
@@ -238,13 +238,12 @@ public class ComboBox<T> extends AbstractSingleSelect<T> | |||
* conversion is performed before the comparison. | |||
* | |||
* @param captionFilter | |||
* filter to check if an item is shown when user typed some text into the ComboBox | |||
* filter to check if an item is shown when user typed some text | |||
* into the ComboBox | |||
* @param items | |||
* the data items to display | |||
*/ | |||
public void setItems( | |||
CaptionFilter captionFilter, | |||
Collection<T> items) { | |||
public void setItems(CaptionFilter captionFilter, Collection<T> items) { | |||
DataProvider<T, String> provider = DataProvider.create(items) | |||
.convertFilter(filterText -> item -> captionFilter.test( | |||
getItemCaptionGenerator().apply(item), filterText)); | |||
@@ -259,12 +258,12 @@ public class ComboBox<T> extends AbstractSingleSelect<T> | |||
* conversion is performed before the comparison. | |||
* | |||
* @param captionFilter | |||
* filter to check if an item is shown when user typed some text into the ComboBox | |||
* filter to check if an item is shown when user typed some text | |||
* into the ComboBox | |||
* @param items | |||
* the data items to display | |||
*/ | |||
public void setItems( | |||
CaptionFilter captionFilter, | |||
public void setItems(CaptionFilter captionFilter, | |||
@SuppressWarnings("unchecked") T... items) { | |||
DataProvider<T, String> provider = DataProvider.create(items) | |||
.convertFilter(filterText -> item -> captionFilter.test( | |||
@@ -555,8 +554,8 @@ public class ComboBox<T> extends AbstractSingleSelect<T> | |||
public Registration addValueChangeListener( | |||
HasValue.ValueChangeListener<T> listener) { | |||
return addSelectionListener(event -> { | |||
listener.valueChange(new ValueChangeEvent<>(event.getComponent(), this, | |||
event.isUserOriginated())); | |||
listener.valueChange(new ValueChangeEvent<>(event.getComponent(), | |||
this, event.isUserOriginated())); | |||
}); | |||
} | |||
@@ -676,20 +675,23 @@ public class ComboBox<T> extends AbstractSingleSelect<T> | |||
} | |||
/** | |||
* Predicate to check {@link ComboBox} item captions against user typed strings. | |||
* Predicate to check {@link ComboBox} item captions against user typed | |||
* strings. | |||
* | |||
* @see #setItems(CaptionFilter, Collection) | |||
* @see #setItems(CaptionFilter, Object[]) | |||
*/ | |||
@FunctionalInterface | |||
public interface CaptionFilter extends SerializableBiPredicate<String, String> { | |||
public interface CaptionFilter | |||
extends SerializableBiPredicate<String, String> { | |||
/** | |||
* Check item caption against entered text | |||
* | |||
* @param itemCaption | |||
* @param filterText | |||
* @return {@code true} if item passes the filter and should be listed, {@code false} otherwise | |||
* @return {@code true} if item passes the filter and should be listed, | |||
* {@code false} otherwise | |||
*/ | |||
@Override | |||
public boolean test(String itemCaption, String filterText); |
@@ -725,8 +725,7 @@ public class ConnectorTracker implements Serializable { | |||
@SuppressWarnings("unchecked") | |||
HashMap<ClientConnector, String> stringDiffStates = (HashMap<ClientConnector, String>) in | |||
.readObject(); | |||
diffStates = new HashMap<>( | |||
stringDiffStates.size() * 2); | |||
diffStates = new HashMap<>(stringDiffStates.size() * 2); | |||
for (ClientConnector key : stringDiffStates.keySet()) { | |||
try { | |||
diffStates.put(key, Json.parse(stringDiffStates.get(key))); |
@@ -166,7 +166,7 @@ public abstract class CustomField<T> extends AbstractField<T> | |||
* <p> | |||
* By default, {@link Focusable} events are handled by the super class and | |||
* ultimately ignored. | |||
* | |||
* | |||
* @param focusDelegate | |||
* the focusable component to which focus events are redirected | |||
*/ |
@@ -77,7 +77,6 @@ import com.vaadin.shared.ui.grid.GridState; | |||
import com.vaadin.shared.ui.grid.GridStaticCellType; | |||
import com.vaadin.shared.ui.grid.HeightMode; | |||
import com.vaadin.shared.ui.grid.SectionState; | |||
import com.vaadin.ui.Grid.SelectionMode; | |||
import com.vaadin.ui.components.grid.ColumnReorderListener; | |||
import com.vaadin.ui.components.grid.ColumnResizeListener; | |||
import com.vaadin.ui.components.grid.ColumnVisibilityChangeListener; |
@@ -57,12 +57,12 @@ public interface HasValueChangeMode extends Component { | |||
/** | |||
* Returns the currently set timeout, in milliseconds, for how often | |||
* {@link ValueChangeEvent}s are triggered if the current {@link ValueChangeMode} | |||
* is set to either {@link ValueChangeMode#LAZY} or | |||
* {@link ValueChangeEvent}s are triggered if the current | |||
* {@link ValueChangeMode} is set to either {@link ValueChangeMode#LAZY} or | |||
* {@link ValueChangeMode#TIMEOUT}. | |||
* | |||
* @return the timeout in milliseconds of how often {@link ValueChangeEvent}s are | |||
* triggered. | |||
* @return the timeout in milliseconds of how often | |||
* {@link ValueChangeEvent}s are triggered. | |||
*/ | |||
public int getValueChangeTimeout(); | |||
@@ -16,8 +16,10 @@ | |||
package com.vaadin.ui; | |||
import java.io.Serializable; | |||
import java.util.ArrayDeque; | |||
import java.util.ArrayList; | |||
import java.util.Collection; | |||
import java.util.Deque; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -35,8 +37,6 @@ import com.vaadin.shared.ui.menubar.MenuBarState; | |||
import com.vaadin.ui.Component.Focusable; | |||
import com.vaadin.ui.declarative.DesignAttributeHandler; | |||
import com.vaadin.ui.declarative.DesignContext; | |||
import java.util.ArrayDeque; | |||
import java.util.Deque; | |||
/** | |||
* <p> |
@@ -29,12 +29,12 @@ import com.vaadin.shared.Registration; | |||
/** | |||
* Multi selection component which allows to select and deselect multiple items. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
* | |||
* @param <T> | |||
* the type of the items to select | |||
* | |||
* | |||
* @since 8.0 | |||
* | |||
*/ |
@@ -169,6 +169,7 @@ public class RichTextArea extends AbstractField<String> | |||
/** | |||
* Clears the value of this field. | |||
*/ | |||
@Override | |||
public void clear() { | |||
setValue(""); | |||
} |
@@ -19,9 +19,9 @@ import com.vaadin.data.HasValue; | |||
/** | |||
* Single selection component whose selection is treated as a value. | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
* | |||
* @param <V> | |||
* the selection value type | |||
* |
@@ -413,7 +413,7 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
/** | |||
* Fire a window order event. | |||
* | |||
* | |||
* @param windows | |||
* The windows with their orders whose order has been updated. | |||
*/ | |||
@@ -1788,13 +1788,13 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
* <p> | |||
* The other way to listen window position for specific window is | |||
* {@link Window#addWindowOrderChangeListener(WindowOrderChangeListener)} | |||
* | |||
* | |||
* @see Window#addWindowOrderChangeListener(WindowOrderChangeListener) | |||
* | |||
* | |||
* @param listener | |||
* the WindowModeChangeListener to add. | |||
* @since 8.0.0 | |||
* | |||
* | |||
* @return a registration object for removing the listener | |||
*/ | |||
public Registration addWindowOrderUpdateListener( | |||
@@ -1810,12 +1810,12 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
* <p> | |||
* The other way to listen window position for specific window is | |||
* {@link Window#addWindowOrderChangeListener(WindowOrderChangeListener)} | |||
* | |||
* | |||
* @see Window.WindowOrderChangeEvent | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* @since 8.0.0 | |||
* | |||
* | |||
*/ | |||
public static class WindowOrderUpdateEvent extends Component.Event { | |||
@@ -1830,7 +1830,7 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
/** | |||
* Gets the windows in the order they appear in the UI: top most window | |||
* is first, bottom one last. | |||
* | |||
* | |||
* @return the windows collection | |||
*/ | |||
public Collection<Window> getWindows() { | |||
@@ -1840,9 +1840,9 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
/** | |||
* An interface used for listening to Windows order update events. | |||
* | |||
* | |||
* @since 8.0.0 | |||
* | |||
* | |||
* @see Window.WindowOrderChangeEvent | |||
*/ | |||
@FunctionalInterface | |||
@@ -1858,7 +1858,7 @@ public abstract class UI extends AbstractSingleComponentContainer | |||
* {@link Window}s whose order positions are updated. Use | |||
* {@link Window#getOrderPosition()} to get window position for specific | |||
* window. | |||
* | |||
* | |||
* @param event | |||
*/ | |||
public void windowOrderUpdated(WindowOrderUpdateEvent event); |
@@ -335,11 +335,11 @@ public class Window extends Panel | |||
* Window with position 0 is on the bottom, and window with greatest | |||
* position is at the top. If window has no position (it's not yet attached | |||
* or hidden) then position is {@code -1}. | |||
* | |||
* | |||
* @see UI#addWindowOrderUpdateListener(com.vaadin.ui.UI.WindowOrderUpdateListener) | |||
* | |||
* | |||
* @since 8.0.0 | |||
* | |||
* | |||
* @return window order position. | |||
*/ | |||
public int getOrderPosition() { | |||
@@ -396,11 +396,11 @@ public class Window extends Panel | |||
/** | |||
* Event which is fired when the window order position is changed. | |||
* | |||
* | |||
* @see UI.WindowOrderUpdateEvent | |||
* | |||
* | |||
* @author Vaadin Ltd | |||
* | |||
* | |||
*/ | |||
public static class WindowOrderChangeEvent extends Component.Event { | |||
@@ -413,7 +413,7 @@ public class Window extends Panel | |||
/** | |||
* Gets the Window. | |||
* | |||
* | |||
* @return the window | |||
*/ | |||
public Window getWindow() { | |||
@@ -422,7 +422,7 @@ public class Window extends Panel | |||
/** | |||
* Gets the new window order position. | |||
* | |||
* | |||
* @return the new order position | |||
*/ | |||
public int getOrder() { | |||
@@ -432,7 +432,7 @@ public class Window extends Panel | |||
/** | |||
* An interface used for listening to Window order change events. | |||
* | |||
* | |||
* @see UI.WindowOrderUpdateListener | |||
*/ | |||
@FunctionalInterface | |||
@@ -448,7 +448,7 @@ public class Window extends Panel | |||
* {@link Window} whose order position is changed. Use | |||
* {@link WindowOrderChangeEvent#getOrder()} to get a new order | |||
* position. | |||
* | |||
* | |||
* @param event | |||
*/ | |||
public void windowOrderChanged(WindowOrderChangeEvent event); | |||
@@ -463,9 +463,9 @@ public class Window extends Panel | |||
* <p> | |||
* The other way to listen positions of all windows in UI is | |||
* {@link UI#addWindowOrderUpdateListener(com.vaadin.ui.UI.WindowOrderUpdateListener)} | |||
* | |||
* | |||
* @see UI#addWindowOrderUpdateListener(com.vaadin.ui.UI.WindowOrderUpdateListener) | |||
* | |||
* | |||
* @param listener | |||
* the WindowModeChangeListener to add. | |||
*/ | |||
@@ -478,8 +478,8 @@ public class Window extends Panel | |||
} | |||
protected void fireWindowOrderChange(Integer order) { | |||
if (order == null || this.orderPosition != order) { | |||
this.orderPosition = (order == null) ? -1 : order; | |||
if (order == null || orderPosition != order) { | |||
orderPosition = (order == null) ? -1 : order; | |||
fireEvent(new Window.WindowOrderChangeEvent(this, | |||
getOrderPosition())); | |||
} |
@@ -187,9 +187,9 @@ public class ColorPickerSelect extends CustomField<Color> { | |||
* <p> | |||
* Value can be {@code null} if component is not yet initialized via | |||
* {@link #initContent()} | |||
* | |||
* | |||
* @see ColorPickerSelect#initContent() | |||
* | |||
* | |||
* @return the selected color, may be {@code null} | |||
*/ | |||
@Override |
@@ -22,7 +22,7 @@ import com.vaadin.ui.Component; | |||
* A callback interface for generating an editor component corresponding to an | |||
* editable column of a grid. The generated component will be used in the grid | |||
* editor to edit the value of the column for the selected grid row. | |||
* | |||
* | |||
* @author Vaadin Ltd. | |||
* @since 8.0 | |||
* | |||
@@ -35,7 +35,7 @@ public interface EditorComponentGenerator<BEAN> | |||
/** | |||
* Gets a component for a given {@code bean}. | |||
* | |||
* | |||
* @param bean | |||
* the bean this component will be used to edit | |||
* @return the generated component |