FileDocCategorySizeDatePackage
VivaldiView.javaAPI DocAzureus 3.0.3.42961Fri May 04 14:27:42 BST 2007org.gudy.azureus2.ui.swt.views.stats

VivaldiView

public class VivaldiView extends org.gudy.azureus2.ui.swt.views.AbstractIView

Fields Summary
com.aelitis.azureus.core.dht.DHT
dht
org.eclipse.swt.widgets.Composite
panel
VivaldiPanel
drawPanel
private final boolean
autoAlpha
Constructors Summary
public VivaldiView()

  	autoAlpha = false;
    init();
  
public VivaldiView(boolean autoAlpha)

  	this.autoAlpha = autoAlpha;
		init();
  
Methods Summary
public org.eclipse.swt.widgets.CompositegetComposite()

   return panel;
  
public java.lang.StringgetData()

    return "VivaldiView.title.full";
  
public java.lang.StringgetFullTitle()

    return MessageText.getString("VivaldiView.title.full"); //$NON-NLS-1$
  
private voidinit()

    try {
      PluginInterface dht_pi = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByClass( DHTPlugin.class );
    
      if ( dht_pi == null ){
    	   
    	return;
      }
       
      DHT[] dhts = ((DHTPlugin)dht_pi.getPlugin()).getDHTs();
    
      if (dhts.length == 0){
    	  return;
      }
      
      dht = dhts[dhts.length-1];
    } catch(Exception e) {
      Debug.printStackTrace( e );
    }
  
public voidinitialize(org.eclipse.swt.widgets.Composite composite)

    panel = new Composite(composite,SWT.NULL);
    panel.setLayout(new FillLayout());    
    drawPanel = new VivaldiPanel(panel);    
  	drawPanel.setAutoAlpha(autoAlpha);
  
public voidrefresh()

  	if (dht == null) {
  		init();
  	}
  	
    if(dht != null) {
      List l = dht.getControl().getContacts();
      drawPanel.refreshContacts(l,dht.getControl().getTransport().getLocalContact());
    }