// @see // org.gudy.azureus2.plugins.ui.tables.TableCellRefreshListener#refresh(org.gudy.azureus2.plugins.ui.tables.TableCell) public void refresh(TableCell cell) { VuzeActivitiesEntry entry = (VuzeActivitiesEntry) cell.getDataSource(); if (entry == null) return; if (!cell.setSortValue(entry.getTypeID()) && cell.isValid()) { return; } DownloadManager dm = entry.getDownloadManger(); boolean canPlay = PlayUtils.canPlayDS(entry, -1, false); boolean canDL = dm == null && entry.getDownloadManger() == null && (entry.getTorrent() != null || entry.getAssetHash() != null); boolean canRun = !canPlay && dm != null; if (canRun && dm != null && !dm.getAssumedComplete()) { canRun = false; } StringBuffer sb = new StringBuffer(); if (canDL) { if (sb.length() > 0) { sb.append(" | "); } sb.append("<A HREF=\"download\">Download</A>"); } if (canPlay) { if (sb.length() > 0) { sb.append(" | "); } sb.append("<A HREF=\"play\">Play</A>"); } if (canRun) { if (sb.length() > 0) { sb.append(", "); } sb.append("<A HREF=\"launch\">Launch</A>"); } cell.getTableRow().setData("text", sb.toString()); }
// @see // org.gudy.azureus2.plugins.ui.tables.TableCellAddedListener#cellAdded(org.gudy.azureus2.plugins.ui.tables.TableCell) public void cellAdded(TableCell cell) { cell.setMarginHeight(0); }