List of usage examples for com.google.gwt.dom.client TableCellElement getColSpan
public int getColSpan()
From source file:com.vaadin.client.widgets.JsniWorkaround.java
License:Apache License
private static Element getCellFromRow(TableRowElement rowElement, int index) { int childCount = rowElement.getCells().getLength(); if (index < 0 || index >= childCount) { return null; }/* w w w . j a v a 2 s . com*/ TableCellElement currentCell = null; boolean indexInColspan = false; int i = 0; while (!indexInColspan) { currentCell = rowElement.getCells().getItem(i); // Calculate if this is the cell we are looking for int colSpan = currentCell.getColSpan(); indexInColspan = index < colSpan + i; // Increment by colspan to skip over hidden cells i += colSpan; } return currentCell; }