/** * Remove all rows in this table. */ public void removeAllRows() { int numRows = getRowCount(); for (int i = 0; i < numRows; i++) { removeRow(0); } }
/** * Ensure that the row exists. * * @param row The row to prepare. * @throws IndexOutOfBoundsException if the row is negative */ @Override protected void prepareRow(int row) { if (row < 0) { throw new IndexOutOfBoundsException( "Cannot create a row with a negative index: " + row); } // Ensure that the requested row exists. int rowCount = getRowCount(); for (int i = rowCount; i <= row; i++) { insertRow(i); } } }
/** * Remove all rows in this table. */ public void removeAllRows() { int numRows = getRowCount(); for (int i = 0; i < numRows; i++) { removeRow(0); } }
public void addRow() { table.insertRow(table.getRowCount()); for (int i = 0; i < cols; i++) { addCell(table.getRowCount() - 1, ""); } }
public void addItem( String text, T object ) { int row = table.getRowCount(); rows.put( row, object ); table.setText( row, 0, text ); }
public void deselect() { if (table.getRowCount() > 0) { styleRow(selectedRowIndex, false); selectedRowIndex = 0; isRowSelected = false; } }
public void addItem( String text, T object ) { int row = table.getRowCount(); rows.put( row, object ); table.setText( row, 0, text ); }
private void clearLinesIcons(int col) { for (int i = 0; i < layout.getRowCount(); i++) { this.clearLineIcons(i, col); } }
public void clear(){ rowCount = 0; for(int i=0; i < simpleTable.getRowCount(); i++){ simpleTable.removeRow(i); } } }
/** * Remove all rows in this table. */ public void removeAllRows() { int numRows = getRowCount(); for (int i = 0; i < numRows; i++) { removeRow(0); } }
private void addRow(String label, String value) { int row = metadataTable.getRowCount(); metadataTable.setText(row, 0, label); metadataTable.setText(row, 1, value); }
@Override public void setHTML( String html ) { if( (table.getRowCount() > row) && (table.getCellCount( row ) > col) ) table.clearCell( row, col ); table.setHTML( row, col, html ); }
public void addRow(final Widget widget) { //TODO ARIA: what to do with widget has no visible label? int row = currentTable.getRowCount(); currentTable.setWidget(row, 0, widget); currentTable.getFlexCellFormatter().setColSpan(row, 0, 2); }
@Override public void setEnabled(boolean b) { enabled = b; for (int i=0; i < layout.getRowCount(); i++){ for (int j=0; j < layout.getCellCount(i); j++){ ((KSCheckBox)layout.getWidget(i, j)).setEnabled(b); } } }
@Override public void setEnabled(boolean b) { enabled = b; for (int i=0; i < layout.getRowCount(); i++){ for (int j=0; j < layout.getCellCount(i); j++){ ((KSRadioButton)layout.getWidget(i, j)).setEnabled(b); } } }
private void selectRow(final int row) { if (row >= 0 && row < table.getRowCount()) { if (isRowSelected) { styleRow(selectedRowIndex, false); } selectedRowIndex = row; styleRow(selectedRowIndex, true); isRowSelected = true; fireSelectRowEvent(); } }
public void addRow(final Widget widget) { //TODO ARIA: what to do with widget has no visible label? int row = currentTable.getRowCount(); currentTable.setWidget(row, 0, widget); currentTable.getFlexCellFormatter().setColSpan(row, 0, 2); }
@Override public void setText( String text ) { if( (table.getRowCount() > row) && (table.getCellCount( row ) > col) ) table.clearCell( row, col ); table.setText( row, col, text ); }
public static void addBottomAndRightPaddingToTableCells(final FlexTable table) { for (int rowIndex = 0; rowIndex < table.getRowCount(); rowIndex++) { for (int cellIndex = 0; cellIndex < table.getCellCount(rowIndex); cellIndex++) { table.getCellFormatter().getElement(rowIndex, cellIndex).setAttribute("style", BOTTOM_RIGHT_PADDING); } } } }
public void addSection( String text ) { int row = table.getRowCount(); table.setText( row, 0, text ); table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX ); }