*/
private void printPages(List pageCursors, int pageIndex, Cursor rowCursor,
Cursor colCursor, ValueCursor dataCursor)
{
// Get a Cursor for this page.
Cursor pageCursor = (Cursor) pageCursors.get(pageIndex);
// Loop over the values of this page dimension
do
{
// If this is the fastest-varying page dimension, print a page.
if (pageIndex == pageCursors.size() - 1)
{
// Print the values of the page dimensions.
printPageHeadings(pageCursors);
// Print the column headings.
printColumnHeadings(colCursor);
// Print the rows
printRows(rowCursor, colCursor, dataCursor);
// Print a couple of blank lines to delimit pages.
println();
println();
}
// If this is not the fastest-varying page, recurse to the
// next fastest varying dimension.
else
{
printPages(pageCursors, pageIndex + 1, rowCursor, colCursor,
dataCursor);
}
} while (pageCursor.next());
// Reset this page dimension Cursor to its first element.
pageCursor.setPosition(1);
}