TrackerNextAccessItempublic class TrackerNextAccessItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener, TableCellToolTipListener, TableCellDisposeListener
Constructors Summary |
---|
public TrackerNextAccessItem(String sTableID)
super("trackernextaccess", ALIGN_TRAIL, POSITION_INVISIBLE, 70, sTableID);
setRefreshInterval(INTERVAL_LIVE);
setMinWidthAuto(true);
|
Methods Summary |
---|
public void | cellHover(TableCell cell)
DownloadManager dm = (DownloadManager) cell.getDataSource();
cell.setToolTip(TrackerCellUtils.getTooltipText(cell, dm));
| public void | cellHoverComplete(TableCell cell)
cell.setToolTip(null);
| public void | dispose(TableCell cell)
map.remove(cell.getDataSource());
| public void | refresh(TableCell cell)
DownloadManager dm = (DownloadManager)cell.getDataSource();
if (cell.isValid() && map.containsKey(dm)) {
long lNextUpdate = ((Long)map.get(dm)).longValue();
if (System.currentTimeMillis() < lNextUpdate)
return;
}
long value = (dm == null) ? 0 : dm.getTrackerTime();
if (value < -1)
value = -1;
long lNextUpdate = System.currentTimeMillis()
+ (((value > 60) ? (value % 60) : 1) * 1000);
map.put(dm, new Long(lNextUpdate));
if (!cell.setSortValue(value) && cell.isValid())
return;
String sText = TimeFormatter.formatColon(value);
if (value > 60)
sText = "< " + sText;
TrackerCellUtils.updateColor(cell, dm);
cell.setText(sText);
|
|