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

SizeItem

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

Fields Summary
Constructors Summary
public SizeItem()
Default Constructor

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

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

    if( !cell.setSortValue( value ) && cell.isValid() ) {
      return;
    }
    
    cell.setText(DisplayFormatters.formatByteCountToKiBEtc(value));