// you get "1-1 of 0") and "1 of 1" when there is only one record
// (otherwise you get "1-1 of 1"). Not internationalised (but
// neither is SimplePager)
protected String createText() {
NumberFormat formatter = NumberFormat.getFormat( "#,###" );
HasRows display = getDisplay();
Range range = display.getVisibleRange();
int pageStart = range.getStart() + 1;
int pageSize = range.getLength();
int dataSize = display.getRowCount();
int endIndex = Math.min( dataSize,
pageStart
+ pageSize
- 1 );
endIndex = Math.max( pageStart,
endIndex );
boolean exact = display.isRowCountExact();
if ( dataSize == 0 ) {
return "0 of 0";
} else if ( pageStart == endIndex ) {
return formatter.format( pageStart )
+ " of "