FileDocCategorySizeDatePackage
MessagingItem.javaAPI DocAzureus 3.0.3.41975Sun Sep 23 04:55:04 BST 2007org.gudy.azureus2.ui.swt.views.tableitems.peers

MessagingItem

public class MessagingItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener

Fields Summary
Constructors Summary
public MessagingItem(String table_id)
Default Constructor

    super("Messaging", ALIGN_CENTER, POSITION_INVISIBLE, 40, table_id);
    setRefreshInterval(INTERVAL_LIVE);
  
Methods Summary
public voidrefresh(TableCell cell)

    PEPeer peer = (PEPeer)cell.getDataSource();
    int value = (peer == null) ? -1 : peer.getMessagingMode();

    if (!cell.setSortValue(value) && cell.isValid())
      return;
    
    String text;
    
    switch (value) {
    case PEPeer.MESSAGING_BT_ONLY:
		text = "";		
		break;
	case PEPeer.MESSAGING_LTEP:
		text = "LT";		
		break;
	case PEPeer.MESSAGING_AZMP:
		text = "AZ";		
		break;
	case PEPeer.MESSAGING_EXTERN:
		text = "Plugin";		
		break;
	default:
		text = "";
		break;
	}
    
    cell.setText(text);