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

StatusItem

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

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

    super("status", POSITION_LAST, 80, sTableID);
    setRefreshInterval(INTERVAL_LIVE);
  
Methods Summary
public voidrefresh(org.gudy.azureus2.plugins.ui.tables.TableCell cell)

    DownloadManager dm = (DownloadManager)cell.getDataSource();
    
    if( cell.setText( dm == null ? "" : DisplayFormatters.formatDownloadStatus(dm) ) || !cell.isValid() ) {
      int state = dm.getState();
      if (state == DownloadManager.STATE_SEEDING)
        ((TableCellSWT)cell).getTableRowSWT().setForeground(Colors.blues[Colors.BLUES_MIDDARK]);
      else if (state == DownloadManager.STATE_ERROR)
        ((TableCellSWT)cell).getTableRowSWT().setForeground(Colors.colorError);
      else
        ((TableCellSWT)cell).getTableRowSWT().setForeground(null);
    }