Example usage for com.google.gwt.dom.client EventTarget toString

List of usage examples for com.google.gwt.dom.client EventTarget toString

Introduction

In this page you can find the example usage for com.google.gwt.dom.client EventTarget toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.gwtmobile.ui.client.utils.Utils.java

License:Apache License

public static int getTargetItemIndex(Element parent, EventTarget target) {
    Element div = Element.as(target);
    if (div == parent) {
        Utils.Console("Is click on list working? " + target.toString());
        return -1;
    }/*w ww.j  av  a  2  s  .  c om*/
    while (div.getParentElement() != parent) {
        div = div.getParentElement();
        if (div == null) {
            return -1;
        }
    }
    int index = DOM.getChildIndex((com.google.gwt.user.client.Element) parent,
            (com.google.gwt.user.client.Element) div);
    return index;
}

From source file:next.i.util.Utils.java

License:Apache License

public static int getTargetItemIndex(Element parent, EventTarget target) {
    Element div = Element.as(target);
    if (div == parent) {
        XLog.info("Is click on list working? " + target.toString());
        return -1;
    }/*from   w  ww.jav a 2  s .  co  m*/
    while (div.getParentElement() != parent) {
        div = div.getParentElement();
        if (div == null) {
            return -1;
        }
    }
    int index = DOM.getChildIndex((com.google.gwt.user.client.Element) parent,
            (com.google.gwt.user.client.Element) div);
    return index;
}