summaryrefslogtreecommitdiffstats
path: root/compatibility-client/src
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-19 09:41:48 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-19 10:41:47 +0300
commit4a8195b59ef07c62a22e2f51cf49f1f2f9657638 (patch)
tree666b0eeacc411882af466eb15a5f5f59c47fe31b /compatibility-client/src
parent7425cef7bfbffc6cf7ba1f2142157c94273268a9 (diff)
downloadvaadin-framework-4a8195b59ef07c62a22e2f51cf49f1f2f9657638.tar.gz
vaadin-framework-4a8195b59ef07c62a22e2f51cf49f1f2f9657638.zip
Replace iterators with enhanced for loops (#10018)
This change also includes some other minor cleanup.
Diffstat (limited to 'compatibility-client/src')
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java19
1 files changed, 7 insertions, 12 deletions
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 96942dd803..38bb1943cf 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
@@ -4031,9 +4031,8 @@ public class VScrollTable extends FlowPanel
for (i = 0; i < visibleColOrder.length; i++) {
cols[i] = visibleColOrder[i];
}
- for (final Iterator<String> it = collapsedColumns.iterator(); it
- .hasNext();) {
- cols[i++] = it.next();
+ for (final String column : collapsedColumns) {
+ cols[i++] = column;
}
}
List<Action> actions = new ArrayList<Action>(cols.length);
@@ -4401,11 +4400,11 @@ public class VScrollTable extends FlowPanel
.getOffsetWidth() + getHeaderPadding();
if (columnIndex < 0) {
columnIndex = 0;
- for (Iterator<Widget> it = tHead.iterator(); it
- .hasNext(); columnIndex++) {
- if (it.next() == this) {
+ for (Widget widget : tHead) {
+ if (widget == this) {
break;
}
+ columnIndex++;
}
}
final int cw = scrollBody.getColWidth(columnIndex);
@@ -6441,14 +6440,10 @@ public class VScrollTable extends FlowPanel
// Hide rows which are not selected
Element dragImage = ev.getDragImage();
int i = 0;
- for (Iterator<Widget> iterator = scrollBody
- .iterator(); iterator.hasNext();) {
- VScrollTableRow next = (VScrollTableRow) iterator
- .next();
-
+ for (Widget next : scrollBody) {
Element child = (Element) dragImage.getChild(i++);
- if (!rowKeyIsSelected(next.rowKey)) {
+ if (!rowKeyIsSelected(((VScrollTableRow) next).rowKey)) {
child.getStyle().setVisibility(Visibility.HIDDEN);
}
}