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

SizeItem

public class SizeItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener
Size of Torrent cell
author
Olivier
author
TuxPaper (2004/Apr/17: modified to TableCellAdapter)

Fields Summary
public static String
COLUMN_ID
Constructors Summary
public SizeItem(String sTableID)
Default Constructor


     
	   
		super(COLUMN_ID, ALIGN_TRAIL, POSITION_LAST, 70, sTableID);
		setMinWidthAuto(true);
	
Methods Summary
public voidrefresh(TableCell cell)

    DownloadManager dm = (DownloadManager)cell.getDataSource();
    long value = (dm == null) ? 0 : dm.getSize();

    if (!cell.setSortValue(value) && cell.isValid())
      return;

    cell.setText(DisplayFormatters.formatByteCountToKiBEtc(value));