super("name", POSITION_LAST, 250, TableManager.TABLE_MYTRACKER);
setType(TableColumn.TYPE_TEXT);
}
public void refresh(TableCell cell) {
TRHostTorrent item = (TRHostTorrent) cell.getDataSource();
String name = (item == null) ? ""
: TorrentUtils.getLocalisedName(item.getTorrent());
//setText returns true only if the text is updated
if (cell.setText(name) || !cell.isValid()) {
if (item != null && item.getTorrent() != null && bShowIcon
&& (cell instanceof TableCellSWT)) {
try {
TOTorrent torrent = item.getTorrent();
String path = torrent.getFiles()[0].getRelativePath();
if (path != null) {
// Don't ever dispose of PathIcon, it's cached and may be used elsewhere
Image icon = ImageRepository.getPathIcon(path, false, torrent != null