aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-client/src/main/java/com
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-28 10:39:17 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-28 11:39:17 +0300
commit7065740d6d02954c3483e2f24db36ad1af45c62e (patch)
treedb3a0f0cabb8cc3ce4a4d2636aff9bf1716fcd8b /compatibility-client/src/main/java/com
parent1827ccb5ed99c9b2deeea38e239527420711f5d1 (diff)
downloadvaadin-framework-7065740d6d02954c3483e2f24db36ad1af45c62e.tar.gz
vaadin-framework-7065740d6d02954c3483e2f24db36ad1af45c62e.zip
Use interface instead of implementation (#10073)
Diffstat (limited to 'compatibility-client/src/main/java/com')
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java16
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VListSelect.java3
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VNativeSelect.java3
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java6
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java16
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java9
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTwinColSelect.java3
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java5
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/FlyweightRow.java6
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/SelectionModelMulti.java5
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java33
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java25
13 files changed, 70 insertions, 62 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java
index 51071e2c50..1e2a72ec70 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java
@@ -17,6 +17,7 @@ package com.vaadin.v7.client.connectors;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.logging.Logger;
import com.google.gwt.core.client.JavaScriptObject;
@@ -64,7 +65,7 @@ public class JavaScriptRendererConnector
private static native JavaScriptObject createCellReferenceWrapper()
/*-{
var reference = {};
-
+
var setProperty = function(name, getter, setter) {
var descriptor = {
get: getter
@@ -74,25 +75,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;
}-*/;
@@ -230,8 +231,7 @@ public class JavaScriptRendererConnector
JsArrayString events = getConsumedEvents(
helper.getConnectorWrapper());
- ArrayList<String> list = new ArrayList<String>(
- events.length());
+ List<String> list = new ArrayList<String>(events.length());
for (int i = 0; i < events.length(); i++) {
list.add(events.get(i));
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java
index 98b329f13d..b06a6347c9 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/RpcDataSourceConnector.java
@@ -73,7 +73,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
registerRpc(DataProviderRpc.class, new DataProviderRpc() {
@Override
public void setRowData(int firstRow, JsonArray rowArray) {
- ArrayList<JsonObject> rows = new ArrayList<JsonObject>(
+ List<JsonObject> rows = new ArrayList<JsonObject>(
rowArray.length());
for (int i = 0; i < rowArray.length(); i++) {
JsonObject rowObject = rowArray.getObject(i);
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VListSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VListSelect.java
index 6264561954..7a5b7e0935 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VListSelect.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VListSelect.java
@@ -19,6 +19,7 @@ package com.vaadin.v7.client.ui;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import com.google.gwt.event.dom.client.ChangeEvent;
@@ -137,7 +138,7 @@ public class VListSelect extends VOptionGroupBase {
@Override
protected String[] getSelectedItems() {
- final ArrayList<String> selectedItemKeys = new ArrayList<String>();
+ final List<String> selectedItemKeys = new ArrayList<String>();
for (int i = 0; i < select.getItemCount(); i++) {
if (select.isItemSelected(i)) {
selectedItemKeys.add(select.getValue(i));
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VNativeSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VNativeSelect.java
index 7f8b268880..ff5541c88c 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VNativeSelect.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VNativeSelect.java
@@ -18,6 +18,7 @@ package com.vaadin.v7.client.ui;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.user.client.ui.ListBox;
@@ -77,7 +78,7 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
@Override
protected String[] getSelectedItems() {
- final ArrayList<String> selectedItemKeys = new ArrayList<String>();
+ final List<String> selectedItemKeys = new ArrayList<String>();
for (int i = 0; i < select.getItemCount(); i++) {
if (select.isItemSelected(i)) {
selectedItemKeys.add(select.getValue(i));
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java
index 2140610559..e3d94b0d4a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VOptionGroup.java
@@ -114,12 +114,12 @@ public class VOptionGroup extends VOptionGroupBase
* rebuilt (losing focus) if number of elements or their order is
* changed.
*/
- HashMap<String, CheckBox> keysToOptions = new HashMap<String, CheckBox>();
+ Map<String, CheckBox> keysToOptions = new HashMap<String, CheckBox>();
for (Map.Entry<CheckBox, String> entry : optionsToKeys.entrySet()) {
keysToOptions.put(entry.getValue(), entry.getKey());
}
- ArrayList<Widget> existingwidgets = new ArrayList<Widget>();
- ArrayList<Widget> newwidgets = new ArrayList<Widget>();
+ List<Widget> existingwidgets = new ArrayList<Widget>();
+ List<Widget> newwidgets = new ArrayList<Widget>();
// Get current order of elements
for (Widget wid : panel) {
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java
index cef3b1525d..9c9665d7ce 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java
@@ -473,7 +473,7 @@ public class VScrollTable extends FlowPanel
public Collection<SelectionRange> split(VScrollTableRow row) {
assert row.isAttached();
- ArrayList<SelectionRange> ranges = new ArrayList<SelectionRange>(2);
+ List<SelectionRange> ranges = new ArrayList<SelectionRange>(2);
int endOfFirstRange = row.getIndex() - 1;
if (endOfFirstRange >= startRow.getIndex()) {
@@ -677,7 +677,7 @@ public class VScrollTable extends FlowPanel
* This map contains captions and icon urls for actions like: * "33_c" ->
* "Edit" * "33_i" -> "http://dom.com/edit.png"
*/
- private final HashMap<Object, String> actionMap = new HashMap<Object, String>();
+ private final Map<Object, String> actionMap = new HashMap<Object, String>();
private String[] visibleColOrder;
private boolean initialContentReceived = false;
private Element scrollPositionElement;
@@ -3541,9 +3541,9 @@ public class VScrollTable extends FlowPanel
private static final int WRAPPER_WIDTH = 900000;
- ArrayList<Widget> visibleCells = new ArrayList<Widget>();
+ List<Widget> visibleCells = new ArrayList<Widget>();
- HashMap<String, HeaderCell> availableCells = new HashMap<String, HeaderCell>();
+ Map<String, HeaderCell> availableCells = new HashMap<String, HeaderCell>();
Element div = DOM.createDiv();
Element hTableWrapper = DOM.createDiv();
@@ -4100,7 +4100,7 @@ public class VScrollTable extends FlowPanel
}
// fire column resize events for all columns but the source of the
// resize action, since an event will fire separately for this.
- ArrayList<HeaderCell> columns = new ArrayList<HeaderCell>(
+ List<HeaderCell> columns = new ArrayList<HeaderCell>(
availableCells.values());
columns.remove(source);
sendColumnWidthUpdates(columns);
@@ -4477,8 +4477,8 @@ public class VScrollTable extends FlowPanel
private static final int WRAPPER_WIDTH = 900000;
- ArrayList<Widget> visibleCells = new ArrayList<Widget>();
- HashMap<String, FooterCell> availableCells = new HashMap<String, FooterCell>();
+ List<Widget> visibleCells = new ArrayList<Widget>();
+ Map<String, FooterCell> availableCells = new HashMap<String, FooterCell>();
Element div = DOM.createDiv();
Element hTableWrapper = DOM.createDiv();
@@ -5486,7 +5486,7 @@ public class VScrollTable extends FlowPanel
private static final int TOUCHSCROLL_TIMEOUT = 100;
private static final int DRAGMODE_MULTIROW = 2;
- protected ArrayList<Widget> childWidgets = new ArrayList<Widget>();
+ protected List<Widget> childWidgets = new ArrayList<Widget>();
private boolean selected = false;
protected final int rowKey;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java
index e9ddb02487..acfbb02d70 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java
@@ -22,6 +22,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import com.google.gwt.aria.client.ExpandedValue;
@@ -138,13 +139,13 @@ public class VTree extends FocusElementPanel
/** For internal use only. May be removed or replaced in the future. */
public MultiSelectMode multiSelectMode = MultiSelectMode.DEFAULT;
- private final HashMap<String, TreeNode> keyToNode = new HashMap<String, TreeNode>();
+ private final Map<String, TreeNode> keyToNode = new HashMap<String, TreeNode>();
/**
* This map contains captions and icon urls for actions like: * "33_c" ->
* "Edit" * "33_i" -> "http://dom.com/edit.png"
*/
- private final HashMap<String, String> actionMap = new HashMap<String, String>();
+ private final Map<String, String> actionMap = new HashMap<String, String>();
/** For internal use only. May be removed or replaced in the future. */
public boolean immediate;
@@ -326,7 +327,7 @@ public class VTree extends FocusElementPanel
* @return A list of all root {@link TreeNode}s.
*/
protected List<TreeNode> getRootNodes() {
- ArrayList<TreeNode> rootNodes = new ArrayList<TreeNode>();
+ List<TreeNode> rootNodes = new ArrayList<TreeNode>();
for (int i = 0; i < body.getWidgetCount(); i++) {
rootNodes.add((TreeNode) body.getWidget(i));
}
@@ -2178,7 +2179,7 @@ public class VTree extends FocusElementPanel
isExpandCollapse = true;
}
- ArrayList<Integer> positions = new ArrayList<Integer>();
+ List<Integer> positions = new ArrayList<Integer>();
while (treeNode.getParentNode() != null) {
positions.add(0,
treeNode.getParentNode().getChildren().indexOf(treeNode));
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTwinColSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTwinColSelect.java
index 70e8d1892f..cf8e379818 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTwinColSelect.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTwinColSelect.java
@@ -19,6 +19,7 @@ package com.vaadin.v7.client.ui;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import com.google.gwt.dom.client.Style.Overflow;
@@ -250,7 +251,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
@Override
protected String[] getSelectedItems() {
- final ArrayList<String> selectedItemKeys = new ArrayList<String>();
+ final List<String> selectedItemKeys = new ArrayList<String>();
for (int i = 0; i < selections.getItemCount(); i++) {
selectedItemKeys.add(selections.getValue(i));
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
index 4cfc7a2b19..dce1a4e84e 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
@@ -22,6 +22,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Element;
@@ -90,8 +91,8 @@ public class CalendarConnector extends AbstractLegacyComponentConnector
private CalendarServerRpc rpc = RpcProxy.create(CalendarServerRpc.class,
this);
- private final HashMap<String, String> actionMap = new HashMap<String, String>();
- private HashMap<Object, String> tooltips = new HashMap<Object, String>();
+ private final Map<String, String> actionMap = new HashMap<String, String>();
+ private Map<Object, String> tooltips = new HashMap<Object, String>();
private static final String DROPHANDLER_ACCEPT_CRITERIA_PAINT_TAG = "-ac";
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/FlyweightRow.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/FlyweightRow.java
index f322a86eb9..5b133d794a 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/FlyweightRow.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/escalator/FlyweightRow.java
@@ -30,14 +30,14 @@ import com.google.gwt.dom.client.TableRowElement;
*
* @since 7.4
* @author Vaadin Ltd
- * @see com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer#refreshRow(TableRowElement, int)
- * Escalator.AbstractRowContainer#refreshRow(TableRowElement, int)
+ * @see com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer#refreshRow(TableRowElement,
+ * int) Escalator.AbstractRowContainer#refreshRow(TableRowElement, int)
*/
public class FlyweightRow implements Row {
static class CellIterator implements Iterator<FlyweightCell> {
/** A defensive copy of the cells in the current row. */
- private final ArrayList<FlyweightCell> cells;
+ private final List<FlyweightCell> cells;
private final boolean cellsAttached;
private int cursor = 0;
private int skipNext = 0;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/SelectionModelMulti.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/SelectionModelMulti.java
index a93360d77a..9751b0909f 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/SelectionModelMulti.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widget/grid/selection/SelectionModelMulti.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Set;
import com.vaadin.client.data.DataSource.RowHandle;
@@ -264,8 +265,8 @@ public class SelectionModelMulti<T> extends AbstractRowHandleSelectionModel<T>
return rowHandlesToRows(deselectionBatch);
}
- private ArrayList<T> rowHandlesToRows(Collection<RowHandle<T>> rowHandles) {
- ArrayList<T> rows = new ArrayList<T>(rowHandles.size());
+ private List<T> rowHandlesToRows(Collection<RowHandle<T>> rowHandles) {
+ List<T> rows = new ArrayList<T>(rowHandles.size());
for (RowHandle<T> handle : rowHandles) {
rows.add(handle.getRow());
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
index b38cc404d8..759327f3ae 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
@@ -703,13 +703,13 @@ public class Escalator extends Widget
/*-{
var vScroll = esc.@com.vaadin.v7.client.widgets.Escalator::verticalScrollbar;
var vScrollElem = vScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
-
+
var hScroll = esc.@com.vaadin.v7.client.widgets.Escalator::horizontalScrollbar;
var hScrollElem = hScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
-
+
return $entry(function(e) {
var target = e.target;
-
+
// in case the scroll event was native (i.e. scrollbars were dragged, or
// the scrollTop/Left was manually modified), the bundles have old cache
// values. We need to make sure that the caches are kept up to date.
@@ -730,29 +730,29 @@ public class Escalator extends Widget
return $entry(function(e) {
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX;
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY;
-
+
// Delta mode 0 is in pixels; we don't need to do anything...
-
+
// A delta mode of 1 means we're scrolling by lines instead of pixels
// We need to scale the number of lines by the default line height
if(e.deltaMode === 1) {
var brc = esc.@com.vaadin.v7.client.widgets.Escalator::body;
deltaY *= brc.@com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer::getDefaultRowHeight()();
}
-
+
// Other delta modes aren't supported
if((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) {
var msg = "Unsupported wheel delta mode \"" + e.deltaMode + "\"";
-
+
// Print warning message
esc.@com.vaadin.v7.client.widgets.Escalator::logWarning(*)(msg);
}
-
+
// IE8 has only delta y
if (isNaN(deltaY)) {
deltaY = -0.5*e.wheelDelta;
}
-
+
@com.vaadin.v7.client.widgets.Escalator.JsniUtil::moveScrollFromEvent(*)(esc, deltaX, deltaY, e);
});
}-*/;
@@ -4521,11 +4521,11 @@ public class Escalator extends Widget
}
if (index < 0 || index + numberOfColumns > getColumnCount()) {
- throw new IndexOutOfBoundsException(
- "The given " + "column range (" + index + ".."
- + (index + numberOfColumns)
- + ") was outside of the current number of columns ("
- + getColumnCount() + ")");
+ throw new IndexOutOfBoundsException("The given "
+ + "column range (" + index + ".."
+ + (index + numberOfColumns)
+ + ") was outside of the current number of columns ("
+ + getColumnCount() + ")");
}
header.refreshColumns(index, numberOfColumns);
@@ -5022,7 +5022,7 @@ public class Escalator extends Widget
public Collection<SpacerImpl> getSpacersAfterPx(final double px,
final SpacerInclusionStrategy strategy) {
- ArrayList<SpacerImpl> spacers = new ArrayList<SpacerImpl>(
+ List<SpacerImpl> spacers = new ArrayList<SpacerImpl>(
rowIndexToSpacer.values());
for (int i = 0; i < spacers.size(); i++) {
@@ -6499,7 +6499,8 @@ public class Escalator extends Widget
double footerHeight = footer.getHeightOfSection();
double bodyHeight = body.getDefaultRowHeight() * heightByRows;
double scrollbar = horizontalScrollbar.showsScrollHandle()
- ? horizontalScrollbar.getScrollbarThickness() : 0;
+ ? horizontalScrollbar.getScrollbarThickness()
+ : 0;
double spacerHeight = 0; // ignored if HeightMode.ROW
if (heightMode == HeightMode.UNDEFINED) {
spacerHeight = body.spacerContainer.getSpacerHeightsSum();
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
index fbd1b2a0cc..8b330ad603 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
@@ -1631,8 +1631,9 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
}
}
});
- grid.scrollToRow(rowIndex, isBuffered()
- ? ScrollDestination.MIDDLE : ScrollDestination.ANY);
+ grid.scrollToRow(rowIndex,
+ isBuffered() ? ScrollDestination.MIDDLE
+ : ScrollDestination.ANY);
}
}
@@ -4008,7 +4009,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
private final class ColumnHider {
/** Map from columns to their hiding toggles, component might change */
- private HashMap<Column<?, T>, MenuItem> columnToHidingToggleMap = new HashMap<Column<?, T>, MenuItem>();
+ private Map<Column<?, T>, MenuItem> columnToHidingToggleMap = new HashMap<Column<?, T>, MenuItem>();
/**
* When column is being hidden with a toggle, do not refresh toggles for
@@ -4331,10 +4332,9 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
&& dropMarkerLeft <= escalator.getInnerWidth()) {
dropMarkerLeft = rightBoundaryForDrag - dropMarkerWidthOffset;
} else if (
- // Check if the drop marker shouldn't be shown at all
- dropMarkerLeft < frozenColumnsWidth
- || dropMarkerLeft > Math.min(rightBoundaryForDrag,
- escalator.getInnerWidth())
+ // Check if the drop marker shouldn't be shown at all
+ dropMarkerLeft < frozenColumnsWidth || dropMarkerLeft > Math
+ .min(rightBoundaryForDrag, escalator.getInnerWidth())
|| dropMarkerLeft < 0) {
dropMarkerLeft = -10000000;
}
@@ -4483,7 +4483,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
if (focusedColumnIndex == draggedColumnIndex) {
// move with the dragged column
int adjustedDropIndex = latestColumnDropIndex > draggedColumnIndex
- ? latestColumnDropIndex - 1 : latestColumnDropIndex;
+ ? latestColumnDropIndex - 1
+ : latestColumnDropIndex;
// remove hidden columns from indexing
adjustedDropIndex = getVisibleColumns()
.indexOf(getColumn(adjustedDropIndex));
@@ -4609,7 +4610,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
}
cellColumnIndex = cellColumnRightIndex - 1;
} else { // can't drop inside a spanned cell, or this is the
- // dragged cell
+ // dragged cell
while (colspan > 1) {
cellColumnIndex++;
colspan--;
@@ -6550,7 +6551,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
* @return A unmodifiable list of the currently visible columns in the grid
*/
public List<Column<?, T>> getVisibleColumns() {
- ArrayList<Column<?, T>> visible = new ArrayList<Column<?, T>>();
+ List<Column<?, T>> visible = new ArrayList<Column<?, T>>();
for (Column<?, T> c : columns) {
if (!c.isHidden()) {
visible.add(c);
@@ -9201,8 +9202,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
*
* @since 7.6
* @param editorBuffered
- * {@code true} to enable buffered editor,
- * {@code false} to disable it
+ * {@code true} to enable buffered editor, {@code false} to
+ * disable it
*/
public void setEditorBuffered(boolean editorBuffered) {
editor.setBuffered(editorBuffered);