Example usage for com.google.gwt.user.client.ui FlexTable getCellCount

List of usage examples for com.google.gwt.user.client.ui FlexTable getCellCount

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui FlexTable getCellCount.

Prototype

@Override
public int getCellCount(int row) 

Source Link

Document

Gets the number of cells on a given row.

Usage

From source file:org.zoxweb.client.widget.WidgetUtil.java

License:Apache License

public static int getRowIndexByWidget(FlexTable flexTable, Widget widget, int columnIndex) {
    if (flexTable != null && widget != null) {
        for (int row = 0; row < flexTable.getRowCount(); row++) {
            if (flexTable.getCellCount(row) > columnIndex) {
                if (widget == flexTable.getWidget(row, columnIndex)) {
                    return row;
                }/*from   w  w  w  . jav a2 s  .co m*/
            }
        }
    }

    return -1;
}