@Override
 public void applySelectedStyle(int rowIndex) {
   HTMLTable.RowFormatter rowFormatter = transUnitTable.getRowFormatter();
   for (int i = 0; i < transUnitTable.getRowCount(); i++) {
     if (i == rowIndex) {
       rowFormatter.addStyleName(i, "selected");
     } else {
       rowFormatter.removeStyleName(i, "selected");
     }
   }
 }
Esempio n. 2
0
  private void applyDataRowStyles() {
    HTMLTable.RowFormatter rf = flexTable.getRowFormatter();

    for (int row = 1; row < flexTable.getRowCount(); ++row) {
      if ((row % 2) != 0) {
        rf.addStyleName(row, "FlexTable-OddRow");
      } else {
        rf.addStyleName(row, "FlexTable-EvenRow");
      }
    }
  }