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

FileExtensionItem

public class FileExtensionItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener

Fields Summary
Constructors Summary
public FileExtensionItem()
Default Constructor

    super("fileext", ALIGN_LEAD, POSITION_INVISIBLE, 50, TableManager.TABLE_TORRENT_FILES);
    setMinWidthAuto(true);
  
Methods Summary
private static java.lang.StringdetermineFileExt(org.gudy.azureus2.core3.disk.DiskManagerFileInfo fileInfo)

	String name = (fileInfo == null) ? "" : fileInfo.getFile(true).getName();
	int dot_position = name.lastIndexOf(".");
	if (dot_position == -1) {return "";}
	return name.substring(dot_position+1);
  
public voidrefresh(TableCell cell)

    DiskManagerFileInfo fileInfo = (DiskManagerFileInfo)cell.getDataSource();
    cell.setText(determineFileExt(fileInfo));