Default Constructor super("commenticon", CommentIconItem.POSITION_LAST, 20, sTableID); setRefreshInterval(INTERVAL_LIVE); initializeAsGraphic(POSITION_LAST, 20); setWidthLimits(20, 20);
super("commenticon", CommentIconItem.POSITION_LAST, 20, sTableID); setRefreshInterval(INTERVAL_LIVE); initializeAsGraphic(POSITION_LAST, 20); setWidthLimits(20, 20);
DownloadManager dm = (DownloadManager) event.cell.getDataSource(); if (dm == null) {return;} if (event.eventType != TableCellMouseEvent.EVENT_MOUSEUP) {return;} // Only activate on LMB. if (event.button != 1) {return;} event.skipCoreFunctionality = true; TorrentUtil.promptUserForComment(new DownloadManager[]{dm}); refresh(event.cell);
if (cell.isDisposed()) {return;} DownloadManager dm = (DownloadManager)cell.getDataSource(); String comment = null; if (dm != null) { comment = dm.getDownloadState().getUserComment(); if (comment!=null && comment.length()==0) {comment = null;} } if (comment == null) { ((TableCellSWT)cell).setGraphic(ImageRepository.getImage(null)); cell.setToolTip(null); cell.setSortValue(0); } else { ((TableCellSWT)cell).setGraphic(ImageRepository.getImage("comment")); cell.setToolTip(comment); cell.setSortValue(1); }