Replace gwt.user.client.Element with gwt.dom.client.Element
gwt.user.client.Element is deprecated in GWT 2.6. Replace with the recommended alternative. Also update to not use fully qualified names in some places. Change-Id: I377e561d05fd64471d672722c025d5b0defeecc6
This commit is contained in:
parent
dddc6368c6
commit
e5f7d1de00
@ -15,6 +15,7 @@
|
||||
package com.google.gwtexpui.clippy.client;
|
||||
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
@ -24,7 +25,6 @@ import com.google.gwt.event.dom.client.KeyPressHandler;
|
||||
import com.google.gwt.http.client.URL;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HasText;
|
||||
|
@ -113,8 +113,8 @@ public abstract class SafeHtml
|
||||
}
|
||||
|
||||
/** Parse an HTML block and return the first (typically root) element. */
|
||||
public static com.google.gwt.user.client.Element parse(SafeHtml html) {
|
||||
com.google.gwt.user.client.Element e = DOM.createDiv();
|
||||
public static Element parse(SafeHtml html) {
|
||||
Element e = DOM.createDiv();
|
||||
setInnerHTML(e, html);
|
||||
return DOM.getFirstChild(e);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
static ChangeScreen2 get(NativeEvent in) {
|
||||
com.google.gwt.user.client.Element e = in.getEventTarget().cast();
|
||||
Element e = in.getEventTarget().cast();
|
||||
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
|
||||
EventListener l = DOM.getEventListener(e);
|
||||
if (l instanceof ChangeScreen2) {
|
||||
|
@ -123,7 +123,7 @@ class FileTable extends FlowPanel {
|
||||
}
|
||||
|
||||
private static MyTable getMyTable(NativeEvent event) {
|
||||
com.google.gwt.user.client.Element e = event.getEventTarget().cast();
|
||||
Element e = event.getEventTarget().cast();
|
||||
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
|
||||
EventListener l = DOM.getEventListener(e);
|
||||
if (l instanceof MyTable) {
|
||||
|
@ -30,6 +30,7 @@ import com.google.gerrit.common.changes.ListChangesOption;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.NativeEvent;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
@ -81,7 +82,7 @@ class PatchSetsBox extends Composite {
|
||||
}
|
||||
|
||||
private static PatchSetsBox getRevisionBox(NativeEvent event) {
|
||||
com.google.gwt.user.client.Element e = event.getEventTarget().cast();
|
||||
Element e = event.getEventTarget().cast();
|
||||
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
|
||||
EventListener l = DOM.getEventListener(e);
|
||||
if (l instanceof PatchSetsBox) {
|
||||
|
@ -26,6 +26,7 @@ import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
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;
|
||||
@ -41,7 +42,6 @@ import com.google.gwt.event.dom.client.ScrollHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||
@ -68,7 +68,7 @@ class RelatedChangesTab implements IsWidget {
|
||||
AbstractImagePrototype.create(Gerrit.RESOURCES.arrowRight()).getSafeHtml();
|
||||
|
||||
private static final native String init(String o) /*-{
|
||||
$wnd[o] = $entry(@com.google.gerrit.client.change.RelatedChangesTab::onOpen(Lcom/google/gwt/dom/client/NativeEvent;Lcom/google/gwt/user/client/Element;));
|
||||
$wnd[o] = $entry(@com.google.gerrit.client.change.RelatedChangesTab::onOpen(Lcom/google/gwt/dom/client/NativeEvent;Lcom/google/gwt/dom/client/Element;));
|
||||
return o + '(event,this)';
|
||||
}-*/;
|
||||
|
||||
@ -522,7 +522,7 @@ class RelatedChangesTab implements IsWidget {
|
||||
private void onOpenRow(Element row) {
|
||||
// Find the first HREF of the anchor of the select row (if any)
|
||||
if (row != null) {
|
||||
NodeList<com.google.gwt.dom.client.Element> nodes =
|
||||
NodeList<Element> nodes =
|
||||
row.getElementsByTagName(AnchorElement.TAG);
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
String url = nodes.getItem(i).getAttribute("href");
|
||||
|
@ -36,10 +36,10 @@ import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.Grid;
|
||||
@ -77,7 +77,7 @@ public class ApprovalTable extends Composite {
|
||||
|
||||
missing = new Widget() {
|
||||
{
|
||||
setElement(DOM.createElement("ul"));
|
||||
setElement((Element)(DOM.createElement("ul")));
|
||||
}
|
||||
};
|
||||
missing.setStyleName(Gerrit.RESOURCES.css().missingApprovalList());
|
||||
|
@ -215,7 +215,7 @@ class OverviewBar extends Composite implements ClickHandler {
|
||||
this.line = line;
|
||||
this.height = height;
|
||||
|
||||
setElement(DOM.createDiv());
|
||||
setElement((Element)(DOM.createDiv()));
|
||||
setStyleName(style.gutter());
|
||||
addDomHandler(this, ClickEvent.getType());
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import com.google.gerrit.reviewdb.client.Patch;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
@ -52,7 +53,6 @@ import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
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.History;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.Focusable;
|
||||
|
@ -28,10 +28,10 @@ import com.google.gerrit.common.data.PatchSetDetail;
|
||||
import com.google.gerrit.prettify.client.SparseHtmlFile;
|
||||
import com.google.gerrit.prettify.common.EditList;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
|
@ -28,8 +28,8 @@ import com.google.gerrit.prettify.common.EditList;
|
||||
import com.google.gerrit.prettify.common.EditList.Hunk;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
|
@ -15,13 +15,13 @@
|
||||
package com.google.gerrit.client.ui;
|
||||
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.logical.shared.CloseHandler;
|
||||
import com.google.gwt.event.logical.shared.HasCloseHandlers;
|
||||
import com.google.gwt.event.logical.shared.HasOpenHandlers;
|
||||
import com.google.gwt.event.logical.shared.OpenHandler;
|
||||
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.ui.ComplexPanel;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.DisclosurePanel;
|
||||
@ -54,21 +54,21 @@ public class ComplexDisclosurePanel extends Composite implements
|
||||
|
||||
header = new ComplexPanel() {
|
||||
{
|
||||
setElement(DOM.createTD());
|
||||
setElement((Element)(DOM.createTD()));
|
||||
getElement().setInnerHTML(" ");
|
||||
addStyleName(Gerrit.RESOURCES.css().complexHeader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(Widget w) {
|
||||
add(w, getElement());
|
||||
add(w, (Element)getElement());
|
||||
}
|
||||
};
|
||||
|
||||
initWidget(new ComplexPanel() {
|
||||
{
|
||||
final DisclosurePanel main = ComplexDisclosurePanel.this.main;
|
||||
setElement(main.getElement());
|
||||
setElement((Element)(main.getElement()));
|
||||
getChildren().add(main);
|
||||
adopt(main);
|
||||
|
||||
|
@ -17,8 +17,8 @@ package com.google.gerrit.client.ui;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.client.ui;
|
||||
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.HTMLTable;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtml;
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
package com.google.gerrit.client.ui;
|
||||
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.HTMLTable;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtml;
|
||||
|
@ -16,11 +16,11 @@ package com.google.gerrit.client.ui;
|
||||
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
|
||||
|
Loading…
Reference in New Issue
Block a user