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

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

Introduction

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

Prototype

@Override
    public int getOffsetLeft() 

Source Link

Usage

From source file:org.rstudio.core.client.widget.FastSelectTable.java

License:Open Source License

public Rectangle getSelectionRect() {
    if (selectedRows_.size() == 0)
        return null;

    sortSelectedRows();/*from  w ww . j  a  v a2 s  .  co m*/

    TableRowElement first = selectedRows_.get(0);
    TableRowElement last = selectedRows_.get(selectedRows_.size() - 1);
    int top = first.getOffsetTop();
    int bottom = last.getOffsetTop() + last.getOffsetHeight();
    int left = first.getOffsetLeft();
    int width = first.getOffsetWidth();
    return new Rectangle(left, top, width, bottom - top);
}