Index: frontend/client/src/autotest/afe/UserPreferencesView.java |
diff --git a/frontend/client/src/autotest/afe/UserPreferencesView.java b/frontend/client/src/autotest/afe/UserPreferencesView.java |
index 0c8197a6a9541250163691e03236f7ccfda87736..057905dca34bb20450e2b636895a726f5a135d3a 100644 |
--- a/frontend/client/src/autotest/afe/UserPreferencesView.java |
+++ b/frontend/client/src/autotest/afe/UserPreferencesView.java |
@@ -3,10 +3,9 @@ package autotest.afe; |
import autotest.common.JsonRpcCallback; |
import autotest.common.JsonRpcProxy; |
import autotest.common.StaticDataRepository; |
-import autotest.common.StaticDataRepository.FinishedCallback; |
import autotest.common.Utils; |
+import autotest.common.StaticDataRepository.FinishedCallback; |
import autotest.common.ui.RadioChooser; |
-import autotest.common.ui.RadioChooserDisplay; |
import autotest.common.ui.TabView; |
import com.google.gwt.event.dom.client.ClickEvent; |
@@ -27,14 +26,14 @@ import com.google.gwt.user.client.ui.Widget; |
public class UserPreferencesView extends TabView implements ClickHandler { |
private static final StaticDataRepository staticData = StaticDataRepository.getRepository(); |
private static final JsonRpcProxy proxy = JsonRpcProxy.getProxy(); |
- |
+ |
public static interface UserPreferencesListener { |
public void onPreferencesChanged(); |
} |
- |
+ |
private JSONObject user; |
private UserPreferencesListener listener; |
- |
+ |
private RadioChooser rebootBefore = new RadioChooser(); |
private RadioChooser rebootAfter = new RadioChooser(); |
private ListBox droneSet = new ListBox(); |
@@ -54,23 +53,17 @@ public class UserPreferencesView extends TabView implements ClickHandler { |
@Override |
public void initialize() { |
super.initialize(); |
- |
- RadioChooserDisplay rebootBeforeDisplay = new RadioChooserDisplay(); |
- RadioChooserDisplay rebootAfterDisplay = new RadioChooserDisplay(); |
- rebootBefore.bindDisplay(rebootBeforeDisplay); |
- rebootAfter.bindDisplay(rebootAfterDisplay); |
- |
Panel container = new VerticalPanel(); |
AfeUtils.populateRadioChooser(rebootBefore, "reboot_before"); |
AfeUtils.populateRadioChooser(rebootAfter, "reboot_after"); |
saveButton.addClickHandler(this); |
- addOption("Reboot before", rebootBeforeDisplay); |
- addOption("Reboot after", rebootAfterDisplay); |
+ addOption("Reboot before", rebootBefore); |
+ addOption("Reboot after", rebootAfter); |
addOption("Show experimental tests", showExperimental); |
if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) { |
- AfeUtils.populateListBox(droneSet, "drone_sets"); |
+ AfeUtils.popualateListBox(droneSet, "drone_sets"); |
addOption("Drone set", droneSet); |
} |
@@ -99,7 +92,7 @@ public class UserPreferencesView extends TabView implements ClickHandler { |
showExperimental.setValue(user.get("show_experimental").isBoolean().booleanValue()); |
} |
- |
+ |
private String getValue(String key) { |
return Utils.jsonToString(user.get(key)); |
} |