Methods Summary |
---|
public void | beginConstruction()
// Download name.
this.createFixedTextLabel("MinimizedWindow.name", false, false);
this.download_name = this.createDataLabel(200);
// Download progress.
this.progress_bar = this.createPercentProgressBar(100);
// Download speed.
this.createFixedTextLabel("ConfigView.download.abbreviated", false, false);
this.down_speed = this.createSpeedLabel();
// Upload speed.
this.createFixedTextLabel("ConfigView.upload.abbreviated", false, false);
this.up_speed = this.createSpeedLabel();
// ETA.
this.createFixedTextLabel("MyTorrentsView.eta", true, false);
this.eta = this.createDataLabel(65);
|
public void | buildMenu(org.eclipse.swt.widgets.Menu menu)
// Queue
final MenuItem itemQueue = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(itemQueue, "MyTorrentsView.menu.queue");
Utils.setMenuItemImage(itemQueue, "start");
itemQueue.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.queue(download, splash);
}
});
itemQueue.setEnabled(ManagerUtils.isStartable(download));
// Stop
final MenuItem itemStop = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(itemStop, "MyTorrentsView.menu.stop");
Utils.setMenuItemImage(itemStop, "stop");
itemStop.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.stop(download, splash);
}
});
itemStop.setEnabled(ManagerUtils.isStopable(download));
new MenuItem(menu, SWT.SEPARATOR);
super.buildMenu(menu);
|
public static void | close(org.gudy.azureus2.core3.download.DownloadManager download)
DownloadBar result = (DownloadBar)manager.getMiniBarForObject(download);
if (result != null) {result.close();}
|
public java.lang.Object | getContextObject()return this.download;
|
public static MiniBarManager | getManager()
manager = new MiniBarManager("AllTransfersBar");
return manager;
|
public java.lang.Object | getPluginMenuContextObject()
try {return DownloadManagerImpl.getDownloadStatic(this.download);}
catch (DownloadException de) {return null;}
|
public java.lang.String[] | getPluginMenuIdentifiers(java.lang.Object context)
if (context == null) {return null;}
return new String[] {"downloadbar", "download_context"};
|
public static org.gudy.azureus2.ui.swt.minibar.DownloadBar | open(org.gudy.azureus2.core3.download.DownloadManager download, org.eclipse.swt.widgets.Shell main)
DownloadBar result = (DownloadBar)manager.getMiniBarForObject(download);
if (result == null) {
result = new DownloadBar(download, main);
}
return result;
|
protected void | refresh0()
DownloadManagerStats stats = download.getStats();
download_name.setText(download.getDisplayName());
int percent = stats.getCompleted();
this.updateSpeedLabel(down_speed, stats.getDataReceiveRate(), stats.getProtocolReceiveRate());
this.updateSpeedLabel(up_speed, stats.getDataSendRate(), stats.getProtocolSendRate());
eta.setText(DisplayFormatters.formatETA(stats.getETA()));
if (progress_bar.getSelection() != percent) {
progress_bar.setSelection(percent);
progress_bar.redraw();
}
|