super("swarm_average_completion", ALIGN_TRAIL, POSITION_INVISIBLE, 70, sTableID); setRefreshInterval(INTERVAL_GRAPHIC); setMinWidthAuto(true);
int average = -1; DownloadManager dm = (DownloadManager)cell.getDataSource(); if( dm != null ) { PEPeerManager pm = dm.getPeerManager(); if( pm != null ) { average = pm.getAverageCompletionInThousandNotation(); } } if( !cell.setSortValue( average ) && cell.isValid() ) { return; } if( average < 0 ) { cell.setText( "" ); } else { cell.setText( DisplayFormatters.formatPercentFromThousands( average ) ); }