FileDocCategorySizeDatePackage
ClientIdentificationItem.javaAPI DocAzureus 3.0.3.42413Sun Sep 23 04:54:50 BST 2007org.gudy.azureus2.ui.swt.views.tableitems.peers

ClientIdentificationItem

public class ClientIdentificationItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements org.gudy.azureus2.plugins.ui.tables.TableCellRefreshListener
author
Allan Crooks

Fields Summary
Constructors Summary
public ClientIdentificationItem(String table_id)

		super("client_identification", POSITION_INVISIBLE, 200, table_id);
		setRefreshInterval(INTERVAL_LIVE);
	
Methods Summary
public voidrefresh(org.gudy.azureus2.plugins.ui.tables.TableCell cell)

	    PEPeer peer = (PEPeer)cell.getDataSource();
	    if (peer == null) {cell.setText(""); return;}
	    String peer_id_name = peer.getClientNameFromPeerID();
	    String peer_handshake_name = peer.getClientNameFromExtensionHandshake();
	    
	    if (peer_id_name == null) {peer_id_name = "";}
	    if (peer_handshake_name == null) {peer_handshake_name = "";}
	    
	    if (peer_id_name.equals("") && peer_handshake_name.equals("")) {
	    	cell.setText(""); return;
	    }
	    
	    String result = peer_id_name;
	    if (!peer_handshake_name.equals("")) {result += " / " + peer_handshake_name;}
	    cell.setText(result);