Methods Summary |
---|
public void | beginConstruction()
this.createFixedTextLabel("MinimizedWindow.all_transfers", false, true);
this.createGap(40);
// 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();
|
public void | buildMenu(org.eclipse.swt.widgets.Menu menu)
// Start All
MenuItem start_all = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(start_all, "MainWindow.menu.transfers.startalltransfers");
Utils.setMenuItemImage(start_all, "start");
start_all.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.asyncStartAll();
}
});
start_all.setEnabled(true);
// Stop All
MenuItem stop_all = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(stop_all, "MainWindow.menu.transfers.stopalltransfers");
Utils.setMenuItemImage(stop_all, "stop");
stop_all.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.asyncStopAll();
}
});
stop_all.setEnabled(true);
// Pause All
MenuItem pause_all = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(pause_all, "MainWindow.menu.transfers.pausetransfers");
Utils.setMenuItemImage(pause_all, "pause");
pause_all.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.asyncPause();
}
});
pause_all.setEnabled(g_manager.canPauseDownloads());
// Resume All
MenuItem resume_all = new MenuItem(menu, SWT.PUSH);
Messages.setLanguageText(resume_all, "MainWindow.menu.transfers.resumetransfers");
Utils.setMenuItemImage(resume_all, "resume");
resume_all.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
ManagerUtils.asyncResume();
}
});
resume_all.setEnabled(g_manager.canResumeDownloads());
new MenuItem(menu, SWT.SEPARATOR);
super.buildMenu(menu);
|
public static void | close(org.gudy.azureus2.core3.global.GlobalManager g_manager)
AllTransfersBar result = getBarIfOpen(g_manager);
if (result != null) {result.close();}
|
public static org.gudy.azureus2.ui.swt.minibar.AllTransfersBar | getBarIfOpen(org.gudy.azureus2.core3.global.GlobalManager g_manager)
return (AllTransfersBar)manager.getMiniBarForObject(g_manager);
|
public java.lang.Object | getContextObject()return this.g_manager;
|
protected org.eclipse.swt.graphics.Point | getInitialLocation()
if (!COConfigurationManager.getBooleanParameter("Remember transfer bar location")) {
return null;
}
if (!COConfigurationManager.hasParameter("transferbar.x", false)) {
return null;
}
int x = COConfigurationManager.getIntParameter("transferbar.x");
int y = COConfigurationManager.getIntParameter("transferbar.y");
return new Point(x, y);
|
public static MiniBarManager | getManager()
manager = new MiniBarManager("AllTransfersBar");
return manager;
|
public java.lang.String | getPluginMenuIdentifier(java.lang.Object context)
return "transfersbar";
|
public static org.gudy.azureus2.ui.swt.minibar.AllTransfersBar | open(org.gudy.azureus2.core3.global.GlobalManager g_manager, org.eclipse.swt.widgets.Shell main)
AllTransfersBar result = getBarIfOpen(g_manager);
if (result == null) {
result = new AllTransfersBar(g_manager, main);
}
return result;
|
protected void | refresh0()
GlobalManagerStats stats = g_manager.getStats();
this.updateSpeedLabel(down_speed, stats.getDataReceiveRate(),stats.getProtocolReceiveRate());
this.updateSpeedLabel(up_speed, stats.getDataSendRate(),stats.getProtocolSendRate());
|
protected void | storeLastLocation(org.eclipse.swt.graphics.Point location)
COConfigurationManager.setParameter("transferbar.x", location.x);
COConfigurationManager.setParameter("transferbar.y", location.y);
|