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

TimeSinceDownloadItem

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

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

    super("timesincedownload", ALIGN_TRAIL, POSITION_INVISIBLE, 70, sTableID);
    setRefreshInterval(INTERVAL_LIVE);
    setMinWidthAuto(true);
  
Methods Summary
public voidrefresh(TableCell cell)

    DownloadManager dm = (DownloadManager)cell.getDataSource();
    
    int value = (dm == null) ? -2 : dm.getStats().getTimeSinceLastDataReceivedInSeconds();
    
    if (!cell.setSortValue(value==-1?Integer.MAX_VALUE:value) && cell.isValid())
      return;

    cell.setText(value==-2?"":(value==-1?Constants.INFINITY_STRING:TimeFormatter.format(value)));;