Example usage for com.google.gwt.dom.client TableRowElement focus

List of usage examples for com.google.gwt.dom.client TableRowElement focus

Introduction

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

Prototype

@Override
    public void focus() 

Source Link

Usage

From source file:com.gafactory.core.client.ui.grids.BaseListGrid.java

License:Open Source License

public void scrollToSelected() {

    Scheduler.get().scheduleDeferred(new Command() {
        @Override/*from  w ww.j  a v a  2s .  c o  m*/
        public void execute() {
            int visibleSelectedIndex = getVisibleSelectedIndex();
            if (visibleSelectedIndex != -1) {
                TableRowElement rowElement = dataGrid.getRowElement(visibleSelectedIndex);
                rowElement.scrollIntoView();
                rowElement.focus();
            }

            dataGrid.setFocus(true);
        }
    });

}