Example usage for com.google.gwt.user.client.ui UIObject UIObject

List of usage examples for com.google.gwt.user.client.ui UIObject UIObject

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui UIObject UIObject.

Prototype

UIObject

Source Link

Usage

From source file:com.google.gerrit.client.ui.NavigationTable.java

License:Apache License

protected void scrollIntoView(final Element tr) {
    if (!computedScrollType) {
        parentScrollPanel = null;/*from   ww w. j av  a2  s . c o  m*/
        Widget w = getParent();
        while (w != null) {
            if (w instanceof ScrollPanel) {
                parentScrollPanel = (ScrollPanel) w;
                break;
            }
            w = w.getParent();
        }
        computedScrollType = true;
    }

    if (parentScrollPanel != null) {
        parentScrollPanel.ensureVisible(new UIObject() {
            {
                setElement(tr);
            }
        });
    } else {
        tr.scrollIntoView();
    }
}