use of com.biglybt.core.tracker.client.impl.bt.TRTrackerBTScraperResponseImpl in project BiglyBT by BiglySoftware.
the class TrackerCellUtils method updateColor.
public static void updateColor(TableCell cell, DownloadManager dm, boolean show_errors) {
if (dm == null || cell == null)
return;
if (show_errors) {
if (dm.isTrackerError()) {
cell.setForegroundToErrorColor();
return;
}
}
TRTrackerScraperResponse response = dm.getTrackerScrapeResponse();
if (response instanceof TRTrackerBTScraperResponseImpl && response.getStatus() == TRTrackerScraperResponse.ST_ONLINE) {
boolean bMultiHashScrapes = ((TRTrackerBTScraperResponseImpl) response).getTrackerStatus().getSupportsMultipeHashScrapes();
Color color = (bMultiHashScrapes) ? null : Colors.grey;
cell.setForeground(Utils.colorToIntArray(color));
} else {
cell.setForeground(Utils.colorToIntArray(null));
}
}
use of com.biglybt.core.tracker.client.impl.bt.TRTrackerBTScraperResponseImpl in project BiglyBT by BiglySoftware.
the class TrackerCellUtils method getTooltipText.
public static String getTooltipText(TableCell cell, DownloadManager dm, boolean show_errors) {
if (dm == null || cell == null)
return null;
if (show_errors) {
if (dm.isTrackerError()) {
return (null);
}
}
String sToolTip = null;
TRTrackerScraperResponse response = dm.getTrackerScrapeResponse();
if (response instanceof TRTrackerBTScraperResponseImpl && response.getStatus() == TRTrackerScraperResponse.ST_ONLINE) {
String sPrefix = ((TRTrackerBTScraperResponseImpl) response).getTrackerStatus().getSupportsMultipeHashScrapes() ? "" : "No";
sToolTip = MessageText.getString("Tracker.tooltip." + sPrefix + "MultiSupport");
}
return sToolTip;
}
Aggregations