itemDownSpeedManual.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String kbps_str = MessageText.getString("MyTorrentsView.dialog.setNumber.inKbps",
new String[]{ DisplayFormatters.getRateUnit(DisplayFormatters.UNIT_KB ) });
SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow();
entryWindow.initTexts("MyTorrentsView.dialog.setSpeed.title",
new String[] {
MessageText.getString(up_menu
? "MyTorrentsView.dialog.setNumber.upload"
: "MyTorrentsView.dialog.setNumber.download")
}, "MyTorrentsView.dialog.setNumber.text", new String[] {
kbps_str,
MessageText.getString(up_menu
? "MyTorrentsView.dialog.setNumber.upload"
: "MyTorrentsView.dialog.setNumber.download")
});
entryWindow.prompt(new UIInputReceiverListener() {
public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
if (!entryWindow.hasSubmittedInput()) {
return;
}
String sReturn = entryWindow.getSubmittedInput();
if (sReturn == null)
return;
int newSpeed;