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

UpItem

public class UpItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener
bytes uploaded column
author
Olivier
author
TuxPaper (2004/Apr/17: modified to TableCellAdapter)

Fields Summary
Constructors Summary
public UpItem(String sTableID)
Default Constructor

    super("up", ALIGN_TRAIL, POSITION_INVISIBLE, 70, sTableID);
    setRefreshInterval(INTERVAL_LIVE);
    setMinWidthAuto(true);

    if (sTableID.equals(TableManager.TABLE_MYTORRENTS_COMPLETE))
      setPosition(POSITION_LAST);
    else
      setPosition(POSITION_INVISIBLE);
  
Methods Summary
public voidrefresh(TableCell cell)

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

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

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