CommentItempublic class CommentItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener, org.gudy.azureus2.ui.swt.debug.ObfusticateCellText, TableCellMouseListenerUser-editable comment for a download. |
Constructors Summary |
---|
public CommentItem(String sTableID)Default Constructor
super("comment", POSITION_INVISIBLE, 300, sTableID);
setRefreshInterval(INTERVAL_LIVE);
setType(TableColumn.TYPE_TEXT);
setObfustication(true);
setMinWidth(50);
|
Methods Summary |
---|
public void | cellMouseTrigger(TableCellMouseEvent event)
DownloadManager dm = (DownloadManager) event.cell.getDataSource();
if (dm == null) {return;}
event.skipCoreFunctionality = true;
if (event.eventType != TableCellMouseEvent.EVENT_MOUSEDOUBLECLICK) {return;}
TorrentUtil.promptUserForComment(new DownloadManager[] {dm});
| public java.lang.String | getObfusticatedText(TableCell cell)
DownloadManager dm = (DownloadManager)cell.getDataSource();
return Integer.toHexString(dm.hashCode());
| public void | refresh(TableCell cell)
String comment = null;
DownloadManager dm = (DownloadManager)cell.getDataSource();
comment = dm.getDownloadState().getUserComment();
if (comment != null) {
comment = comment.replace('\r", ' ").replace('\n", ' ");
}
cell.setText((comment == null) ? "" : comment);
|
|