/** * @webref table:method * @brief Removes all rows from a table * @see Table#addRow() * @see Table#removeRow(int) */ public void clearRows() { setRowCount(0); }
/** Make sure this is a legit row, and if not, expand the table. */ protected void ensureRow(int row) { if (row >= rowCount) { setRowCount(row + 1); } }
/** * @webref table:method * @brief Removes all rows from a table * @see Table#addRow() * @see Table#removeRow(int) */ public void clearRows() { setRowCount(0); }
/** Make sure this is a legit row, and if not, expand the table. */ protected void ensureRow(int row) { if (row >= rowCount) { setRowCount(row + 1); } }
/** * @webref table:method * @brief Adds a row to a table * @see Table#removeRow(int) * @see Table#clearRows() */ public TableRow addRow() { //if (rowIncrement == 0) { setRowCount(rowCount + 1); return new RowPointer(this, rowCount - 1); }
/** * @webref table:method * @brief Adds a row to a table * @see Table#removeRow(int) * @see Table#clearRows() */ public TableRow addRow() { //if (rowIncrement == 0) { setRowCount(rowCount + 1); return new RowPointer(this, rowCount - 1); }
int row = 0; if (rowCount == 0) { setRowCount(10); while ((line = reader.readLine()) != null) { if (row == getRowCount()) { setRowCount(row << 1); setRowCount(row);
public void addRows(Table source) { int index = getRowCount(); setRowCount(index + source.getRowCount()); for (TableRow row : source.rows()) { setRow(index++, row); } }
int row = 0; if (rowCount == 0) { setRowCount(10); while ((line = reader.readLine()) != null) { if (row == getRowCount()) { setRowCount(row << 1); setRowCount(row);
setRowCount(rowCount); int columnCount = input.readInt(); setColumnCount(columnCount);
setRowCount(rowCount); int columnCount = input.readInt(); setColumnCount(columnCount);
setRowCount(alloc); setRowCount(alloc); setRowCount(row);
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
lastRow--; setRowCount(lastRow + 1);
if (mask[r]) count++; datatab.setRowCount(count);