Search in sources :

Example 1 with TableViewCreator

use of com.biglybt.ui.common.table.TableViewCreator in project BiglyBT by BiglySoftware.

the class TagAddedToDateItem method refresh.

@Override
public void refresh(TableCell cell, long timestamp) {
    DownloadManager dm = (DownloadManager) cell.getDataSource();
    TableView<?> tv = cell.getTableRow().getView();
    TableViewCreator tvc = tv == null ? null : cell.getTableRow().getView().getTableViewCreator();
    if (dm != null && tvc instanceof MyTorrentsView) {
        MyTorrentsView mtv = (MyTorrentsView) tvc;
        Tag[] tags = mtv.getCurrentTags();
        if (tags != null && tags.length == 1) {
            long time = tags[0].getTaggableAddedTime(dm);
            super.refresh(cell, time);
            return;
        }
    }
    super.refresh(cell, -1);
}
Also used : TableViewCreator(com.biglybt.ui.common.table.TableViewCreator) Tag(com.biglybt.core.tag.Tag) MyTorrentsView(com.biglybt.ui.swt.views.MyTorrentsView) DownloadManager(com.biglybt.core.download.DownloadManager)

Aggregations

DownloadManager (com.biglybt.core.download.DownloadManager)1 Tag (com.biglybt.core.tag.Tag)1 TableViewCreator (com.biglybt.ui.common.table.TableViewCreator)1 MyTorrentsView (com.biglybt.ui.swt.views.MyTorrentsView)1