Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: frontend/client/src/autotest/afe/UserPreferencesView.java

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 057905dca34bb20450e2b636895a726f5a135d3a..0c8197a6a9541250163691e03236f7ccfda87736 100644
--- a/frontend/client/src/autotest/afe/UserPreferencesView.java
+++ b/frontend/client/src/autotest/afe/UserPreferencesView.java
@@ -3,9 +3,10 @@ package autotest.afe;
import autotest.common.JsonRpcCallback;
import autotest.common.JsonRpcProxy;
import autotest.common.StaticDataRepository;
-import autotest.common.Utils;
import autotest.common.StaticDataRepository.FinishedCallback;
+import autotest.common.Utils;
import autotest.common.ui.RadioChooser;
+import autotest.common.ui.RadioChooserDisplay;
import autotest.common.ui.TabView;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -26,14 +27,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();
@@ -53,17 +54,23 @@ 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", rebootBefore);
- addOption("Reboot after", rebootAfter);
+ addOption("Reboot before", rebootBeforeDisplay);
+ addOption("Reboot after", rebootAfterDisplay);
addOption("Show experimental tests", showExperimental);
if (staticData.getData("drone_sets_enabled").isBoolean().booleanValue()) {
- AfeUtils.popualateListBox(droneSet, "drone_sets");
+ AfeUtils.populateListBox(droneSet, "drone_sets");
addOption("Drone set", droneSet);
}
@@ -92,7 +99,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));
}

Powered by Google App Engine
This is Rietveld 408576698