super("filesdone", ALIGN_CENTER, POSITION_INVISIBLE, 50, sTableID); setRefreshInterval(5); setMinWidthAuto(true);
DownloadManager dm = (DownloadManager)cell.getDataSource(); String text = ""; if ( dm != null ){ int complete = 0; int skipped = 0; int skipped_complete = 0; DiskManagerFileInfo[] files = dm.getDiskManagerFileInfo(); int total = files.length; for (int i=0;i<files.length;i++){ DiskManagerFileInfo file = files[i]; if ( file.getLength() == file.getDownloaded()){ complete++; if ( file.isSkipped()){ skipped++; skipped_complete++; } }else if ( file.isSkipped()){ skipped++; } } if ( skipped == 0 ){ text = complete + "/" + total; }else{ text = (complete-skipped_complete) + "(" + complete + ")/" + (total-skipped) + "(" + total + ")"; } } cell.setText( text );