From 0ad5587c2f5dba0678995402dab482e81867f366 Mon Sep 17 00:00:00 2001 From: Henrik Paul Date: Thu, 13 Feb 2014 12:55:03 +0200 Subject: [PATCH] Change c.g.g.u.c.Element to c.g.g.d.Element (#13334) Change-Id: I8942623466441846ac4100dc6f451d0948d005a9 --- .../src/com/vaadin/client/ui/grid/Cell.java | 2 +- .../com/vaadin/client/ui/grid/Escalator.java | 19 +++++++++++-------- .../vaadin/client/ui/grid/FlyweightCell.java | 2 +- .../vaadin/client/ui/grid/FlyweightRow.java | 2 +- .../client/ui/grid/PositionFunction.java | 2 +- client/src/com/vaadin/client/ui/grid/Row.java | 2 +- .../client/ui/grid/ScrollbarBundle.java | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/client/src/com/vaadin/client/ui/grid/Cell.java b/client/src/com/vaadin/client/ui/grid/Cell.java index 31156ffe7b..3d42f082a6 100644 --- a/client/src/com/vaadin/client/ui/grid/Cell.java +++ b/client/src/com/vaadin/client/ui/grid/Cell.java @@ -16,7 +16,7 @@ package com.vaadin.client.ui.grid; -import com.google.gwt.user.client.Element; +import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.HasOneWidget; /** diff --git a/client/src/com/vaadin/client/ui/grid/Escalator.java b/client/src/com/vaadin/client/ui/grid/Escalator.java index 1a3f50b416..a1d895c2dd 100644 --- a/client/src/com/vaadin/client/ui/grid/Escalator.java +++ b/client/src/com/vaadin/client/ui/grid/Escalator.java @@ -30,6 +30,7 @@ import com.google.gwt.animation.client.AnimationScheduler.AnimationHandle; import com.google.gwt.core.client.Duration; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.dom.client.Document; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.dom.client.Node; import com.google.gwt.dom.client.NodeList; @@ -38,7 +39,6 @@ import com.google.gwt.dom.client.Style.Display; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; @@ -1427,7 +1427,7 @@ public class Escalator extends Widget { * @return the pixel width of the widest element in the indicated column */ public int calculateMaxColWidth(int index) { - Element row = (Element) root.getFirstChildElement(); + Element row = root.getFirstChildElement(); int maxWidth = 0; while (row != null) { final Element cell = (Element) row.getChild(index); @@ -1436,7 +1436,7 @@ public class Escalator extends Widget { if (isVisible) { maxWidth = Math.max(maxWidth, cell.getScrollWidth()); } - row = (Element) row.getNextSiblingElement(); + row = row.getNextSiblingElement(); } return maxWidth; } @@ -1446,9 +1446,9 @@ public class Escalator extends Widget { * the column configuration. */ public void reapplyColumnWidths() { - Element row = (Element) root.getFirstChildElement(); + Element row = root.getFirstChildElement(); while (row != null) { - Element cell = (Element) row.getFirstChildElement(); + Element cell = row.getFirstChildElement(); int columnIndex = 0; while (cell != null) { @SuppressWarnings("hiding") @@ -1461,10 +1461,10 @@ public class Escalator extends Widget { */ cell.getStyle().setWidth(width, Unit.PX); - cell = (Element) cell.getNextSiblingElement(); + cell = cell.getNextSiblingElement(); columnIndex++; } - row = (Element) row.getNextSiblingElement(); + row = row.getNextSiblingElement(); } reapplyRowWidths(); @@ -3563,7 +3563,10 @@ public class Escalator extends Widget { Node possibleWidgetNode = cellNode.getFirstChild(); if (possibleWidgetNode != null && possibleWidgetNode.getNodeType() == Node.ELEMENT_NODE) { - return Util.findWidget((Element) possibleWidgetNode, null); + @SuppressWarnings("deprecation") + com.google.gwt.user.client.Element castElement = (com.google.gwt.user.client.Element) possibleWidgetNode + .cast(); + return Util.findWidget(castElement, null); } return null; } diff --git a/client/src/com/vaadin/client/ui/grid/FlyweightCell.java b/client/src/com/vaadin/client/ui/grid/FlyweightCell.java index 752b8f793f..8f52e415e5 100644 --- a/client/src/com/vaadin/client/ui/grid/FlyweightCell.java +++ b/client/src/com/vaadin/client/ui/grid/FlyweightCell.java @@ -17,10 +17,10 @@ package com.vaadin.client.ui.grid; import java.util.List; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Display; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ui.grid.FlyweightRow.CellIterator; diff --git a/client/src/com/vaadin/client/ui/grid/FlyweightRow.java b/client/src/com/vaadin/client/ui/grid/FlyweightRow.java index a9d638a736..6bfd368c6b 100644 --- a/client/src/com/vaadin/client/ui/grid/FlyweightRow.java +++ b/client/src/com/vaadin/client/ui/grid/FlyweightRow.java @@ -20,8 +20,8 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Node; -import com.google.gwt.user.client.Element; /** * An internal implementation of the {@link Row} interface. diff --git a/client/src/com/vaadin/client/ui/grid/PositionFunction.java b/client/src/com/vaadin/client/ui/grid/PositionFunction.java index d3c0b0ade6..e41e533996 100644 --- a/client/src/com/vaadin/client/ui/grid/PositionFunction.java +++ b/client/src/com/vaadin/client/ui/grid/PositionFunction.java @@ -16,8 +16,8 @@ package com.vaadin.client.ui.grid; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.user.client.Element; /** * A functional interface that can be used for positioning elements in the DOM. diff --git a/client/src/com/vaadin/client/ui/grid/Row.java b/client/src/com/vaadin/client/ui/grid/Row.java index b6e20561a0..209da58fec 100644 --- a/client/src/com/vaadin/client/ui/grid/Row.java +++ b/client/src/com/vaadin/client/ui/grid/Row.java @@ -16,7 +16,7 @@ package com.vaadin.client.ui.grid; -import com.google.gwt.user.client.Element; +import com.google.gwt.dom.client.Element; /** * A representation of a row in an {@link Escalator}. diff --git a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java index 996c1650b0..b9267178c1 100644 --- a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java +++ b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java @@ -16,10 +16,10 @@ package com.vaadin.client.ui.grid; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; /** * An element-like bundle representing a configurable and visual scrollbar in -- 2.39.5