use of com.biglybt.core.torrent.impl.TorrentOpenFileOptions in project BiglyBT by BiglySoftware.
the class TableColumnOTOF_Name method refresh.
@Override
public void refresh(TableCell cell) {
Object ds = cell.getDataSource();
if (!(ds instanceof TorrentOpenFileOptions)) {
return;
}
TorrentOpenFileOptions tfi = (TorrentOpenFileOptions) ds;
cell.setText(tfi.getDestFileName());
}
use of com.biglybt.core.torrent.impl.TorrentOpenFileOptions in project BiglyBT by BiglySoftware.
the class TableColumnOTOF_Priority method refresh.
@Override
public void refresh(TableCell cell) {
Object ds = cell.getDataSource();
if (!(ds instanceof TorrentOpenFileOptions)) {
return;
}
TorrentOpenFileOptions tfi = (TorrentOpenFileOptions) ds;
int priority;
String text;
if (tfi.isToDownload()) {
priority = tfi.getPriority();
if (priority > 0) {
text = MessageText.getString("FileItem.high");
if (priority > 1) {
text += " (" + priority + ")";
}
} else if (priority < 0) {
text = MessageText.getString("FileItem.low");
if (priority < -1) {
text += " (" + priority + ")";
}
} else {
text = MessageText.getString("FileItem.normal");
}
} else {
priority = Integer.MIN_VALUE;
text = "";
}
if (cell.setSortValue(priority)) {
cell.setText(text);
}
}
use of com.biglybt.core.torrent.impl.TorrentOpenFileOptions in project BiglyBT by BiglySoftware.
the class TableColumnOTOF_Size method refresh.
@Override
public void refresh(TableCell cell) {
Object ds = cell.getDataSource();
if (!(ds instanceof TorrentOpenFileOptions)) {
return;
}
TorrentOpenFileOptions tfi = (TorrentOpenFileOptions) ds;
cell.setSortValue(tfi.lSize);
cell.setText(DisplayFormatters.formatByteCountToKiBEtc(tfi.lSize));
}
Aggregations