List of usage examples for com.google.gwt.dom.client TableRowElement getOffsetTop
@Override public int getOffsetTop()
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 av a2 s . c om 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); }
From source file:org.rstudio.studio.client.workbench.views.history.view.HistoryPane.java
License:Open Source License
public void addRecentCommands(ArrayList<HistoryEntry> entries, boolean top) { TableRowElement topRow = null; if (top)/*from w w w .j a v a 2 s . c o m*/ topRow = commandList_.getTopRow(); commandList_.addItems(entries, top); if (top) { if (topRow == null) recentScrollPanel_.scrollToBottom(); else recentScrollPanel_.setVerticalScrollPosition(topRow.getOffsetTop()); } else recentScrollPanel_.onContentSizeChanged(); }