[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebTable.java,1.8,1.9
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2000-09-25 21:30:28
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory slayer.i.sourceforge.net:/tmp/cvs-serv23558/src/com/meterware/httpunit Modified Files: WebTable.java Log Message: Allow searching for nested tables in any position Index: WebTable.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebTable.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- WebTable.java 2000/09/11 14:23:47 1.8 +++ WebTable.java 2000/09/25 21:30:25 1.9 @@ -213,7 +213,6 @@ private URL _url; - private int[] _columnsRequired; private TableCell[][] _cells; @@ -226,28 +225,28 @@ private void readTable() { TableRow[] rows = getRows(); - _columnsRequired = new int[ rows.length ]; + int[] columnsRequired = new int[ rows.length ]; for (int i = 0; i < rows.length; i++) { TableCell[] cells = rows[i].getCells(); for (int j = 0; j < cells.length; j++) { - int spannedRows = Math.min( _columnsRequired.length-i, cells[j].getRowSpan() ); + int spannedRows = Math.min( columnsRequired.length-i, cells[j].getRowSpan() ); for (int k = 0; k < spannedRows; k++) { - _columnsRequired[ i+k ]+= cells[j].getColSpan(); + columnsRequired[ i+k ]+= cells[j].getColSpan(); } } } int numColumns = 0; - for (int i = 0; i < _columnsRequired.length; i++) { - numColumns = Math.max( numColumns, _columnsRequired[i] ); + for (int i = 0; i < columnsRequired.length; i++) { + numColumns = Math.max( numColumns, columnsRequired[i] ); } - _cells = new TableCell[ _columnsRequired.length ][ numColumns ]; + _cells = new TableCell[ columnsRequired.length ][ numColumns ]; for (int i = 0; i < rows.length; i++) { TableCell[] cells = rows[i].getCells(); for (int j = 0; j < cells.length; j++) { - int spannedRows = Math.min( _columnsRequired.length-i, cells[j].getRowSpan() ); + int spannedRows = Math.min( columnsRequired.length-i, cells[j].getRowSpan() ); for (int k = 0; k < spannedRows; k++) { for (int l = 0; l < cells[j].getColSpan(); l++) { placeCell( i+k, j+l, cells[j] ); |