From: Henri Sara Date: Mon, 3 Jul 2017 12:19:54 +0000 (+0300) Subject: Update/add since tags (#9627) X-Git-Tag: 8.1.0.rc1~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4f5ac5102db6f00d164c5287e4db21ba93d3309f;p=vaadin-framework.git Update/add since tags (#9627) --- diff --git a/server/src/main/java/com/vaadin/data/ValueContext.java b/server/src/main/java/com/vaadin/data/ValueContext.java index 4ce1111ed0..cbdd92dc56 100644 --- a/server/src/main/java/com/vaadin/data/ValueContext.java +++ b/server/src/main/java/com/vaadin/data/ValueContext.java @@ -61,15 +61,16 @@ public class ValueContext implements Serializable { * Constructor for {@code ValueContext}. * * @param component - * The component related to current value. Can be null. - * If the component implements {@link HasValue}, it will be returned by {@link #getHasValue()} as well. + * The component related to current value. Can be null. If the + * component implements {@link HasValue}, it will be returned by + * {@link #getHasValue()} as well. */ @SuppressWarnings("unchecked") public ValueContext(Component component) { Objects.requireNonNull(component, "Component can't be null in ValueContext construction"); this.component = component; - if(component instanceof HasValue) { + if (component instanceof HasValue) { hasValue = (HasValue) component; } else { hasValue = null; @@ -84,6 +85,7 @@ public class ValueContext implements Serializable { * The component related to current value. Can be null. * @param hasValue * The value source related to current value. Can be null. + * @since 8.1 */ public ValueContext(Component component, HasValue hasValue) { Objects.requireNonNull(component, @@ -96,15 +98,17 @@ public class ValueContext implements Serializable { /** * Constructor for {@code ValueContext}. * - * @param - * component + * @param component * The component can be {@code null}. * @param locale * The locale used with conversion. Can be {@code null}. * @param hasValue - * The value source related to current value. Can be {@code null}. + * The value source related to current value. Can be + * {@code null}. + * @since 8.1 */ - public ValueContext(Component component, HasValue hasValue, Locale locale) { + public ValueContext(Component component, HasValue hasValue, + Locale locale) { this.component = component; this.hasValue = hasValue; this.locale = locale; @@ -146,9 +150,11 @@ public class ValueContext implements Serializable { /** * Returns an {@code Optional} for the {@code HasValue} used in the value - * conversion. In certain complicated cases, ex. cross-field validation, HasValue might be not available. + * conversion. In certain complicated cases, ex. cross-field validation, + * HasValue might be not available. * * @return the optional of {@code HasValue} + * @since 8.1 */ @SuppressWarnings("unused") public Optional> getHasValue() { diff --git a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java index fea45200b0..66c4504c6e 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java @@ -576,6 +576,23 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { private final boolean userOriginated; + /** + * Creates a split position change event. + * + * @param source + * split panel from which the event originates + * @param userOriginated + * true if the event is directly based on user actions + * @param oldPosition + * old split position + * @param oldUnit + * old unit of split position + * @param position + * new split position + * @param unit + * new split position unit + * @since 8.1 + */ public SplitPositionChangeEvent(final Component source, final boolean userOriginated, final float oldPosition, final Unit oldUnit, final float position, final Unit unit) { @@ -629,6 +646,11 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { return oldUnit; } + /** + * {@inheritDoc} + * + * @since 8.1 + */ @Override public boolean isUserOriginated() { return userOriginated; diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java index 41e51ff63f..206786ee45 100644 --- a/server/src/main/java/com/vaadin/ui/Component.java +++ b/server/src/main/java/com/vaadin/ui/Component.java @@ -172,16 +172,18 @@ public interface Component extends ClientConnector, Sizeable, Serializable { */ public void addStyleName(String style); - /** - * Adds one or more style names to this component by using one or multiple parameters. + * Adds one or more style names to this component by using one or multiple + * parameters. + * * @param styles * the style name or style names to be added to the component * @see #addStyleName(String) * @see #setStyleName(String) * @see #removeStyleName(String) + * @since 8.1 */ - public default void addStyleNames(String ... styles) { + public default void addStyleNames(String... styles) { for (String style : styles) { addStyleName(style); } @@ -209,13 +211,15 @@ public interface Component extends ClientConnector, Sizeable, Serializable { /** * Removes one or more style names from component. Multiple styles can be * specified by using multiple parameters. + * * @param styles * the style name or style names to be removed * @see #removeStyleName(String) * @see #setStyleName(String) * @see #addStyleName(String) + * @since 8.1 */ - public default void removeStyleNames(String ... styles) { + public default void removeStyleNames(String... styles) { for (String style : styles) { removeStyleName(style); } diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java index 37502e8f48..3341255553 100644 --- a/server/src/main/java/com/vaadin/ui/TabSheet.java +++ b/server/src/main/java/com/vaadin/ui/TabSheet.java @@ -562,6 +562,7 @@ public class TabSheet extends AbstractComponentContainer * @param userOriginated * true if the event originates from the client * side, false otherwise + * @since 8.1 */ public void setSelectedTab(Component component, boolean userOriginated) { if (component != null && components.contains(component) @@ -811,6 +812,7 @@ public class TabSheet extends AbstractComponentContainer * @param userOriginated * true if the event originates from the client * side, false otherwise + * @since 8.1 */ public SelectedTabChangeEvent(Component source, boolean userOriginated) { @@ -827,6 +829,11 @@ public class TabSheet extends AbstractComponentContainer return (TabSheet) getSource(); } + /** + * {@inheritDoc} + * + * @since 8.1 + */ @Override public boolean isUserOriginated() { return userOriginated; @@ -906,7 +913,7 @@ public class TabSheet extends AbstractComponentContainer * @param userOriginated * true if the event originates from the client * side, false otherwise - * @since + * @since 8.1 */ protected void fireSelectedTabChange(boolean userOriginated) { fireEvent(new SelectedTabChangeEvent(this, userOriginated));