本文整理汇总了Java中com.google.gwt.dom.client.TableRowElement.getCells方法的典型用法代码示例。如果您正苦于以下问题:Java TableRowElement.getCells方法的具体用法?Java TableRowElement.getCells怎么用?Java TableRowElement.getCells使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.dom.client.TableRowElement
的用法示例。
在下文中一共展示了TableRowElement.getCells方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetFocusOnCell
import com.google.gwt.dom.client.TableRowElement; //导入方法依赖的package包/类
@Override
protected boolean resetFocusOnCell() {
boolean focused = false;
if (hasFilterHeaders() && filterFocusedCellColumn > -1 && filterFocusedCellRow > -1) {
TableSectionElement thead = getTableHeadElement();
NodeList<TableRowElement> rows = thead.getRows();
if (filterFocusedCellRow < rows.getLength()) {
TableRowElement row = rows.getItem(filterFocusedCellRow);
NodeList<TableCellElement> cells = row.getCells();
if (filterFocusedCellColumn < cells.getLength()) {
TableCellElement cell = cells.getItem(filterFocusedCellColumn);
if (getHeaderBuilder().isHeader(cell)) {
Header<?> header = getHeaderBuilder().getHeader(cell);
Context context = new Context(0, 0, header.getKey());
focused = resetFocusOnFilterCellImpl(context, header, cell);
}
}
}
}
if (!focused) {
focused = super.resetFocusOnCell();
}
return focused;
}
示例2: getCell
import com.google.gwt.dom.client.TableRowElement; //导入方法依赖的package包/类
public TableCellElement getCell(int aRow, int aCol) {
NodeList<TableRowElement> rows = getTableBodyElement().getRows();
if (aRow >= 0 && aRow < rows.getLength()) {
TableRowElement row = rows.getItem(aRow);
NodeList<TableCellElement> cells = row.getCells();
if (aCol >= 0 && aCol < cells.getLength()) {
return cells.getItem(aCol);
}
}
return null;
}
示例3: redrawAllRowsInColumn
import com.google.gwt.dom.client.TableRowElement; //导入方法依赖的package包/类
public <C> void redrawAllRowsInColumn(int aIndex, ListDataProvider<T> aDataProvider) {
if (aIndex >= 0 && aIndex < getColumnCount()) {
int start = getVisibleRange().getStart();
Column<T, C> column = (Column<T, C>) getColumn(aIndex);
Cell<C> cell = column.getCell();
List<T> data = aDataProvider.getList();
ProvidesKey<T> keys = getKeyProvider();
NodeList<TableRowElement> rows = getTableBodyElement().getRows();
for (int i = 0; i < rows.getLength(); i++) {
TableRowElement row = rows.getItem(i);
NodeList<TableCellElement> cells = row.getCells();
if (aIndex >= 0 && aIndex < cells.getLength()) {
TableCellElement toRerender = cells.getItem(aIndex);
if (toRerender != null) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
int dataIdx = start + i;
if (dataIdx >= 0 && dataIdx < data.size()) {
T object = data.get(dataIdx);
Cell.Context cx = new Cell.Context(start + i, aIndex, keys.getKey(object));
cell.render(cx, column.getValue(object), sb);
// Take into account, that cell builder supports
// some
// maps
// to cells' divs
// and generates them. So we have to work with first
// <div>
// in <td>.
toRerender.getFirstChildElement().setInnerSafeHtml(sb.toSafeHtml());
}
}
}
}
}
}