FileDocCategorySizeDatePackage
StatusItem.javaAPI DocAzureus 3.0.3.42394Thu Feb 09 19:42:50 GMT 2006org.gudy.azureus2.ui.swt.views.tableitems.mytracker

StatusItem

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

Fields Summary
Constructors Summary
public StatusItem()
Default Constructor

    super("status", POSITION_LAST, 60, TableManager.TABLE_MYTRACKER);
    setRefreshInterval(INTERVAL_LIVE);
  
Methods Summary
public voidrefresh(TableCell cell)

    TRHostTorrent item = (TRHostTorrent)cell.getDataSource();

    String status_text = "";
    
    if( item != null ) {
      int status = item.getStatus();
      
      if( !cell.setSortValue( status ) && cell.isValid() ) {
        return;
      }
      
      if (status == TRHostTorrent.TS_STARTED) {
        status_text = MessageText.getString( "MyTrackerView.status.started" );
      }
      else if (status == TRHostTorrent.TS_STOPPED) {
        status_text = MessageText.getString( "MyTrackerView.status.stopped" );
      }
      else if (status == TRHostTorrent.TS_FAILED) {
        status_text = MessageText.getString( "MyTrackerView.status.failed" );
      }
      else if (status == TRHostTorrent.TS_PUBLISHED) {
        status_text = MessageText.getString( "MyTrackerView.status.published" );
      }
    }
    
    cell.setText( status_text );