FileDocCategorySizeDatePackage
ModeItem.javaAPI DocAzureus 3.0.3.42055Mon Feb 19 14:24:06 GMT 2007org.gudy.azureus2.ui.swt.views.tableitems.files

ModeItem

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

Fields Summary
Constructors Summary
public ModeItem()
Default Constructor

    super("mode", ALIGN_LEAD, POSITION_LAST, 60, TableManager.TABLE_TORRENT_FILES);
    setRefreshInterval(INTERVAL_LIVE);
    setMinWidthAuto(true);
  
Methods Summary
public voidrefresh(TableCell cell)

    DiskManagerFileInfo fileInfo = (DiskManagerFileInfo)cell.getDataSource();
    long value = (fileInfo == null) ? 0 : fileInfo.getAccessMode();

    if( !cell.setSortValue( value ) && cell.isValid() ) {
      return;
    }
    
    
    String sText = 
      MessageText.getString("FileItem." + 
                            ((value == DiskManagerFileInfo.WRITE) ? "write" 
                                                                  : "read"));
    cell.setText(sText);