public static void invokeSlider(AzureusCore core, boolean isUpSpeed) {
final String prefix = MessageText.getString(isUpSpeed
? "GeneralView.label.maxuploadspeed"
: "GeneralView.label.maxdownloadspeed");
GlobalManager gm = core.getGlobalManager();
final String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(gm);
boolean auto = COConfigurationManager.getBooleanParameter(configAutoKey);
final String configKey = isUpSpeed
? TransferSpeedValidator.getActiveUploadParameter(gm)
: "Max Download Speed KBs";
int maxBandwidth = COConfigurationManager.getIntParameter(configKey);
final boolean unlim = (maxBandwidth == 0);
if (unlim && !isUpSpeed) {
GlobalManagerStats stats = gm.getStats();
int dataReceive = stats.getDataReceiveRate();
if (dataReceive >= 1024) {
maxBandwidth = dataReceive / 1024;
}
}