diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-04-19 18:15:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 18:15:05 +0300 |
commit | 37219932b913179910fa4e0e005f9417eac93d95 (patch) | |
tree | b0fbce45bf6b1e08ef0aa0df6a1be0b509463772 /server | |
parent | 7d75f33707c5a88b65c429f34c4025910f243d35 (diff) | |
download | vaadin-framework-8.1.0.alpha6.tar.gz vaadin-framework-8.1.0.alpha6.zip |
Add/fill in missing @since tags for 8.1 (#9106)8.1.0.alpha6
Diffstat (limited to 'server')
11 files changed, 82 insertions, 76 deletions
diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndEvent.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndEvent.java index e58196e6b7..06c583fc57 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndEvent.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndEvent.java @@ -26,10 +26,10 @@ import com.vaadin.ui.GridDragSource; * Drop event on an HTML5 drop target {@link Grid} row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDragSource#addGridDragStartListener(GridDragStartListener) - * @since + * @since 8.1 */ public class GridDragEndEvent<T> extends DragEndEvent<Grid<T>> { @@ -39,11 +39,11 @@ public class GridDragEndEvent<T> extends DragEndEvent<Grid<T>> { * Creates a drag end event. * * @param source - * Grid component in which the items were dragged. + * Grid component in which the items were dragged. * @param dropEffect - * Drop effect from {@code DataTransfer.dropEffect} object. + * Drop effect from {@code DataTransfer.dropEffect} object. * @param draggedItems - * Set of items having been dragged. + * Set of items having been dragged. */ public GridDragEndEvent(Grid<T> source, DropEffect dropEffect, Set<T> draggedItems) { diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndListener.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndListener.java index c47a8f037f..eb2b90fa64 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndListener.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndListener.java @@ -24,10 +24,10 @@ import com.vaadin.ui.GridDragSource; * Drop listener for HTML5 drop on a Grid row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDragSource#addGridDragEndListener(GridDragEndListener) - * @since + * @since 8.1 */ @FunctionalInterface public interface GridDragEndListener<T> extends ConnectorEventListener { @@ -40,7 +40,7 @@ public interface GridDragEndListener<T> extends ConnectorEventListener { * drag. * * @param event - * The drag end event. + * The drag end event. */ void dragEnd(GridDragEndEvent<T> event); } diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartEvent.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartEvent.java index ac87c296cf..35691d20c2 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartEvent.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartEvent.java @@ -26,10 +26,10 @@ import com.vaadin.ui.GridDragSource; * Drag start event on an HTML5 drag source {@link Grid} row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDragSource#addGridDragStartListener(GridDragStartListener) - * @since + * @since 8.1 */ public class GridDragStartEvent<T> extends DragStartEvent<Grid<T>> { @@ -39,11 +39,11 @@ public class GridDragStartEvent<T> extends DragStartEvent<Grid<T>> { * Creates a drag start event. * * @param source - * The source grid where the rows are being dragged from. + * The source grid where the rows are being dragged from. * @param effectAllowed - * Allowed effect from {@code DataTransfer.effectAllowed} object. + * Allowed effect from {@code DataTransfer.effectAllowed} object. * @param draggedItems - * Set of items being dragged. + * Set of items being dragged. */ public GridDragStartEvent(Grid<T> source, EffectAllowed effectAllowed, Set<T> draggedItems) { diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartListener.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartListener.java index 4ef1f7f205..0d1e071eea 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartListener.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartListener.java @@ -24,10 +24,10 @@ import com.vaadin.ui.GridDragSource; * Drag start listener for HTML5 drag start on a Grid row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDragSource#addGridDragStartListener(GridDragStartListener) - * @since + * @since 8.1 */ @FunctionalInterface public interface GridDragStartListener<T> extends ConnectorEventListener { @@ -39,7 +39,7 @@ public interface GridDragStartListener<T> extends ConnectorEventListener { * Invoked when the user has started dragging grid's rows. * * @param event - * The drag start event. + * The drag start event. */ void dragStart(GridDragStartEvent<T> event); } diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDropEvent.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDropEvent.java index 41998354d1..35421e7992 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDropEvent.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDropEvent.java @@ -26,10 +26,10 @@ import com.vaadin.ui.GridDropTarget; * Drop event on an HTML5 drop target {@link Grid} row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDropTarget#addGridDropListener(GridDropListener) - * @since + * @since 8.1 */ public class GridDropEvent<T> extends DropEvent<Grid<T>> { @@ -40,17 +40,17 @@ public class GridDropEvent<T> extends DropEvent<Grid<T>> { * Creates a Grid row drop event. * * @param target - * Grid that received the drop. + * Grid that received the drop. * @param dataTransferText - * Data of type {@code "text"} from the {@code DataTransfer} - * object. + * Data of type {@code "text"} from the {@code DataTransfer} + * object. * @param dragSourceExtension - * Drag source extension of the component that initiated the drop - * event. + * Drag source extension of the component that initiated the drop + * event. * @param dropTargetRow - * Target row that received the drop. + * Target row that received the drop. * @param dropLocation - * Location of the drop within the target row. + * Location of the drop within the target row. */ public GridDropEvent(Grid<T> target, String dataTransferText, DragSourceExtension<? extends AbstractComponent> dragSourceExtension, diff --git a/server/src/main/java/com/vaadin/event/dnd/grid/GridDropListener.java b/server/src/main/java/com/vaadin/event/dnd/grid/GridDropListener.java index bd4ed8e2fc..0bd48db2ca 100644 --- a/server/src/main/java/com/vaadin/event/dnd/grid/GridDropListener.java +++ b/server/src/main/java/com/vaadin/event/dnd/grid/GridDropListener.java @@ -24,10 +24,10 @@ import com.vaadin.ui.GridDropTarget; * Drop listener for HTML5 drop on a Grid row. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. * @see GridDropTarget#addGridDropListener(GridDropListener) - * @since + * @since 8.1 */ @FunctionalInterface public interface GridDropListener<T> extends ConnectorEventListener { @@ -39,7 +39,7 @@ public interface GridDropListener<T> extends ConnectorEventListener { * Called when drop event is fired on a Grid row. * * @param event - * Server side drop event. + * Server side drop event. */ void drop(GridDropEvent<T> event); } diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java index 46a11d3826..ac22e80601 100644 --- a/server/src/main/java/com/vaadin/server/VaadinSession.java +++ b/server/src/main/java/com/vaadin/server/VaadinSession.java @@ -1424,6 +1424,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * establishing a push connection with the client. * * @return the push connection identifier string + * + * @since 8.1 */ public String getPushId() { assert hasLock(); diff --git a/server/src/main/java/com/vaadin/ui/ComponentRootSetter.java b/server/src/main/java/com/vaadin/ui/ComponentRootSetter.java index 1bc3565de8..c9c8627443 100644 --- a/server/src/main/java/com/vaadin/ui/ComponentRootSetter.java +++ b/server/src/main/java/com/vaadin/ui/ComponentRootSetter.java @@ -20,7 +20,7 @@ import java.io.Serializable; /** * Internal utility class. * - * @since + * @since 8.1 * @author Vaadin Ltd */ public class ComponentRootSetter implements Serializable { diff --git a/server/src/main/java/com/vaadin/ui/Composite.java b/server/src/main/java/com/vaadin/ui/Composite.java index 58efbaeb94..5bbbc6612c 100644 --- a/server/src/main/java/com/vaadin/ui/Composite.java +++ b/server/src/main/java/com/vaadin/ui/Composite.java @@ -44,7 +44,7 @@ import com.vaadin.shared.ui.ContentMode; * </p> * * @author Vaadin Ltd. - * @since + * @since 8.1 */ public class Composite extends AbstractComponent implements HasComponents { diff --git a/server/src/main/java/com/vaadin/ui/GridDragSource.java b/server/src/main/java/com/vaadin/ui/GridDragSource.java index ef9a608871..a7798b581a 100644 --- a/server/src/main/java/com/vaadin/ui/GridDragSource.java +++ b/server/src/main/java/com/vaadin/ui/GridDragSource.java @@ -42,9 +42,9 @@ import elemental.json.JsonObject; * that ONLY visible rows are taken into account. * * @param <T> - * The Grid bean type. + * The Grid bean type. * @author Vaadin Ltd. - * @since + * @since 8.1 */ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { @@ -62,7 +62,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * Extends a Grid and makes it's rows draggable. * * @param target - * Grid to be extended. + * Grid to be extended. */ public GridDragSource(Grid<T> target) { super(target); @@ -118,13 +118,14 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * function is set by the user of this extension. * * @param item - * Row item for data generation. + * Row item for data generation. * @param jsonObject - * Row data in json format. + * Row data in json format. */ private void generateDragData(T item, JsonObject jsonObject) { - Optional.ofNullable(generatorFunction).ifPresent(generator -> jsonObject - .put(GridDragSourceState.JSONKEY_DRAG_DATA, + Optional.ofNullable(generatorFunction) + .ifPresent(generator -> jsonObject.put( + GridDragSourceState.JSONKEY_DRAG_DATA, generator.apply(item))); } @@ -134,16 +135,17 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * {@link JsonObject} to be appended to the row data. * <p> * Example: + * * <pre> - * dragSourceExtension.setDragDataGenerator(item -> { - * JsonObject dragData = Json.createObject(); - * dragData.put("someKey", item.getValue()); - * return dragData; - * }); + * dragSourceExtension.setDragDataGenerator(item -> { + * JsonObject dragData = Json.createObject(); + * dragData.put("someKey", item.getValue()); + * return dragData; + * }); * </pre> * * @param generator - * Function to be executed on row data generation. + * Function to be executed on row data generation. */ public void setDragDataGenerator( SerializableFunction<T, JsonObject> generator) { @@ -154,13 +156,14 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * Setting the data transfer text for this drag source is not supported. * * @throws UnsupportedOperationException - * Setting dataTransferText is not supported, since the drag data is - * set for each row based on the data provided by the generator. + * Setting dataTransferText is not supported, since the drag + * data is set for each row based on the data provided by the + * generator. * @see #setDragDataGenerator(SerializableFunction) */ @Override - public void setDataTransferText(String data) throws - UnsupportedOperationException { + public void setDataTransferText(String data) + throws UnsupportedOperationException { throw new UnsupportedOperationException( "Setting dataTransferText is not supported"); } @@ -169,7 +172,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * Attaches dragstart listener for the current drag source grid. * * @param listener - * Listener to handle the dragstart event. + * Listener to handle the dragstart event. * @return Handle to be used to remove this listener. * @see GridDragStartEvent */ @@ -184,7 +187,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> { * Attaches dragend listener for the current drag source grid. * * @param listener - * Listener to handle the dragend event. + * Listener to handle the dragend event. * @return Handle to be used to remove this listener. * @see GridDragEndEvent */ diff --git a/server/src/main/java/com/vaadin/ui/GridDropTarget.java b/server/src/main/java/com/vaadin/ui/GridDropTarget.java index 97b9a80ac6..575e5b3f1c 100644 --- a/server/src/main/java/com/vaadin/ui/GridDropTarget.java +++ b/server/src/main/java/com/vaadin/ui/GridDropTarget.java @@ -28,9 +28,9 @@ import com.vaadin.shared.ui.grid.GridDropTargetState; * counterpart of GridDropTargetExtensionConnector. * * @param <T> - * Type of the Grid bean. + * Type of the Grid bean. * @author Vaadin Ltd - * @since + * @since 8.1 */ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { @@ -38,10 +38,10 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { * Extends a Grid and makes it's rows drop targets for HTML5 drag and drop. * * @param target - * Grid to be extended. + * Grid to be extended. * @param dropMode - * Drop mode that describes the allowed drop locations within the - * Grid's row. + * Drop mode that describes the allowed drop locations within the + * Grid's row. * @see GridDropEvent#getDropLocation() */ public GridDropTarget(Grid<T> target, DropMode dropMode) { @@ -54,8 +54,8 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { * Sets the drop mode of this drop target. * * @param dropMode - * Drop mode that describes the allowed drop locations within the - * Grid's row. + * Drop mode that describes the allowed drop locations within the + * Grid's row. * @see GridDropEvent#getDropLocation() */ public void setDropMode(DropMode dropMode) { @@ -77,12 +77,12 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { } /** - * Attaches drop listener for the current drop target. {@link - * GridDropListener#drop(GridDropEvent)} is called when drop event happens - * on the client side. + * Attaches drop listener for the current drop target. + * {@link GridDropListener#drop(GridDropEvent)} is called when drop event + * happens on the client side. * * @param listener - * Listener to handle drop event. + * Listener to handle drop event. * @return Handle to be used to remove this listener. */ public Registration addGridDropListener(GridDropListener<T> listener) { @@ -99,19 +99,20 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { * <li>within {@code threshold} pixels from the top of a row results in a * drop event with {@link com.vaadin.shared.ui.grid.DropLocation#ABOVE * DropLocation.ABOVE}</li> - * <li>within {@code threshold} pixels from the bottom of a row results in - * a drop event with {@link com.vaadin.shared.ui.grid.DropLocation#BELOW + * <li>within {@code threshold} pixels from the bottom of a row results in a + * drop event with {@link com.vaadin.shared.ui.grid.DropLocation#BELOW * DropLocation.BELOW}</li> - * <li>anywhere else within the row results in a drop event with {@link - * com.vaadin.shared.ui.grid.DropLocation#ON_TOP DropLocation.ON_TOP}</li> + * <li>anywhere else within the row results in a drop event with + * {@link com.vaadin.shared.ui.grid.DropLocation#ON_TOP + * DropLocation.ON_TOP}</li> * </ul> - * The value only has an effect when drop mode is set to {@link - * DropMode#ON_TOP_OR_BETWEEN}. + * The value only has an effect when drop mode is set to + * {@link DropMode#ON_TOP_OR_BETWEEN}. * <p> * Default is 5 pixels. * * @param threshold - * The threshold from the top and bottom of the row in pixels. + * The threshold from the top and bottom of the row in pixels. */ public void setDropThreshold(int threshold) { getState().dropThreshold = threshold; @@ -129,18 +130,18 @@ public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> { @Override protected void registerDropTargetRpc(Grid<T> target) { - registerRpc( - (GridDropTargetRpc) (dataTransferText, rowKey, dropLocation) -> { + registerRpc((GridDropTargetRpc) (dataTransferText, rowKey, + dropLocation) -> { - T dropTargetRow = target.getDataCommunicator() - .getKeyMapper().get(rowKey); + T dropTargetRow = target.getDataCommunicator().getKeyMapper() + .get(rowKey); - GridDropEvent<T> event = new GridDropEvent<>(target, - dataTransferText, getUI().getActiveDragSource(), - dropTargetRow, dropLocation); + GridDropEvent<T> event = new GridDropEvent<>(target, + dataTransferText, getUI().getActiveDragSource(), + dropTargetRow, dropLocation); - fireEvent(event); - }); + fireEvent(event); + }); } @Override |