summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-09-28 15:57:23 +0300
committerGitHub <noreply@github.com>2017-09-28 15:57:23 +0300
commit198ec82c51cc3dc132676aeb74c7e44bef08adb6 (patch)
tree4872885df161b028a4256a7ea3700571d0584f0f /server
parent830af38f4cc5487b588fd99f28c5b252c87055f7 (diff)
downloadvaadin-framework-198ec82c51cc3dc132676aeb74c7e44bef08adb6.tar.gz
vaadin-framework-198ec82c51cc3dc132676aeb74c7e44bef08adb6.zip
Add since tags and update release notes (#10109)
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/data/Binder.java44
-rw-r--r--server/src/main/java/com/vaadin/server/WebBrowser.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/Notification.java44
-rw-r--r--server/src/main/java/com/vaadin/ui/Tree.java8
4 files changed, 58 insertions, 46 deletions
diff --git a/server/src/main/java/com/vaadin/data/Binder.java b/server/src/main/java/com/vaadin/data/Binder.java
index b57e76571d..d09a6c1665 100644
--- a/server/src/main/java/com/vaadin/data/Binder.java
+++ b/server/src/main/java/com/vaadin/data/Binder.java
@@ -129,9 +129,9 @@ public class Binder<BEAN> implements Serializable {
/**
* Gets the validation status handler for this Binding.
- *
+ *
* @return the validation status handler for this binding
- *
+ *
* @since 8.2
*/
public BindingValidationStatusHandler getValidationStatusHandler();
@@ -423,11 +423,9 @@ public class Binder<BEAN> implements Serializable {
TARGET nullRepresentation) {
return withConverter(
fieldValue -> Objects.equals(fieldValue, nullRepresentation)
- ? null
- : fieldValue,
+ ? null : fieldValue,
modelValue -> Objects.isNull(modelValue)
- ? nullRepresentation
- : modelValue);
+ ? nullRepresentation : modelValue);
}
/**
@@ -1111,9 +1109,10 @@ public class Binder<BEAN> implements Serializable {
* trigger validating and writing of the whole bean if using
* {@link #setBean(Object)}. If using {@link #readBean(Object)} only the
* field validation is run.
- *
+ *
* @param binding
* the binding whose value has been changed
+ * @since 8.2
*/
protected void handleFieldValueChange(Binding<BEAN, ?> binding) {
changedBindings.add(binding);
@@ -1520,7 +1519,7 @@ public class Binder<BEAN> implements Serializable {
* Changes have been succesfully saved. The set is only cleared
* if using readBean/writeBean or when the changes are stored in
* the currently set bean.
- *
+ *
* Writing changes to another bean when using setBean does not
* clear the set of changed bindings.
*/
@@ -1538,12 +1537,12 @@ public class Binder<BEAN> implements Serializable {
/**
* Restores the state of the bean from the given values.
- *
+ *
* @param bean
* the bean
* @param oldValues
* the old values
- *
+ *
* @since 8.2
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@@ -1560,14 +1559,14 @@ public class Binder<BEAN> implements Serializable {
/**
* Stores the state of the given bean.
- *
+ *
* @param bean
* the bean to store the state of
* @param bindings
* the bindings to store
- *
+ *
* @return map from binding to value
- *
+ *
* @since 8.2
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@@ -1689,12 +1688,12 @@ public class Binder<BEAN> implements Serializable {
* Validates the values of all bound fields and returns the validation
* status. This method can skip firing the event, based on the given
* {@code boolean}.
- *
+ *
* @param fireEvent
* {@code true} to fire validation status events; {@code false}
* to not
* @return validation status for the binder
- *
+ *
* @since 8.2
*/
protected BinderValidationStatus<BEAN> validate(boolean fireEvent) {
@@ -2159,8 +2158,7 @@ public class Binder<BEAN> implements Serializable {
Converter<FIELDVALUE, FIELDVALUE> nullRepresentationConverter = Converter
.from(fieldValue -> fieldValue,
modelValue -> Objects.isNull(modelValue)
- ? field.getEmptyValue()
- : modelValue,
+ ? field.getEmptyValue() : modelValue,
exception -> exception.getMessage());
ConverterDelegate<FIELDVALUE> converter = new ConverterDelegate<>(
nullRepresentationConverter);
@@ -2490,10 +2488,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Finds and removes all Bindings for the given field.
- *
+ *
* @param field
* the field to remove from bindings
- *
+ *
* @since 8.2
*/
public void removeBinding(HasValue<?> field) {
@@ -2506,10 +2504,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Removes the given Binding from this Binder.
- *
+ *
* @param binding
* the binding to remove
- *
+ *
* @since 8.2
*/
public void removeBinding(Binding<BEAN, ?> binding) {
@@ -2542,10 +2540,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Finds and removes the Binding for the given property name.
- *
+ *
* @param propertyName
* the propertyName to remove from bindings
- *
+ *
* @since 8.2
*/
public void removeBinding(String propertyName) {
diff --git a/server/src/main/java/com/vaadin/server/WebBrowser.java b/server/src/main/java/com/vaadin/server/WebBrowser.java
index b221d3ff6d..0a5e6f2dc4 100644
--- a/server/src/main/java/com/vaadin/server/WebBrowser.java
+++ b/server/src/main/java/com/vaadin/server/WebBrowser.java
@@ -359,7 +359,9 @@ public class WebBrowser implements Serializable {
* (if the browser supports this feature).
*
* @return the TimeZone Id if provided by the browser, null otherwise.
- * @see <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions">Intl.DateTimeFormat.prototype.resolvedOptions()</a>
+ * @see <a href=
+ * "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions">Intl.DateTimeFormat.prototype.resolvedOptions()</a>
+ * @since 8.2
*/
public String getTimeZoneId() {
return timeZoneId;
@@ -500,9 +502,9 @@ public class WebBrowser implements Serializable {
this.dstInEffect = Boolean.parseBoolean(dstInEffect);
}
if (tzId == null || "undefined".equals(tzId)) {
- this.timeZoneId = null;
+ timeZoneId = null;
} else {
- this.timeZoneId = tzId;
+ timeZoneId = tzId;
}
if (curDate != null) {
try {
diff --git a/server/src/main/java/com/vaadin/ui/Notification.java b/server/src/main/java/com/vaadin/ui/Notification.java
index 5183a7c37b..83c145ec70 100644
--- a/server/src/main/java/com/vaadin/ui/Notification.java
+++ b/server/src/main/java/com/vaadin/ui/Notification.java
@@ -23,7 +23,6 @@ import com.vaadin.event.ConnectorEvent;
import com.vaadin.server.AbstractExtension;
import com.vaadin.server.Page;
import com.vaadin.server.Resource;
-import com.vaadin.server.ResourceReference;
import com.vaadin.shared.Position;
import com.vaadin.shared.Registration;
import com.vaadin.shared.ui.notification.NotificationServerRpc;
@@ -72,6 +71,8 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* The server RPC.
+ *
+ * @since 8.2
*/
protected NotificationServerRpc rpc = () -> {
fireEvent(new CloseEvent(Notification.this));
@@ -287,8 +288,7 @@ public class Notification extends AbstractExtension implements Serializable {
* Sets the position of the notification message.
*
* @param position
- * The desired notification position,
- * not {@code null}
+ * The desired notification position, not {@code null}
*/
public void setPosition(Position position) {
if (position == null) {
@@ -319,8 +319,8 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* Gets the delay before the notification disappears.
*
- * @return the delay in milliseconds, {@value #DELAY_FOREVER}
- * indicates the message has to be clicked.
+ * @return the delay in milliseconds, {@value #DELAY_FOREVER} indicates the
+ * message has to be clicked.
*/
public int getDelayMsec() {
return getState(false).delay;
@@ -330,8 +330,8 @@ public class Notification extends AbstractExtension implements Serializable {
* Sets the delay before the notification disappears.
*
* @param delayMsec
- * the desired delay in milliseconds, {@value #DELAY_FOREVER}
- * to require the user to click the message
+ * the desired delay in milliseconds, {@value #DELAY_FOREVER} to
+ * require the user to click the message
*/
public void setDelayMsec(int delayMsec) {
getState().delay = delayMsec;
@@ -374,8 +374,8 @@ public class Notification extends AbstractExtension implements Serializable {
* Checks whether caption and description are interpreted as HTML or plain
* text.
*
- * @return {@code true} if the texts are used as HTML,
- * {@code false} if used as plain text
+ * @return {@code true} if the texts are used as HTML, {@code false} if used
+ * as plain text
* @see #setHtmlContentAllowed(boolean)
*/
public boolean isHtmlContentAllowed() {
@@ -413,8 +413,7 @@ public class Notification extends AbstractExtension implements Serializable {
*
* @param caption
* The message
- * @return
- * The Notification
+ * @return The Notification
*/
public static Notification show(String caption) {
Notification notification = new Notification(caption);
@@ -437,8 +436,7 @@ public class Notification extends AbstractExtension implements Serializable {
* The message
* @param type
* The message type
- * @return
- * The Notification
+ * @return The Notification
*/
public static Notification show(String caption, Type type) {
Notification notification = new Notification(caption, type);
@@ -463,11 +461,12 @@ public class Notification extends AbstractExtension implements Serializable {
* The message description
* @param type
* The message type
- * @return
- * The Notification
+ * @return The Notification
*/
- public static Notification show(String caption, String description, Type type) {
- Notification notification = new Notification(caption, description, type);
+ public static Notification show(String caption, String description,
+ Type type) {
+ Notification notification = new Notification(caption, description,
+ type);
notification.extend(UI.getCurrent());
return notification;
}
@@ -495,6 +494,11 @@ public class Notification extends AbstractExtension implements Serializable {
}
}
+ /**
+ * Event fired when a notification is closed.
+ *
+ * @since 8.2
+ */
public static class CloseEvent extends ConnectorEvent {
/**
@@ -517,8 +521,10 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* An interface used for listening to Notification close events. Add the
* CloseListener to a Notification and
- * {@link CloseListener#notificationClose(CloseEvent)} will be called whenever the
- * Notification is closed.
+ * {@link CloseListener#notificationClose(CloseEvent)} will be called
+ * whenever the Notification is closed.
+ *
+ * @since 8.2
*/
@FunctionalInterface
public interface CloseListener extends Serializable {
diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java
index e54d8e052a..1580dcb515 100644
--- a/server/src/main/java/com/vaadin/ui/Tree.java
+++ b/server/src/main/java/com/vaadin/ui/Tree.java
@@ -1153,7 +1153,8 @@ public class Tree<T> extends Composite
* @param row
* zero based index of the item to scroll to in the current view.
* @throws IllegalArgumentException
- * if the provided row is outside the item range
+ * if the provided row is outside the item range
+ * @since 8.2
*/
public void scrollTo(int row) throws IllegalArgumentException {
treeGrid.scrollTo(row, ScrollDestination.ANY);
@@ -1172,6 +1173,7 @@ public class Tree<T> extends Composite
* {@code null}
* @throws IllegalArgumentException
* if the provided row is outside the item range
+ * @since 8.2
*/
public void scrollTo(int row, ScrollDestination destination) {
treeGrid.scrollTo(row, destination);
@@ -1179,6 +1181,8 @@ public class Tree<T> extends Composite
/**
* Scrolls to the beginning of the first data row.
+ *
+ * @since 8.2
*/
public void scrollToStart() {
treeGrid.scrollToStart();
@@ -1186,6 +1190,8 @@ public class Tree<T> extends Composite
/**
* Scrolls to the end of the last data row.
+ *
+ * @since 8.2
*/
public void scrollToEnd() {
treeGrid.scrollToEnd();