List of usage examples for com.google.gwt.dom.client TableRowElement getOffsetWidth
@Override public int getOffsetWidth()
From source file:org.activityinfo.ui.client.widget.CellTableHeaderWidthApplier.java
License:Open Source License
public void saveHeaderWidthInformation() { headerWidth = table.getTableHeadElement().getOffsetWidth(); final NodeList<TableRowElement> headerRows = table.getTableHeadElement().getRows(); for (int i = 0; i < headerRows.getLength(); i++) { final TableRowElement row = headerRows.getItem(i); headerRowToWidthMap.put(i, row.getOffsetWidth()); final NodeList<TableCellElement> cells = row.getCells(); for (int j = 0; j < cells.getLength(); j++) { final TableCellElement cell = cells.getItem(j); headerCellToWidthMap.put(new Pair<>(i, j), cell.getOffsetWidth()); }/* w ww . ja v a2s . c o m*/ } }
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); }