Package com.biglybt.ui.swt.speedtest
Class SpeedTestSetLimitPanel
java.lang.Object
com.biglybt.ui.swt.wizard.AbstractWizardPanel
com.biglybt.ui.swt.speedtest.SpeedTestSetLimitPanel
- All Implemented Interfaces:
IWizardPanel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Convert the bytes into bit.(package private) static class
Only numbers are allowed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.eclipse.swt.widgets.Button
private org.eclipse.swt.widgets.Combo
private boolean
private boolean
private LimitToTextHelper
private int
private int
private SpeedManager
private org.eclipse.swt.widgets.Combo
private boolean
private boolean
Fields inherited from class com.biglybt.ui.swt.wizard.AbstractWizardPanel
previousPanel, wizard
-
Constructor Summary
ConstructorsConstructorDescriptionSpeedTestSetLimitPanel
(Wizard wizard, IWizardPanel previousPanel, int upload, long maxup, int download, long maxdown) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addDropElements
(org.eclipse.swt.widgets.Combo combo, String[] elements) private void
createErrorDesc
(org.eclipse.swt.widgets.Composite panel, String error) private void
createResultData
(org.eclipse.swt.widgets.Composite panel, String label, int rate) private void
createResultLabels
(org.eclipse.swt.widgets.Composite panel, boolean hadError) Create a label for the test.private void
createTestDesc
(org.eclipse.swt.widgets.Composite panel) int
determineRateSettingEx
(int measuredRate, boolean testRan, boolean isUpload) void
finish()
boolean
boolean
private int
setDefaultConfidenceLevelEx
(int transferRateKBPS, boolean testRan, boolean isUpload, String[] values) void
show()
Panel has text at the top explaining the result.Methods inherited from class com.biglybt.ui.swt.wizard.AbstractWizardPanel
cancelled, getNextPanel, getPreviousPanel, isFinishSelectionOK, isPreviousEnabled
-
Field Details
-
measuredUploadKbps
private int measuredUploadKbps -
measuredDownloadKbps
private int measuredDownloadKbps -
downloadTestRan
private boolean downloadTestRan -
uploadTestRan
private boolean uploadTestRan -
downloadHitLimit
private boolean downloadHitLimit -
uploadHitLimit
private boolean uploadHitLimit -
apply
private org.eclipse.swt.widgets.Button apply -
downConfLevelCombo
private org.eclipse.swt.widgets.Combo downConfLevelCombo -
upConfLevelCombo
private org.eclipse.swt.widgets.Combo upConfLevelCombo -
speedManager
-
helper
-
-
Constructor Details
-
SpeedTestSetLimitPanel
public SpeedTestSetLimitPanel(Wizard wizard, IWizardPanel previousPanel, int upload, long maxup, int download, long maxdown)
-
-
Method Details
-
show
public void show()Panel has text at the top explaining the result. Then under that it has a label the measured upload value and the recommended value. Then a button with apply. -
addDropElements
-
setDefaultConfidenceLevelEx
private int setDefaultConfidenceLevelEx(int transferRateKBPS, boolean testRan, boolean isUpload, String[] values) - Parameters:
transferRateKBPS
- -testRan
- -isUpload
- -values
- -- Returns:
- - index of dropdown that matches or -1 to indicate no match.
-
createResultLabels
private void createResultLabels(org.eclipse.swt.widgets.Composite panel, boolean hadError) Create a label for the test. The layout is assumed to be five across. If an error occured in the test then the units are not printed out.- Parameters:
panel
- -hadError
- - true if the test had an error.
-
createResultData
-
createTestDesc
private void createTestDesc(org.eclipse.swt.widgets.Composite panel) -
createErrorDesc
-
determineRateSettingEx
public int determineRateSettingEx(int measuredRate, boolean testRan, boolean isUpload) -
finish
public void finish()- Specified by:
finish
in interfaceIWizardPanel
- Overrides:
finish
in classAbstractWizardPanel
-
getFinishPanel
- Specified by:
getFinishPanel
in interfaceIWizardPanel
- Overrides:
getFinishPanel
in classAbstractWizardPanel
-
isFinishEnabled
public boolean isFinishEnabled()- Specified by:
isFinishEnabled
in interfaceIWizardPanel
- Overrides:
isFinishEnabled
in classAbstractWizardPanel
-
isNextEnabled
public boolean isNextEnabled()- Specified by:
isNextEnabled
in interfaceIWizardPanel
- Overrides:
isNextEnabled
in classAbstractWizardPanel
-