Esempio n. 1
0
  public void removeTopRows(int rowCount) {
    if (rowCount <= 0) return;

    NodeList<TableSectionElement> tBodies = table_.getTBodies();
    for (int i = 0; i < tBodies.getLength(); i++) {
      rowCount = removeTopRows(tBodies.getItem(i), rowCount);
      if (rowCount == 0) return;
    }
  }
Esempio n. 2
0
  public boolean moveSelectionDown() {
    if (selectedRows_.size() == 0) return false;

    sortSelectedRows();
    int bottom = selectedRows_.get(selectedRows_.size() - 1).getRowIndex();

    NodeList<TableRowElement> rows = table_.getRows();
    TableRowElement rowToSelect = null;
    while (++bottom < rows.getLength()) {
      TableRowElement row = rows.getItem(bottom);
      if (codec_.isValueRow(row)) {
        rowToSelect = row;
        break;
      }
    }
    if (rowToSelect == null) return false;

    clearSelection();
    setSelected(rowToSelect, true);
    return true;
  }
Esempio n. 3
0
  public boolean moveSelectionUp() {
    if (selectedRows_.size() == 0) return false;

    sortSelectedRows();
    int top = selectedRows_.get(0).getRowIndex();

    NodeList<TableRowElement> rows = table_.getRows();
    TableRowElement rowToSelect = null;
    while (--top >= 0) {
      TableRowElement row = rows.getItem(top);
      if (codec_.isValueRow(row)) {
        rowToSelect = row;
        break;
      }
    }
    if (rowToSelect == null) return false;

    clearSelection();
    setSelected(rowToSelect, true);
    return true;
  }