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

Unified Diff: frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java

Issue 1595019: Merge remote branch 'origin/upstream' into tempbranch (Closed)
Patch Set: Created 10 years, 8 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/planner/triage/TriagePopupDisplay.java
diff --git a/frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java b/frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java
new file mode 100644
index 0000000000000000000000000000000000000000..fb0e3a5ff5349f46f03a6b715806279626f71236
--- /dev/null
+++ b/frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java
@@ -0,0 +1,113 @@
+package autotest.planner.triage;
+
+import autotest.common.ui.ExtendedListBox;
+import autotest.common.ui.SimplifiedList;
+import autotest.planner.resources.PlannerImageBundle;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.HasValue;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.TextArea;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class TriagePopupDisplay extends PopupPanel implements TriagePopup.Display {
+ private Panel container = new VerticalPanel();
+ private Image closeX =
+ ((PlannerImageBundle) GWT.create(PlannerImageBundle.class)).close().createImage();
+ private TextBox labels = new TextBox();
+ private TextArea keyvals = new TextArea();
+ private TextBox bugs = new TextBox();
+ private TextBox reason = new TextBox();
+ private ExtendedListBox hostAction = new ExtendedListBox();
+ private ExtendedListBox testAction = new ExtendedListBox();
+ private CheckBox invalidate = new CheckBox("Invalidate Test");
+ private Button apply = new Button("Apply");
+
+ public TriagePopupDisplay() {
+ super(false, true);
+
+ HorizontalPanel topPanel = new HorizontalPanel();
+ topPanel.setWidth("100%");
+ topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
+ topPanel.add(closeX);
+ container.add(topPanel);
+
+ FlexTable bottomTable = new FlexTable();
+ addRow(bottomTable, "Labels", labels);
+ addRow(bottomTable, "Keyvals", keyvals);
+ addRow(bottomTable, "Bugs", bugs);
+ addRow(bottomTable, "Reason", reason);
+ addRow(bottomTable, "Host", hostAction);
+ addRow(bottomTable, "Test", testAction);
+ addRow(bottomTable, null, invalidate);
+ container.add(bottomTable);
+
+ container.add(apply);
+
+ setWidget(container);
+ }
+
+ private void addRow(FlexTable table, String label, Widget field) {
+ int row = table.getRowCount();
+ if (label != null) {
+ table.setText(row, 0, label + ":");
+ }
+ table.setWidget(row, 1, field);
+ }
+
+ @Override
+ public HasClickHandlers getApplyButton() {
+ return apply;
+ }
+
+ @Override
+ public HasText getBugsField() {
+ return bugs;
+ }
+
+ @Override
+ public HasClickHandlers getCloseButton() {
+ return closeX;
+ }
+
+ @Override
+ public SimplifiedList getHostActionField() {
+ return hostAction;
+ }
+
+ @Override
+ public HasValue<Boolean> getInvalidateField() {
+ return invalidate;
+ }
+
+ @Override
+ public HasText getKeyvalsField() {
+ return keyvals;
+ }
+
+ @Override
+ public HasText getLabelsField() {
+ return labels;
+ }
+
+ @Override
+ public HasText getReasonField() {
+ return reason;
+ }
+
+ @Override
+ public SimplifiedList getTestActionField() {
+ return testAction;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698