summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-04-19 18:15:05 +0300
committerGitHub <noreply@github.com>2017-04-19 18:15:05 +0300
commit37219932b913179910fa4e0e005f9417eac93d95 (patch)
treeb0fbce45bf6b1e08ef0aa0df6a1be0b509463772
parent7d75f33707c5a88b65c429f34c4025910f243d35 (diff)
downloadvaadin-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
-rw-r--r--client/src/main/java/com/vaadin/client/communication/MessageHandler.java6
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/GridDragSourceConnector.java40
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java17
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VButton.java27
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java5
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndEvent.java10
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDragEndListener.java6
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartEvent.java10
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDragStartListener.java6
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDropEvent.java18
-rw-r--r--server/src/main/java/com/vaadin/event/dnd/grid/GridDropListener.java6
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinSession.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/ComponentRootSetter.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/Composite.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/GridDragSource.java41
-rw-r--r--server/src/main/java/com/vaadin/ui/GridDropTarget.java55
-rw-r--r--shared/src/main/java/com/vaadin/shared/composite/CompositeState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java15
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java2
23 files changed, 152 insertions, 142 deletions
diff --git a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
index c9cbf5737f..53af1b141a 100644
--- a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
+++ b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
@@ -813,8 +813,8 @@ public class MessageHandler {
JsArrayString detachedArray = detachedConnectors.dump();
for (int i = 0; i < detachedArray.length(); i++) {
- ServerConnector connector = getConnectorMap().getConnector(
- detachedArray.get(i));
+ ServerConnector connector = getConnectorMap()
+ .getConnector(detachedArray.get(i));
Profiler.enter(
"unregisterRemovedConnectors unregisterConnector");
@@ -1701,6 +1701,8 @@ public class MessageHandler {
* establishing a push connection with the client.
*
* @return the push connection identifier string
+ *
+ * @since 8.1
*/
public String getPushId() {
return pushId;
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/GridDragSourceConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/GridDragSourceConnector.java
index 4511e669e6..840afec107 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/GridDragSourceConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/GridDragSourceConnector.java
@@ -33,7 +33,6 @@ import com.vaadin.client.widget.escalator.RowContainer;
import com.vaadin.client.widget.grid.selection.SelectionModel;
import com.vaadin.client.widgets.Escalator;
import com.vaadin.client.widgets.Grid;
-import com.vaadin.server.Page;
import com.vaadin.shared.Range;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.dnd.DropEffect;
@@ -48,15 +47,15 @@ import elemental.json.JsonArray;
import elemental.json.JsonObject;
/**
- * Adds HTML5 drag and drop functionality to a {@link com.vaadin.client.widgets.Grid
- * Grid}'s rows. This is the client side counterpart of {@link GridDragSource}.
+ * Adds HTML5 drag and drop functionality to a
+ * {@link com.vaadin.client.widgets.Grid Grid}'s rows. This is the client side
+ * counterpart of {@link GridDragSource}.
*
* @author Vaadin Ltd
- * @since
+ * @since 8.1
*/
@Connect(GridDragSource.class)
-public class GridDragSourceConnector extends
- DragSourceExtensionConnector {
+public class GridDragSourceConnector extends DragSourceExtensionConnector {
private static final String STYLE_SUFFIX_DRAG_BADGE = "-drag-badge";
@@ -69,7 +68,7 @@ public class GridDragSourceConnector extends
@Override
protected void extend(ServerConnector target) {
- this.gridConnector = (GridConnector) target;
+ gridConnector = (GridConnector) target;
// Set newly added rows draggable
getGridBody().setNewEscalatorRowCallback(
@@ -92,9 +91,8 @@ public class GridDragSourceConnector extends
Element draggedRowElement = (Element) event.getTarget();
Element badge = DOM.createSpan();
- badge.setClassName(
- gridConnector.getWidget().getStylePrimaryName() + "-row"
- + STYLE_SUFFIX_DRAG_BADGE);
+ badge.setClassName(gridConnector.getWidget().getStylePrimaryName()
+ + "-row" + STYLE_SUFFIX_DRAG_BADGE);
badge.setInnerHTML(draggedItemKeys.size() + "");
badge.getStyle().setMarginLeft(
@@ -107,7 +105,8 @@ public class GridDragSourceConnector extends
draggedRowElement.appendChild(badge);
- // Remove badge on the next animation frame. Drag image will still contain the badge.
+ // Remove badge on the next animation frame. Drag image will still
+ // contain the badge.
AnimationScheduler.get().requestAnimationFrame(timestamp -> {
badge.removeFromParent();
}, (Element) event.getTarget());
@@ -128,9 +127,8 @@ public class GridDragSourceConnector extends
@Override
protected String createDataTransferText(Event dragStartEvent) {
- JsonArray dragData = toJsonArray(
- getDraggedRows(dragStartEvent).stream().map(this::getDragData)
- .collect(Collectors.toList()));
+ JsonArray dragData = toJsonArray(getDraggedRows(dragStartEvent).stream()
+ .map(this::getDragData).collect(Collectors.toList()));
return dragData.toJson();
}
@@ -174,8 +172,8 @@ public class GridDragSourceConnector extends
DropEffect dropEffect) {
// Send server RPC with dragged item keys
- getRpcProxy(GridDragSourceRpc.class)
- .dragEnd(dropEffect, draggedItemKeys);
+ getRpcProxy(GridDragSourceRpc.class).dragEnd(dropEffect,
+ draggedItemKeys);
}
/**
@@ -183,9 +181,9 @@ public class GridDragSourceConnector extends
* allowed and a selected row is dragged.
*
* @param draggedRow
- * Data of dragged row.
+ * Data of dragged row.
* @return {@code true} if multiple rows are dragged, {@code false}
- * otherwise.
+ * otherwise.
*/
private boolean dragMultipleRows(JsonObject draggedRow) {
SelectionModel<JsonObject> selectionModel = getGrid()
@@ -208,7 +206,7 @@ public class GridDragSourceConnector extends
* Get all selected rows from a subset of rows defined by {@code range}.
*
* @param range
- * Range of indexes.
+ * Range of indexes.
* @return List of data of all selected rows in the given range.
*/
private List<JsonObject> getSelectedRowsInRange(Range range) {
@@ -228,7 +226,7 @@ public class GridDragSourceConnector extends
* Converts a list of {@link JsonObject}s to a {@link JsonArray}.
*
* @param objects
- * List of json objects.
+ * List of json objects.
* @return Json array containing all json objects.
*/
private JsonArray toJsonArray(List<JsonObject> objects) {
@@ -244,7 +242,7 @@ public class GridDragSourceConnector extends
* otherwise.
*
* @param row
- * Row data.
+ * Row data.
* @return Drag data if present or row data otherwise.
*/
private JsonObject getDragData(JsonObject row) {
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java
index 7814a81208..09142e222b 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java
@@ -43,11 +43,10 @@ import elemental.json.JsonObject;
* {@link GridDropTarget}.
*
* @author Vaadin Ltd
- * @since
+ * @since 8.1
*/
@Connect(GridDropTarget.class)
-public class GridDropTargetConnector extends
- DropTargetExtensionConnector {
+public class GridDropTargetConnector extends DropTargetExtensionConnector {
/**
* Current style name
@@ -97,8 +96,8 @@ public class GridDropTargetConnector extends
(NativeEvent) dropEvent);
}
- getRpcProxy(GridDropTargetRpc.class)
- .drop(dataTransferText, rowKey, dropLocation);
+ getRpcProxy(GridDropTargetRpc.class).drop(dataTransferText, rowKey,
+ dropLocation);
}
private JsonObject getRowData(TableRowElement row) {
@@ -120,8 +119,8 @@ public class GridDropTargetConnector extends
} else if (getState().dropMode == DropMode.ON_TOP_OR_BETWEEN) {
if (getRelativeY(target, event) < getState().dropThreshold) {
return DropLocation.ABOVE;
- } else if (target.getOffsetHeight() - getRelativeY(target, event)
- < getState().dropThreshold) {
+ } else if (target.getOffsetHeight()
+ - getRelativeY(target, event) < getState().dropThreshold) {
return DropLocation.BELOW;
} else {
return DropLocation.ON_TOP;
@@ -138,8 +137,8 @@ public class GridDropTargetConnector extends
@Override
protected void onDragEnter(Event event) {
// Generate style names for the drop target
- String styleRow =
- gridConnector.getWidget().getStylePrimaryName() + "-row";
+ String styleRow = gridConnector.getWidget().getStylePrimaryName()
+ + "-row";
styleDragCenter = styleRow + STYLE_SUFFIX_DRAG_CENTER;
styleDragTop = styleRow + STYLE_SUFFIX_DRAG_TOP;
styleDragBottom = styleRow + STYLE_SUFFIX_DRAG_BOTTOM;
diff --git a/client/src/main/java/com/vaadin/client/ui/VButton.java b/client/src/main/java/com/vaadin/client/ui/VButton.java
index 6a32b32439..f872292bf6 100644
--- a/client/src/main/java/com/vaadin/client/ui/VButton.java
+++ b/client/src/main/java/com/vaadin/client/ui/VButton.java
@@ -424,7 +424,10 @@ public class VButton extends FocusWidget implements ClickHandler {
* held down.
*
* @param enabled
- * {@literal true} if capturing enabled, {@literal false} otherwise
+ * {@literal true} if capturing enabled, {@literal false}
+ * otherwise
+ *
+ * @since 8.1
*/
public void setCapturingEnabled(boolean enabled) {
capturingEnabled = enabled;
@@ -434,7 +437,9 @@ public class VButton extends FocusWidget implements ClickHandler {
* Returns if the widget's capturing of mouse events are enabled.
*
* @return {@literal true} if mouse capturing is enabled, {@literal false}
- * otherwise
+ * otherwise
+ *
+ * @since 8.1
*/
public boolean isCapturingEnabled() {
return capturingEnabled;
@@ -443,28 +448,28 @@ public class VButton extends FocusWidget implements ClickHandler {
private static native int getHorizontalBorderAndPaddingWidth(Element elem)
/*-{
// THIS METHOD IS ONLY USED FOR INTERNET EXPLORER, IT DOESN'T WORK WITH OTHERS
-
+
var convertToPixel = function(elem, value) {
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
+
// Remember the original values
var left = elem.style.left, rsLeft = elem.runtimeStyle.left;
-
+
// Put in the new values to get a computed value out
elem.runtimeStyle.left = elem.currentStyle.left;
elem.style.left = value || 0;
var ret = elem.style.pixelLeft;
-
+
// Revert the changed values
elem.style.left = left;
elem.runtimeStyle.left = rsLeft;
-
+
return ret;
}
-
+
var ret = 0;
-
+
var sides = ["Right","Left"];
for(var i=0; i<2; i++) {
var side = sides[i];
@@ -478,7 +483,7 @@ public class VButton extends FocusWidget implements ClickHandler {
ret += parseInt(value.substr(0, value.length-2));
}
}
-
+
// Padding -------------------------------------------------------
value = elem.currentStyle["padding"+side];
if ( !/^\d+(px)?$/i.test( value ) && /^\d/.test( value ) ) {
@@ -487,7 +492,7 @@ public class VButton extends FocusWidget implements ClickHandler {
ret += parseInt(value.substr(0, value.length-2));
}
}
-
+
return ret;
}-*/;
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java b/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
index ca00ca9b63..d3247605b3 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
@@ -125,8 +125,9 @@ public interface RowContainer {
* the escalator.
*
* @param consumer
- * A Consumer function that receives the newly added table row
- * elements.
+ * A Consumer function that receives the newly added table
+ * row elements.
+ * @since 8.1
*/
public void setNewEscalatorRowCallback(
Consumer<List<TableRowElement>> consumer);
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
diff --git a/shared/src/main/java/com/vaadin/shared/composite/CompositeState.java b/shared/src/main/java/com/vaadin/shared/composite/CompositeState.java
index 1f552390df..cd4a9a0cab 100644
--- a/shared/src/main/java/com/vaadin/shared/composite/CompositeState.java
+++ b/shared/src/main/java/com/vaadin/shared/composite/CompositeState.java
@@ -21,7 +21,7 @@ import com.vaadin.shared.AbstractComponentState;
* Shared state for Composite.
*
* @author Vaadin Ltd
- * @since
+ * @since 8.1
*/
public class CompositeState extends AbstractComponentState {
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java b/shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java
index 1453c05c71..0bd124f983 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java
@@ -19,7 +19,7 @@ package com.vaadin.shared.ui.grid;
* Defines drop locations within a Grid row.
*
* @author Vaadin Ltd.
- * @since
+ * @since 8.1
*/
public enum DropLocation {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java b/shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java
index 1da17f1bba..c458b9d76c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java
@@ -19,20 +19,19 @@ package com.vaadin.shared.ui.grid;
* Defines the locations within the Grid row where an element can be dropped.
*
* @author Vaadin Ltd.
- * @since
+ * @since 8.1
*/
public enum DropMode {
/**
- * The drop event can happen between Grid rows. The drop is above a row
- * when the cursor is over the top 50% of a row, otherwise below the
- * row.
+ * The drop event can happen between Grid rows. The drop is above a row when
+ * the cursor is over the top 50% of a row, otherwise below the row.
*/
BETWEEN,
/**
- * The drop event can happen on top of Grid rows. The target of the drop
- * is the row under the cursor at the time of the drop event.
+ * The drop event can happen on top of Grid rows. The target of the drop is
+ * the row under the cursor at the time of the drop event.
*/
ON_TOP,
@@ -40,8 +39,8 @@ public enum DropMode {
* The drop event can happen either on top of or between Grid rows. The drop
* is either
* <ul>
- * <li><i>above</i> a row when the cursor is over a specified portion of
- * the top part of the row,</li>
+ * <li><i>above</i> a row when the cursor is over a specified portion of the
+ * top part of the row,</li>
* <li><i>below</i> when the cursor is over a specified portion of the
* bottom part of the row, or</li>
* <li><i>on top</i> when the cursor is over the row but doesn't match the
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceRpc.java
index 066e193157..3c080b6bcb 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceRpc.java
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.dnd.DropEffect;
* corresponding client side events happen on the drag source Grid.
*
* @author Vaadin Ltd.
- * @since
+ * @since 8.1
*/
public interface GridDragSourceRpc extends ServerRpc {
@@ -33,7 +33,7 @@ public interface GridDragSourceRpc extends ServerRpc {
* Called when dragstart event happens on client side.
*
* @param draggedItemKeys
- * Keys of the items in Grid being dragged.
+ * Keys of the items in Grid being dragged.
*/
public void dragStart(List<String> draggedItemKeys);
@@ -41,10 +41,10 @@ public interface GridDragSourceRpc extends ServerRpc {
* Called when dragend event happens on client side.
*
* @param dropEffect
- * Drop effect of the dragend event, extracted from {@code
+ * Drop effect of the dragend event, extracted from {@code
* DataTransfer.dropEffect} parameter.
* @param draggedItemKeys
- * Keys of the items in Grid having been dragged.
+ * Keys of the items in Grid having been dragged.
*/
public void dragEnd(DropEffect dropEffect, List<String> draggedItemKeys);
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceState.java
index 3d020043fe..e569933a6b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDragSourceState.java
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.dnd.DragSourceState;
* State class containing parameters for GridDragSource.
*
* @author Vaadin Ltd
- * @since
+ * @since 8.1
*/
public class GridDragSourceState extends DragSourceState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetRpc.java
index 84bb6ed890..e0b51a0242 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetRpc.java
@@ -22,7 +22,7 @@ import com.vaadin.shared.communication.ServerRpc;
* drop target Grid.
*
* @author Vaadin Ltd.
- * @since
+ * @since 8.1
*/
public interface GridDropTargetRpc extends ServerRpc {
@@ -30,12 +30,12 @@ public interface GridDropTargetRpc extends ServerRpc {
* Called when drop event happens on client side.
*
* @param dataTransferText
- * Data of type {@code "text"} from the {@code DataTransfer}
- * object.
+ * Data of type {@code "text"} from the {@code DataTransfer}
+ * object.
* @param rowKey
- * Key of the row on which the drop event occured.
+ * Key of the row on which the drop event occured.
* @param dropLocation
- * Location of the drop within the row.
+ * Location of the drop within the row.
*/
public void drop(String dataTransferText, String rowKey,
DropLocation dropLocation);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java
index 36869bfd62..b0c434305f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.dnd.DropTargetState;
* State class containing parameters for GridDropTarget.
*
* @author Vaadin Ltd
- * @since
+ * @since 8.1
*/
public class GridDropTargetState extends DropTargetState {