use of com.biglybt.core.history.DownloadHistory in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryAddDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
((ColumnDateSizer) tc).refresh(cell, dl.getAddTime());
}
}
use of com.biglybt.core.history.DownloadHistory in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryCompleteDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
long time = dl.getCompleteTime();
if (time <= 0) {
// incomplete - force sort to be above completed ones
time = Long.MAX_VALUE;
}
((ColumnDateSizer) tc).refresh(cell, time);
}
}
use of com.biglybt.core.history.DownloadHistory in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryHash method refresh.
@Override
public void refresh(TableCell cell) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
byte[] hash = null;
if (dl != null) {
hash = dl.getTorrentHash();
}
String str = hash == null ? "" : ByteFormatter.encodeString(hash);
if (!cell.setSortValue(str) && cell.isValid()) {
return;
}
if (!cell.isShown()) {
return;
}
cell.setText(str);
}
use of com.biglybt.core.history.DownloadHistory in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryName method refresh.
@Override
public void refresh(TableCell cell) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
String name = null;
if (dl != null) {
name = dl.getName();
}
if (name == null) {
name = "";
}
if (!cell.setSortValue(name) && cell.isValid()) {
return;
}
if (!cell.isShown()) {
return;
}
cell.setText(name);
}
use of com.biglybt.core.history.DownloadHistory in project BiglyBT by BiglySoftware.
the class ColumnDLHistorySaveLocation method refresh.
@Override
public void refresh(TableCell cell) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
String sl = null;
if (dl != null) {
sl = dl.getSaveLocation();
}
if (sl == null) {
sl = "";
}
if (!cell.setSortValue(sl) && cell.isValid()) {
return;
}
if (!cell.isShown()) {
return;
}
cell.setText(sl);
}
Aggregations