FileDocCategorySizeDatePackage
PieceCountItem.javaAPI DocAzureus 3.0.3.41814Mon Feb 19 14:24:06 GMT 2007org.gudy.azureus2.ui.swt.views.tableitems.files

PieceCountItem

public class PieceCountItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener
author
TuxPaper
since
2.0.8.5

Fields Summary
Constructors Summary
public PieceCountItem()
Default Constructor

    super("numberofpieces", ALIGN_TRAIL, POSITION_LAST, 75, TableManager.TABLE_TORRENT_FILES);
    setMinWidthAuto(true);
  
Methods Summary
public voidrefresh(TableCell cell)

    DiskManagerFileInfo fileInfo = (DiskManagerFileInfo)cell.getDataSource();
    long value = (fileInfo == null) ? 0 : fileInfo.getNbPieces();

    if( !cell.setSortValue( value ) && cell.isValid() ) {
      return;
    }
    
	// < 0 -> unknown skeleton value 

    cell.setText( value<0?"":(""+value));