use of com.biglybt.ui.swt.views.tableitems.peers.DownloadNameItem in project BiglyBT by BiglySoftware.
the class PeersViewBase method initYourTableView.
protected TableViewSWT<PEPeer> initYourTableView(String table_id, boolean enable_tabs) {
if (table_id == TableManager.TABLE_TORRENT_PEERS) {
tv = TableViewFactory.createTableViewSWT(Peer.class, TableManager.TABLE_TORRENT_PEERS, getPropertiesPrefix(), basicItems, "pieces", SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
} else {
TableColumnCore[] items = PeersView.getBasicColumnItems(TableManager.TABLE_ALL_PEERS);
TableColumnCore[] basicItems = new TableColumnCore[items.length + 1];
System.arraycopy(items, 0, basicItems, 0, items.length);
basicItems[items.length] = new DownloadNameItem(TableManager.TABLE_ALL_PEERS);
TableColumnManager tcManager = TableColumnManager.getInstance();
tcManager.setDefaultColumnNames(TableManager.TABLE_ALL_PEERS, basicItems);
tv = TableViewFactory.createTableViewSWT(Peer.class, TableManager.TABLE_ALL_PEERS, getPropertiesPrefix(), basicItems, "connected_time", SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
}
tv.setRowDefaultHeightEM(1);
tv.setEnableTabViews(enable_tabs, true, null);
UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
if (uiFunctions != null) {
UISWTInstance pluginUI = uiFunctions.getUISWTInstance();
registerPluginViews(table_id, pluginUI);
}
tv.addLifeCycleListener(this);
tv.addMenuFillListener(this);
tv.addSelectionListener(this, false);
return tv;
}
Aggregations