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

TypeItem

public class TypeItem extends org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn implements TableCellRefreshListener, TableCellToolTipListener
author
Olivier
author
TuxPaper (2004/Apr/19: modified to TableCellAdapter)

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

    super("T", ALIGN_CENTER, POSITION_LAST, 20, table_id);
    setRefreshInterval(INTERVAL_LIVE);
  
Methods Summary
public voidcellHover(TableCell cell)

		String ID = "PeersView.T." + cell.getText() + ".tooltip";
		String sTooltip = MessageText.getString(ID, "");
		if (sTooltip.length() > 0)
			cell.setToolTip(sTooltip);
	
public voidcellHoverComplete(TableCell cell)

		cell.setToolTip(null);
	
public voidrefresh(TableCell cell)

    PEPeer peer = (PEPeer)cell.getDataSource();
    long value = (peer == null) ? 0 : (peer.isIncoming() ? 1 : 0);

    if (!cell.setSortValue(value) && cell.isValid())
      return;

    cell.setText((value == 1) ? "R" : "L");